[FFmpeg-devel] [PATCH v2] ffmpeg_opt: restore documented stream selection behaviour

Michael Niedermayer michael at niedermayer.cc
Wed Jul 28 23:23:03 EEST 2021


On Wed, Jul 28, 2021 at 02:09:00PM +0530, Gyan Doshi wrote:
> 11d3b03fcb added consideration of default stream disposition for audio
> and video when choosing the 'best' stream among all the inputs. This can
> lead to video streams with lower resolution or audio streams with fewer
> channels being selected.
> 
> Stream disposition, however, only sets a priority for a stream
> among all other streams in the *same input*. It cannot set a priority
> for a stream across all inputs.
> 
> This patch sets a middle-way and selects the best stream from each file
> with default disposition considered. Then it discards disposition weight
> and selects best stream as per the original criteria of highest
> resolution for video and most channels for audio.
> ---
> 
> Corrected out-of-bounds input stream access.
> 
>  fftools/ffmpeg_opt.c | 78 +++++++++++++++++++++++++++++---------------
>  1 file changed, 51 insertions(+), 27 deletions(-)

This appears to break:

./ffmpeg -i c3226e01-83b5-49a2-4279-14ac6e9a9ac3 -an -t 150 file.avi

the file appears to be at:
https://samples.ffmpeg.org/mov/

thx

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

I am the wisest man alive, for I know one thing, and that is that I know
nothing. -- Socrates
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20210728/053402a8/attachment.sig>


More information about the ffmpeg-devel mailing list