Search code examples
flashvideohtml5-videoondemandtranscode

Looking to build a video serving web application


I want to build an application that will allow the user to upload a movie file, then allow the user to give information about the movie (like synopsis, title, etc.) so that he or she can watch it from the server at a later time. Almost exactly like a youtube clone, for all intents and purposes.

I'm running into a problem, however, with serving up the movie to be watched. I want the user to be able to watch the movie on a variety of different platforms, including over the web in all of the common browsers, on iOS devices and on Android devices (as well as GoogleTV in the future).

I had initially planned on having the user upload whatever file formats they want, store that file, then transcode it on the fly using ffmpeg (or something similar) to serve it up to whichever device is requesting it. This is handy, because I'd be able to transcode it to a smaller size if I needed to to save on bandwidth. Unfortunately, I'm having a tough time finding a method that will do this to display the movie in a web browser.

I've tried VLC to death. I'm able to get it to stream a video on demand over RTSP, but (as I understand it), both the HTML5 video tag and Flash won't accept an RTSP stream. I haven't had any luck finding a method of streaming an on-the-fly transcoded video over HTTP, which looks to limit my options to embedding either a windows media player or quicktime. FFServer with FFMpeg has the same problem; it can create an RTSP stream, but not an HTTP stream.

So, does anyone have any ideas as to how I can go about transcoding a video on demand and have it stream to a web browser that contains either HTML5 or Flash?

Thanks!
Chris


Solution

  • Why do you want to transcode it on-the-fly? Do you think you will be able to transcode it quickly enough? Think about a movie in a HD format... Also, there are different protocols of requesting the stream, meaning that some protocol could request the middle or the end chunks of data.

    If I were you, I would save the video file in different formats and serve to the user the appropriate one. I don't think storage space should be a constraint for a video serving platform.