So we were going to make a website allowing users to upload video. The website is going to be in PHP/MySQL. Are there any converters out there available for PHP to convert a video from a given format to flash to display on the web page to play?
Basically we would have a file on the server in say .avi format, or quicktime format. How do I grab it from the server, convert it to flash and display it on the php page to play?
Also, does can I use the video capabilities of HTML5 with PHP to make any of this easier?
What I have seen is encoding to flash on the server uses FFMPEG, Which must be installed onto the hosting server (some hosts specialize in this market). I've also looked for an open source encoder PHP or Perl, and not found one. I believe the problem is flash has not been open source and that stopped people because of licensing issues.
You can use the VideoToolkit php class, that uses ffmpeg and mencoder to convert the videos.
http://www.phpclasses.org/package/3747-PHP-Manipulate-and-convert-videos-with-ffmpeg-program.html
Related
I currently run a Linux server, but would switch to Windows if needed.
Users will upload documents in .DOC, .DOCX or .PDF format. I want to convert the MS Word docs to PDF. Then, later, when a user loads a page which I am coding with AngularJs, the page should fetch the document from my server and embed it.
I don't want to rely on 3rd party web services, such as Google, as these are liable to change, but don't mind a 3rd party PHP library for the conversion, or maybe a "print to PDF" option, but I don't have MS Word on my server (I suppose that I could do so if I switch to windows (or use Open Office on Linux?)). Preferably free, certainly sub $100.
If fetching the doc via AJAX to the AngularJs page is problematic, I suppose that I could generate the page with the embedded PDF in PHP on the server.
I don't even know how best to go about it. Google is not my friend, the only solutions I can see for my case recommend the Google DOCs API, which is now deprecated.
I hope to here from someone who has already implemented this.
Recently I've got requirement to set streaming video. To set this which allow mp4 format to download is easy but my boss want to use Adobe streaming server which allow user to watch videos in many chunk of f4f file format. I am not aware of server requirement for this and don't know what kind of coding is required for this. Can anyone point me in right direction please? I am all good with PHP, HTML5, jquery and OOP. I am thinking to user laravel framework for this project. What do you say? What about flash player? Any help and comment appreciated.
Thanks..
The simple answer is that both parties need to have the CODEC for the f4f file format on their respective machines. Computers are what computers are, you just have to tell what it is. If the very same .mp4 file has had a different file extension put on it, say .txt, then of course the OS won't see it as a media file. A file format is as a file format does. Both machines have to have the same software drivers to read and render the files.
Background:
I have a site that deals with large video files (sports videos). The site allows users to upload any source file, but most of the videos come from DVDs. I am currently using a modified version of jumploader to encode and upload files to the webserver with an HTTP request. The jumploader is a java client, and looking at my webstats, only about 75% of my users have java installed.
What I want:
I have looked for a flash based uploader that transfers a byte stream to a server. Byte streams would be ideal so I can capture partial videos for failed uploads. I have also looked for flash-based ftp clients, but I haven't found anything promising. There are some flash-based uploaders that post via HTTP, and I'm considering this. I do not want to use a simple file post. Some upload methods also put the full file into memory first, and this obviously is not an option for me.
Does anyone have experience uploading large (up to 2-3GB) files to a web (or ftp) server from a web frontend (PHP) with any reliability?
as a flash based solution you can use swfupload, which is widely used because you can display a progress bar. It sends answers back to you which you can read with JavaScript.
We decided upon using Transloadit, a service which is specialised in uploading and encoding video files. You can even track whether a download was aborted by closing the browser window, it has realtime encoding and supports multiple formats. Moreover your files are stored at Amazon S3 so you can easily stream them with AWS CloudFront and JWPlayer or Flowplayer.
See also zencoder.
Cheers
PHP: How to write code in PHP to play video files (not flash) but completely turn off the video download
Yahoo sites do it so far I saw
It's not possible via PHP AFAIK. You have to use JavaScript or HTML5 tag. The problem with HTML5 is, that not every browser supports it yet.
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.