[FFmpeg-devel] [PATCHv3] lavf: let av_find_best_stream use bitrate info if available

Michael Niedermayer michaelni at gmx.at
Sun Nov 18 14:01:41 CET 2012

On Sun, Nov 18, 2012 at 01:19:14PM +0100, Marton Balint wrote:
> I guess the user expects to see the stream with the highest bitrate, not with
> the most frames, this is especially useful for multi bitrate streams.
> This patch changes av_find_best_stream to select the stream based on a number
> of conditions, the first condition has the highest priority, the last condition
> has the lowest:
> 1) Select the stream with the highest FFMIN(5, codec_info_nb_frames) value
> 2) Select the stream with the highest bitrate
> 3) Select the stream with the highest codec_info_nb_frames
> 4) Select the first stream
> Signed-off-by: Marton Balint <cus at passwd.hu>
> ---
>  libavformat/utils.c |   13 ++++++++++---
>  1 file changed, 10 insertions(+), 3 deletions(-)



Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

DNS cache poisoning attacks, popular search engine, Google internet authority
dont be evil, please
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20121118/554d19f4/attachment.asc>

More information about the ffmpeg-devel mailing list