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

Henk D. Schoneveld belcampo at zonnet.nl
Tue May 12 11:47:44 CEST 2015



Verstuurd vanaf mijn iPhone

> Op 12 mei 2015 om 11:31 heeft Werner Robitza <werner.robitza at gmail.com> het volgende geschreven:
> 
>> On Tue, May 12, 2015 at 1:25 AM, Joel Lopez <badassmexican at gmail.com> wrote:
>> Can I add a few lower versions to the mix and a higher one?
> 
> Yes, you should do that.
> 
>> Can I realign the keyframes of the existing files?
> 
> That's going to be hard. You're better off re-encoding from scratch
> with a fixed interval.
> 
>> I'm not so sure how crucial aligned key frames are.  What have you seen out there?
> 
> The recommendation is definitely to keep them aligned; otherwise
> you'll run into sync issues.
> 
>> What bitrates and dimensions do you think they're using?  What do you
>> recommend is good for adaptive bit rate switching?
> 
> See https://developer.apple.com/library/ios/technotes/tn2224/_index.html#//apple_ref/doc/uid/DTS40009745-CH1-SETTINGSFILES
> 
> It's a good starting point.
> 
>> He said I didn't need to change the dimensions when making
>> different bit rate versions.  What's your opinion?
> 
> Typically you should vary both bit rate and resolution, and frame rate
> if you're targeting really crappy devices.
> Changing just the bit rate but not the resolution may make the video
> look worse at lower bit rates than if it had a lower resolution and
> the same low bit rate. I recently did a test with bitrate-only
> switching and I'm not sure if I'd recommend that.
> 
>> 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
> 
> Check the H.264 encoding guide
> (https://trac.ffmpeg.org/wiki/Encode/H.264). Do not use the CRF option
> but use "-b:v 1M" for 1 MBit/s, or similar. Ideally, do a two-pass
> encode for better quality, if you have the time.
Would you be so kind to explain why to NOT use the crf option?
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user


More information about the ffmpeg-user mailing list