So, currently I'm trying to find a way to stream H.264 to MP4 via the HTML5 player. I believe to do this we need to use fragmented MP4 streaming.
So far, this is the command I've figured out.
- Code: Select all
ffmpeg -ss %o -i %s -async 60 -ac 2 -c:a libfdk_aac -b:a 128k -f mp4 -c:v libx264 -b:v %bk -s %wx%h -v 0 -preset ultrafast -threads 1 -strict -2 -movflags frag_keyframe+empty_moov+faststart - < /dev/null
MP4 containers aren't normally seekable and lack the proper indexing support for it to be played without fetching the whole video. That's a major problem - especially if you have a video that's over like... A minute or something. But with frag_keyframe you can create a fragmented version that should theoretically be streamable.
Currently though it just spins and spins in opera and dies immediately in chrome. Hmm.
Anyway, I have found one combination that works quite well for streaming HTML5. For those interested....
- Code: Select all
ffmpeg -ss %o -i %s -async 60 -ac 2 -c:a libopus -b:a 128k -f ogg -c:v libtheora -b:v %bk -s %wx%h -v 0 -preset ultrafast -threads 1 -strict -2 -
But yeah, I'd like to get some MP4/H.264 streaming if I can.