[FFmpeg-user] Encoding to FLV for internet streaming - what's best?

Jesse Gordon tojesseg at gmail.com
Thu Sep 27 22:12:19 CEST 2012


Thank you all very much for teaching me what dual pass encoding is for. 
Now that I know it's not for streaming, I venture to ask "How do I make 
ffmpeg produce FLV good for internet streaming?"

I don't want the "fixed file size" style that two-pass brings because I 
don't want the bitrate to be out of bounds for more then a few seconds 
at a time.

I also don't want "Every frame the same (encoded) size" because then 3 
high-motion frames would look bad even if there were 30 still frames 
after them.

Ideally, one would want that the bandwidth could momentarily go out of 
bounds for up to a second but the average for any 5 or 10 second period 
would be very close to the stated bandwidth. Achieving this would 
require some sort of "10 second look ahead" -- or some sort of dual-pass.

I am using GOP=300 frames, which is about 10 seconds worth. I would be 
satisfied if each GOP was a fixed byte size, as that would allow 
bandwidth surging within fixed 10 second periods while still assuring 
that any 20 seconds worth of video was guaranteed to average out to 
within the bandwidth budget.
(More or less.)
The problem with basing it on GOP is that let's say the second half of a 
GOP was higher bandwidth, as was the first half of the following GOP, 
then there would be a solid 10 seconds of high bandwidth, hence the "20 
seconds average." I could reduce my GOP too - 10 seconds is sort of 
pushing it if the bitrate isn't very high.


Ideally however a sliding window would be used - perhaps a 5 or 10 
second window.

Any suggestions?

Thanks very much,

Jesse Gordon


More information about the ffmpeg-user mailing list