I recently found a similar project for node.js to achieve m3u8 transcoding (https://github.com/andrewschaaf/media-server), but have not heard of one yet, except that Wowza did it outside the Origin module for Apache. Since the payload is almost identical, you'd better look for a good mp4 segmentation solution (a lot there) than looking for f4m segmentation. The problem is that moov atoms, especially on large mp4 videos, are difficult to manage and are placed in their original (near the beginning of the file) location. Even with the optimal ffmpeg and "qtfaststart" settings, you get a noticeably slow search, inefficient bandwidth usage (usually greedy) and a few minor headaches associated with cleaning / time that you don't get with flv / f4v playback.
In my player, I either intend to switch between HTTP Dynamic Streaming (HDS) and MP4 based on Apache's download and real-time session analysis using awk / cron instead of licensing the Adobe Access product to protect the stream. Both have unique 'onmetadata' handlers .. but in the end I get sequential / byte hashes almost equivalent. Just MP4 is slower. So mod_origin is just a sync / request router for Flash clients (via http). I'm still looking for ways to speed up playback on an mp4 container. One incredible solution I read recently and was very surprised at his http://zehfernando.com/2011/flash-video-frame-time-woes/ where the video editor (guy) and flash developer came up with their own mp4 timecoding which literally added (via the Adobe Premiere script) about 50 pixels to the bottom of each video frame with a visual “binary” mark, such as a frame barcode .. and these binary values are converted to high-precision timecode values. Thus, Flash could analyze video clips as they were colored (in real time) and determine exactly where the player was and what bytes were needed from any type of web server that supports mp4 byte segmentation. The fact is that (and maybe I'm not here) Flash seems to randomly select when it receives moov data, especially in large video files (.5-1.5gigs). Even if you make sure that you run mp4 through MP4Box (i.e., MP4Box -frag 10000 -inter 0 movie.mp4) I think that it was a problem. OSMF and HDS worked well now, although it is annoying that you need Apache and proprietary closed-source module to use imo it. This is probably just a matter of time before the open source implementation comes, since HDS is only 1-2 years old, and it just needs a little reverse engineering, like this guy Andrew Chaaf with stream node.js + mpegts (in direct broadcast or not). In the end, I can just use OSMF exclusively under my user interface, as it seems to have similar advantages to HDS, if not more, i.e. Strobe, if you need a sick extensible HD Player or MP4 platform for hacking to implement your own custom player.
source share