How to integrate iiif image viewer in Php project? - php

I want to use iiif http://iiif.io/ in my Codeigniter project but I haven't found any helpful link or demo which can help me to use this framework.
I'm also planning to use http://www.iiifhosting.com/ for hosting images and its demo shows they provide an image viewer too, but can I customise this viewer just like IIPMooViewer, Mirador, OpenSeadragon or any other viewer listed in iiif.io viewer list?

According to the documentation:
The IIIF [International Image Interoperability Framework] Image API specifies a web service that returns an image in response to a standard HTTP or HTTPS request. The URI can specify the region, size, rotation, quality characteristics and format of the requested image.
For the server, you can deploy your own server such as Loris or IIPImage server. You can also use an hosting service such as http://www.iiifhosting.com/ .
For the client, you can integrate a client such as Mirador, OpenSeadragon into your website but you can also directly use the IIIF protocol, using the URI syntax:
{scheme}://{server}{/prefix}/{identifier}/{region}/{size}/{rotation}/{quality}.{format}

Related

Video streaming/recording solution ( Wowza Streaming Engine + Flash Media Live Encoder)

I am working on a php based web application where I need the end user to be able to record video response through the application using his webcam and then that video gets stored to my server. I have been looking into Wowza streaming Engine for sometime now and have been able to figure out that I need a streaming engine and an encoder to successfully stream a video . Using Adobe Flash media live encoder (thanks to my mate jolumg) I was able to stream live video on my locally installed Wowza streaming engine, which is cool if I want to broadcast live video, however I cannot expect my enduser to install the encoder on his device. If I am not mistaken, the end user will have access to some kind of recorder through my application. So I need to know few things:
How do I create such recorder which can capture the video using user's webcam?
Which programming language do I need to create the recorder?
Assuming the Adobe Flash media live encoder(FMLE) is installed on my server, what configuration changes do I need to make so that the recorder can send the video to FMLE which is connected to my Wowza streaming engine and can thus publish the stream.
After the incoming stream is published, how do I programmatically record it(rather than using the record button on the wowza engine manager)? Do I create an api? if yes in what language?
Finally in terms of storage, would a standard AWS instance would do or do I need something with larger space?
Any ideas?
Pardon me if I am lacking in my understanding of the entire video streaming/recording platform. I am a reletively young programmer and this is totally new for me. Thanks is advance.
I think that what you are looking for is not exactly called recorder. If what you want is live streaming you will need an encoder module. Same function than FMLE.
If you can not ask user to install FMLE you need same function embeded in the webpage.
and 2.- Usually this has been done with a flash plugin. There are samples in internet of that module. But this will not work in mobiles and with Flash being phased out soon it will not work in desktop browsers either.
If you target is mobile, check Wowza GoCoder, you have an SDK to create native applications and you also have a simple application that is ready to use (but user need to install it)
Since recently we have WebRTC technologies to use the webcam in the browser. (Wihtout depending of external plugins, or applications) Wowza already support an webRTC input. This seems to be the way for the future, but this is quite new and only will work in the latest browsers but it should work in desktop and in mobiles.
WebRTC samples:
https://webrtc.github.io/samples/
3- You do not need the FMLE in this scenario. End users is doing the encoding.
4- In Wowza configure you can set that all the streams in an application being recorded automatically. You can also have an http API to start/stop the recording at any moment, if you want fine control.
5- It will depend of your usage. This is is sometging you need evaluate,
Jolumag explained well.
FMLE, Wirecast, OBS are desktop based encoder. If you are looking for recording option from browser then its Flash component that support RTMP protocol.
You can set this rtmp://wowzaip:1935/wowzapp/streamname in your flash publisher component.
Flash is now being called "dead" so you can go for WebRTC if you want this recording support in mobile as well.
Chrome stopped support for Flash as primary technology for webcam access... your users will have to enable flash plugin in chrome.

easily change/getting image from googledrive and display in website

from this article https://support.google.com/drive/answer/2881970?hl=en . google doesn't support web hostings. Is there any way that i can get my image from googledrive for example like this:
for example i have a shared folder like this:
https://drive.google.com/drive/folders/0ByzxsoB7kICPUjVEVG12a0hNSWc
and that shared folder contains with
myimage1.jpg,
myimage2.jpg,
myimage3.jpg,
i want to select/change it in my website by using that image.
For example i uploaded another image in my googledrive to replace my web image easily. Please help.
something like this :
<img src = "googledriveimage/myimage1.jpg">
after i want to replace the image. then i would go to googledrive and replace the myimage1.jpg with another image but the same file name.
You could write a PHP script to fetch the desired image from google drive and return it back to the HTTP client.
Refer to the flow in the diagram:
User views the HTML page in his/her browser
The browser sends a HTTP GET request to your PHP script.
The PHP script is hosted either in a publicy accessible web server (or uses a cloud service provider e.g. Google App Engine, you could use any cloud hosting service provider). The script would use the Google Drive SDK to use OAUTH and request the pre-specified image file from Google Drive. Here, you need to use either the SDK or wrap the request in the proper JSON/XML format as specified by Google Drive API. You need to embed the desired logic of translating a front-end visible image filename to the real Google Drive filename.
Google drive translates the request, checks authentication and retrieves the image.
The image is returned back to the PHP script.
The PHP script encodes the image and sets the right MIME type, headers, etc.
The user is able to view the image on the page.
To clarify, you dont need to host your PHP script in Google App Engine, you could host it on any other web hosting provider infrastructure.
I've used Google drive APIs in servlets deployed on Google App engine. I haven't used PHP in GAE, but have quoted the PHP references since you indicated familiarity with PHP. If you're interested in using GAE, first read the concepts related to GAE here https://cloud.google.com/appengine/docs/php/concepts and then the PHP how-tos for using the SDK and deploying the app using PHP - https://cloud.google.com/appengine/docs/php/how-to . Also refer to this documentation - https://cloud.google.com/appengine/docs/php/ .
I've included the concept of how you can solve your problem, you need to go through the documents and implement this yourselves.

JasperReports embed into Web Page

Is there any way such that I can embed JasprerReports onto my web application so that I can work online from anywhere.
By embed I mean to use the s/w in the same manner as I used it like a desktop application.
I found a PHP client but I can't get what it does.
http://community.jaspersoft.com/project/php-client
Also are there any html to jrxml converter available commmercial, non commercial.
You can use JasperReports Server which is a stand-alone and embeddable reporting server : JasperReports Server. You can use iReports to build your reports and then upload them into the server, or build them directly from the server with an ad-hoc view.
The link you've provided does nothing more that connect with this server and use it within PHP applications.

Online file storage logic

I want to develop a website like file manager. Where user register and will get fix disk space lets say 20MB.
Now user can upload their pdf, doc, txt, jpeg etc files upto their disk limit.
I can develop upto this using PHP.
Now below is my issue:
1) If user's files are corrupted they can rollback their folders before 2-3 days.
Files must be secure and safe from viruses as users are uploading their important documents.
Is there any 3rd party storage server who provides such facility?
2) Also all files should be previewed from browser.
I am using Google doc viewer. Is is good and safe way to preview file in browser?
But google links are accessible from all, I need to add some restrictions as file can be viewed only by their owner.
I know it's a major task, but i just need some sort of logic. Please share your thoughts.
Thanks.
Any cloud storage service can be used for this. You'll get HDD space. There is not storage server who provides revision control system for this. You can use git, svn for this though. But as the files are binary you can not get full facility of these tools.
How file will be previewed depends on you. If you use PHP you make the site and at the backend you use the API to interact with the storage service. Google doc is not an option for this if you use PHP. Also note Google links can be made private.
I suggest you this,
Find a cloud storage service and use the storage in your server. Any will do.
Create UI using PHP and control the access using PHP too.
Manipulate files in your server directly or in 3rd party storage server via API
Use a revision control system to track the changes. And use its API in PHP end.
Some cloud storage service
Amazon S3. It also supports Versioning.
Google Cloud Storage
Microsoft Azure
Try Microsoft SkyDrive or Google Drive or Dropbox

How to record voice files using PHP, FLASH

I am developing an application where I need to record voice(for those who does not have a webcam so they can use only microphone to record voice) or video(those who have a a webcam - like laptop or external) files and save them on server, thereafter save the file name and logged in users id on database for later access.
I know I need to use some sort of flash app for this. But is there any free one which could server this purpose or even if there are paid ones which could serve this purpose that would be great. I tried google but may be I was not being able to go after the proper term or something, I could not succeed finding a proper solution for this.
Please, help me out!
You can do that simply using jRecorder, a jQuery plugin. You don't even need a Flash Media Server or RED server. JRecorder is same as jPlayer, you can use jQuery and HTML to design your recorder and you don't even need Flash or Action script knowledge for this.
jRecorder uses 1 pix hidden swf file which manages all the recording / previewing and sending the file data (wav file) to a URL you defined (Where you can write code in PHP or Java to receive a POST file)
It is quite simple and tidy.
You can download this Plugin from:
http://www.sajithmr.me/jrecorder-jquery
I have same feature in our latest project, the client want to have video recording from webcam and the video appear in the user's profile page.
For the server, we implement the RED5 server. It need a Java virtual machine in your hosting. You can read the detail requirement and installation instruction in the website.
To handle recording, we develop our own flash application, because the client request a custom interface to match with the overall website interface. I don't know the detail, since we outsource it to a fellow flash developer. Maybe you can see follow this thread, the development of flash recording by JeroenW.
To play recorded video, you can use any flash video player that support playing rtmp video source. You cannot play the recorded flv file in RED5 directly, since the file lack of metadata required by the player. Serving the recorded file as rtmp is done by RED5.
In addition to red5 there is Adobe's own Flash Media server that allows you to record audio/video straight to the server.
Or if you feel geeky you might be able to put together your own solution for this using a socket connection to the server and decoding the stream yourself on the server side. You should be able capture the audio/video locally into memory and then feed the byte stream up to your own server application.
There are Open Source solutions but you will need an own server to run them.
There is no way to run these things from shared hosting except if your provider is really nice, and ready to install the necessary software.
I asked the same question a few weeks back, check out the answers.
This question when googling "How to record audio php" comes up first so here for anyone from the future.
A simple way to record audio with flash and save it with PHP:
https://github.com/clouddueling/SimpleRecorder
Record audio, post audio data to your choice of url.
You could try recordmp3online.com which has an SDK. The nice thing about this one, is that it doesn't need a third party server(ala Red5), and supports mobile devices that don't have flash installed.

Categories