[FFmpeg-devel] [PATCH 02/18] fftools/ffmpeg_filter: refactor setting input timebase

Anton Khirnov anton at khirnov.net
Fri Mar 8 07:34:36 EET 2024


Quoting Michael Niedermayer (2024-03-07 21:37:39)
> On Wed, Mar 06, 2024 at 12:03:03PM +0100, Anton Khirnov wrote:
> > Treat it analogously to stream parameters like format/dimensions/etc.
> > This is functionally different from previous code in 2 ways:
> > * for non-CFR video, the frame timebase (set by the decoder) is used
> >   rather than the demuxer timebase
> > * for sub2video, AV_TIME_BASE_Q is used, which is hardcoded by the
> >   subtitle decoding API
> > 
> > These changes should avoid unnecessary and potentially lossy timestamp
> > conversions from decoder timebase into the demuxer one.
> > 
> > Changes the timebases used in sub2video tests.
> > ---
> >  fftools/ffmpeg_filter.c               |  17 ++-
> >  tests/ref/fate/sub2video_basic        | 182 +++++++++++++-------------
> >  tests/ref/fate/sub2video_time_limited |   8 +-
> >  3 files changed, 106 insertions(+), 101 deletions(-)
> 
> breaks:
> 
> ./ffmpeg -i \[a-s\]_full_metal_panic_fumoffu_-_01_-_the_man_from_the_south_-_a_hostage_with_no_compromises__rs2_\[1080p_bd-rip\]\[BBB48A25\].mkv  -filter_complex '[0:s:1]scale=800:600' -t 15 -qscale 2 -y a.avi
> 

Use a constant framerate.

-- 
Anton Khirnov


More information about the ffmpeg-devel mailing list