> -----Original Message----- > From: ffmpeg-user-boun...@ffmpeg.org [mailto:ffmpeg-user- > boun...@ffmpeg.org] On Behalf Of A. Semprimožnik > Sent: 03 September 2014 11:47 > To: ffmpeg-user@ffmpeg.org > Subject: [FFmpeg-user] ffmpeg bitrate flag > > Hi, > > We are using ffmpeg to transcode videos to various video formats. Large > number of videos is transcoded to MPEG1 and OGG. Those videos are then > played in javascript video player on web mobile. We noticed that especially > on OGG, there is a big difference in video quality when changing bitrate. > > My question is, are there any flag in ffmpeg, that sets bitrate dynamically > based on video content at transcoding time. What I mean by that, for > example, if a video is static, we don’t need high bitrate for new video when > decoding (static scene, where just one object is moving a little for example). > When video is full of action for example, so it is very dynamic, we need > higher bitrate to achieve a good quality of a video. > > Is there any flag that would determine how dynamic video is? Or > selects/returns/sets the optimal bitrate for transcoding, based on video’s > content?
If you specify a maximum (reasonable) bitrate and use two-pass encoding, the encoder will achieve what you want automatically. It will allocate as much bitrate as possible to high-motion or -detail sequences, and as little as possible to the opposite. Two-pass encoding may not be ideal during live streaming; in that case consider "average bitrate encoding". Although I'm talking mostly from recent x264 experience, I know ffmpeg's MPEG encoder supports two-pass encoding, and I believe it also supports "average bitrate encoding". See https://trac.ffmpeg.org/wiki/Encode/H.264. If OGG supports constant rate factor as x264 does, you could also consider that for live streaming. > > Thank you, > BR, A. Semprimoznik > _______________________________________________ > ffmpeg-user mailing list > ffmpeg-user@ffmpeg.org > http://ffmpeg.org/mailman/listinfo/ffmpeg-user _______________________________________________ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-user