On Wed, Feb 14, 2024 at 07:24:32PM +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 -bitexact -y /tmp/file-pgstest2.avi ... Press [q] to stop, [?] for help [aac @ 0x55dcd4a5a940] This stream seems to incorrectly report its last channel as LFE[3], mapping to LFE[0] [mpeg4 @ 0x55dcd4a5b780] timebase 1/1000000 not supported by MPEG 4 standard, the maximum admitted value for the timebase denominator is 65535 [vost#0:0/mpeg4 @ 0x55dcd4a5b2c0] Error while opening encoder - maybe incorrect parameters such as bit_rate, rate, width or height. [fc#0 @ 0x55dcd4a37a00] Error sending frames to consumers: Invalid argument [fc#0 @ 0x55dcd4a37a00] Task finished with error code: -22 (Invalid argument) [fc#0 @ 0x55dcd4a37a00] Terminating thread with return code -22 (Invalid argument) [vost#0:0/mpeg4 @ 0x55dcd4a5b2c0] Could not open encoder before EOF [vost#0:0/mpeg4 @ 0x55dcd4a5b2c0] Task finished with error code: -22 (Invalid argument) [vost#0:0/mpeg4 @ 0x55dcd4a5b2c0] Terminating thread with return code -22 (Invalid argument) [libmp3lame @ 0x55dcd4a5ca80] Trying to remove 1152 samples, but the queue is empty [out#0/avi @ 0x55dcd4a7f680] Nothing was written into output file, because at least one of its streams received no packets. frame= 0 fps=0.0 q=0.0 Lsize= 0KiB time=N/A bitrate=N/A speed=N/A Conversion failed! vs. Press [q] to stop, [?] for help [aac @ 0x55b416e87e00] This stream seems to incorrectly report its last channel as LFE[3], mapping to LFE[0] Output #0, avi, to '/tmp/file-pgstest2.avi': Stream #0:0: Video: mpeg4 (FMP4 / 0x34504D46), yuv420p(progressive), 800x600, q=2-31, 200 kb/s, 1k tbn Metadata: encoder : Lavc mpeg4 Side data: cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: N/A Stream #0:1(eng): Audio: mp3 (U[0][0][0] / 0x0055), 48000 Hz, stereo, fltp (default) Metadata: title : AAC encoder : Lavc libmp3lame [libmp3lame @ 0x55b416e76640] Trying to remove 1152 samples, but the queue is empty [out#0/avi @ 0x55b416e7fec0] video:496KiB audio:235KiB subtitle:0KiB other streams:0KiB global headers:0KiB muxing overhead: 51.412292% frame= 360 fps=0.0 q=2.0 Lsize= 1108KiB time=00:00:14.97 bitrate= 605.9kbits/s dup=0 drop=16 speed=44.9x [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Never trust a computer, one day, it may think you are the virus. -- Compn