[FFmpeg-devel] [PATCH 7/7] fftools/ffmpeg: propagate frame durations to packets when encoding

Anton Khirnov anton at khirnov.net
Fri Apr 14 19:51:11 EEST 2023


Quoting Anton Khirnov (2023-04-14 18:42:44)
> Remove now-obsolete code setting packet durations pre-muxing for CFR
> encoded video.
> 
> Changes output in the following FATE tests:
> * numerous adpcm tests
> * ffmpeg-filter_complex_audio
> * lavf-asf
> * lavf-mkv
> * lavf-mkv_attachment
> * matroska-encoding-delay
>   All of these change due to the fact that the output duration is now
>   the actual input data duration and does not include padding added by
>   the encoder.

It is not entirely clear to me that recording "user audio duration" (i.e.
samples submitted by the user to the encoder) rather than "coded audio
duration" (i.e. user duration plus any padding added by the encoder) in
containers (e.g. the 'fact' chunk in WAV, or duration metadata in
matroska) is the correct thing to do. It seems more elegant, but may
cause issues I'm not aware of. Opinions and arguments welcome.

-- 
Anton Khirnov


More information about the ffmpeg-devel mailing list