[FFmpeg-user] Encoding multiple files for adaptive bit rate streaming using RTMP and HLS

Joel Lopez badassmexican at gmail.com
Tue May 12 01:25:37 CEST 2015

We allow the viewers to select a low bandwidth or high bandwidth file
and stream just the selected file.  I am trying to move us to one
player with that does adaptive bit rate switching.  Of course I'd like
the videos to be playable in the older iOS, androids as well as
desktops with slow and fast connections.

The files currently stream have unaligned keyframes with the following
bit rates and sizes.
738 kb/s 426x240
1340 kb/s 854x480

Can I add a few lower versions to the mix and a higher one?  Can I
realign the keyframes of the existing files?  In my testing it seems
to switch ok with these 2 files so far so I'm not so sure how crucial
aligned key frames are.  What have you seen out there?

I see YouTube offers 6 and sometimes 7 different qualities for
different connections.

What bitrates and dimensions do you think they're using?  What do you
recommend is good for adaptive bit rate switching?

Someone was kind enough to help me out and get me started with this
command.  He said I didn't need to change the dimensions when making
different bit rate versions.  What's your opinion?  At least not
upscaling which makes sense.  But if I want the videos to play on
older phones should I make smaller dimensions?

How do I change this command to make the different bitrate or sizes?

ffmpeg [rawvideo demuxer options if required] -i input -c:v libx264
-crf 23 -preset medium -pix_fmt yuv420p -c:a libfdk_aac -vbr 5
-movflags +faststart output.mp4

Thanks for any help.

More information about the ffmpeg-user mailing list