[FFmpeg-trac] #10750(avformat:new): Tee muxer breaks DTS fixing
FFmpeg
trac at avcodec.org
Wed Dec 20 22:42:48 EET 2023
#10750: Tee muxer breaks DTS fixing
-------------------------------------+-------------------------------------
Reporter: Jendrik | Owner: (none)
Weise |
Type: defect | Status: new
Priority: normal | Component: avformat
Version: git-master | Resolution:
Keywords: tee | Blocked By:
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
-------------------------------------+-------------------------------------
Description changed by Jendrik Weise:
Old description:
> Summary of the bug:
> When using ffmpeg to copy a stream which has some error in the DTS
> ordering, normally this error will be fixed for that single timestamp,
> result in a single warning and cause no further issues. E.g.
> {{{#!bash
> ffmpeg -i test.mkv -map 0 -c copy out.mkv
> }}}
> However, when doing the exact same thing but via the tee muxer
> {{{#!bash
> ffmpeg -i test.mkv -map 0 -c copy -f tee '[f=matroska]out.mkv'
> }}}
> all timestamps get broken and an offset is created in the file.
>
> Tested with latest git version, as well as with current Ubuntu 22.04 and
> Archlinux.
>
> I will add an example file to test this with.
>
> Logs:
> - with tee:
> {{{
> ffmpeg started on 2023-12-20 at 21:34:29
> Report written to "ffmpeg-20231220-213429.log"
> Log level: 48
> Command line:
> ffmpeg -report -i test.mkv -map 0 -c copy -f tee "[f=matroska]out.mkv"
> ffmpeg version N-113034-g89215237dd Copyright (c) 2000-2023 the FFmpeg
> developers
> built with gcc 13.2.1 (GCC) 20230801
> configuration: --prefix=/usr --disable-debug --disable-static
> --disable-stripping --disable-htmlpages --enable-amf --enable-avisynth
> --enable-cuda-llvm --enable-lto --enable-fontconfig --enable-gmp
> --enable-gnutls --enable-gpl --enable-ladspa --enable-libaom --enable-
> libass --enable-libbluray --enable-libbs2b --enable-libdav1d --enable-
> libdrm --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-
> libiec61883 --enable-libjack --enable-libjxl --enable-libmodplug
> --enable-libmp3lame --enable-libopencore_amrnb --enable-libopencore_amrwb
> --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-
> libpulse --enable-librav1e --enable-librsvg --enable-libsoxr --enable-
> libspeex --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-
> libtheora --enable-libv4l2 --enable-libvidstab --enable-libvmaf --enable-
> libvorbis --enable-libvpl --enable-libvpx --enable-libwebp --enable-
> libx264 --enable-libx265 --enable-libxcb --enable-libxml2 --enable-
> libxvid --enable-libzimg --enable-nvdec --enable-nvenc -- libavutil
> 58. 35.100 / 58. 35.100
> libavcodec 60. 36.100 / 60. 36.100
> libavformat 60. 20.100 / 60. 20.100
> libavdevice 60. 4.100 / 60. 4.100
> libavfilter 9. 14.100 / 9. 14.100
> libswscale 7. 6.100 / 7. 6.100
> libswresample 4. 13.100 / 4. 13.100
> libpostproc 57. 4.100 / 57. 4.100
> Splitting the commandline.
> Reading option '-report' ... matched as option 'report' (generate a
> report) with argument '1'.
> Reading option '-i' ... matched as output url with argument 'test.mkv'.
> Reading option '-map' ... matched as option 'map' (set input stream
> mapping) with argument '0'.
> Reading option '-c' ... matched as option 'c' (codec name) with argument
> 'copy'.
> Reading option '-f' ... matched as option 'f' (force format) with
> argument 'tee'.
> Reading option '[f=matroska]out.mkv' ... matched as output url.
> Finished splitting the commandline.
> Parsing a group of options: global .
> Applying option report (generate a report) with argument 1.
> Successfully parsed a group of options.
> Parsing a group of options: input url test.mkv.
> Successfully parsed a group of options.
> Opening an input file: test.mkv.
> [AVFormatContext @ 0x558d3e3eaa00] Opening 'test.mkv' for reading
> [file @ 0x558d3e3eb080] Setting default whitelist 'file,crypto,data'
> [matroska,webm @ 0x558d3e3eaa00] Format matroska,webm probed with
> size=2048 and score=100
> st:0 removing common factor 1000000 from timebase
> [matroska,webm @ 0x558d3e3eaa00] Before avformat_find_stream_info() pos:
> 816 bytes read:4749 seeks:0 nb_streams:1
> [hevc @ 0x558d3e3ed040] nal_unit_type: 35(AUD), nuh_layer_id: 0,
> temporal_id: 0
> [hevc @ 0x558d3e3ed040] nal_unit_type: 32(VPS), nuh_layer_id: 0,
> temporal_id: 0
> [hevc @ 0x558d3e3ed040] nal_unit_type: 33(SPS), nuh_layer_id: 0,
> temporal_id: 0
> [hevc @ 0x558d3e3ed040] nal_unit_type: 34(PPS), nuh_layer_id: 0,
> temporal_id: 0
> [hevc @ 0x558d3e3ed040] nal_unit_type: 39(SEI_PREFIX), nuh_layer_id: 0,
> temporal_id: 0
> [hevc @ 0x558d3e3ed040] nal_unit_type: 39(SEI_PREFIX), nuh_layer_id: 0,
> temporal_id: 0
> [hevc @ 0x558d3e3ed040] nal_unit_type: 39(SEI_PREFIX), nuh_layer_id: 0,
> temporal_id: 0
> [hevc @ 0x558d3e3ed040] nal_unit_type: 19(IDR_W_RADL), nuh_layer_id: 0,
> temporal_id: 0
> [hevc @ 0x558d3e3ed040] nal_unit_type: 19(IDR_W_RADL), nuh_layer_id: 0,
> temporal_id: 0
> [hevc @ 0x558d3e3ed040] nal_unit_type: 19(IDR_W_RADL), nuh_layer_id: 0,
> temporal_id: 0
> [hevc @ 0x558d3e3ed040] nal_unit_type: 19(IDR_W_RADL), nuh_layer_id: 0,
> temporal_id: 0
> [hevc @ 0x558d3e3ed040] nal_unit_type: 40(SEI_SUFFIX), nuh_layer_id: 0,
> temporal_id: 0
> [hevc @ 0x558d3e3ed040] Decoding VPS
> [hevc @ 0x558d3e3ed040] Main 10 profile bitstream
> [hevc @ 0x558d3e3ed040] Decoding SPS
> [hevc @ 0x558d3e3ed040] Main 10 profile bitstream
> [hevc @ 0x558d3e3ed040] Decoding VUI
> [hevc @ 0x558d3e3ed040] Decoding PPS
> [hevc @ 0x558d3e3ed040] Decoding SEI
> [hevc @ 0x558d3e3ed040] Decoding SEI
> [hevc @ 0x558d3e3ed040] Skipped PREFIX SEI 0
> [hevc @ 0x558d3e3ed040] Decoding SEI
> [hevc @ 0x558d3e3ed040] Format yuv420p10le chosen by get_format().
> [hevc @ 0x558d3e3ed040] Decoding SEI
> [hevc @ 0x558d3e3ed040] Decoded frame with POC 0.
> [matroska,webm @ 0x558d3e3eaa00] All info found
> [matroska,webm @ 0x558d3e3eaa00] After avformat_find_stream_info() pos:
> 1687 bytes read:4749 seeks:0 frames:1
> Input #0, matroska,webm, from 'test.mkv':
> Metadata:
> ENCODER : Lavf60.3.100
> Duration: 00:00:00.71, start: 0.000000, bitrate: 53 kb/s
> Stream #0:0(eng), 1, 1/1000: Video: hevc (Main 10), yuv420p10le(tv,
> bt709), 1920x1080 [SAR 1:1 DAR 16:9], 24 fps, 24 tbr, 1k tbn (default)
> (original)
> Metadata:
> BPS : 5329518
> NUMBER_OF_FRAMES: 62522
> NUMBER_OF_BYTES : 1735480512
> _STATISTICS_WRITING_APP: mkvmerge v63.0.0 ('Everything') 64-bit
> _STATISTICS_WRITING_DATE_UTC: 2021-11-22 23:23:46
> _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
> DURATION : 00:00:00.708000000
> Successfully opened the file.
> Parsing a group of options: output url [f=matroska]out.mkv.
> Applying option map (set input stream mapping) with argument 0.
> Applying option c (codec name) with argument copy.
> Applying option f (force format) with argument tee.
> Successfully parsed a group of options.
> Opening an output file: [f=matroska]out.mkv.
> [out#0/tee @ 0x558d3e3f1140] Adding streams from explicit maps...
> [vost#0:0/copy @ 0x558d3e3fb400] Created video stream from input stream
> 0:0
> Successfully opened the file.
> Stream mapping:
> Stream #0:0 -> #0:0 (copy)
> [matroska @ 0x558d3e3fbac0] Opening 'out.mkv' for writing
> [file @ 0x558d3e3fc340] Setting default whitelist 'file,crypto,data'
> [matroska @ 0x558d3e3fbac0] get_metadata_duration returned: 708000
> [matroska @ 0x558d3e3fbac0] Write early duration from metadata = 708
> [tee @ 0x558d3e3f2980] filename:'out.mkv' format:matroska
> [tee @ 0x558d3e3f2980] stream:0 codec:hevc type:video bsfs: null
> Output #0, tee, to '[f=matroska]out.mkv':
> Metadata:
> encoder : Lavf60.20.100
> Stream #0:0(eng), 0, 1/24: Video: hevc (Main 10), yuv420p10le(tv,
> bt709), 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 24 fps, 24 tbr, 24 tbn
> (default) (original)
> Metadata:
> BPS : 5329518
> NUMBER_OF_FRAMES: 62522
> NUMBER_OF_BYTES : 1735480512
> _STATISTICS_WRITING_APP: mkvmerge v63.0.0 ('Everything') 64-bit
> _STATISTICS_WRITING_DATE_UTC: 2021-11-22 23:23:46
> _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
> DURATION : 00:00:00.708000000
> [out#0/tee @ 0x558d3e3f1140] Starting thread...
> [in#0/matroska,webm @ 0x558d3e3ea740] Starting thread...
> Press [q] to stop, [?] for help
> [matroska @ 0x558d3e3fbac0] Starting new cluster with timestamp 0 at
> offset 829 bytes
> [matroska @ 0x558d3e3fbac0] Writing block of size 853 with pts 0, dts 0,
> duration 42 at relative offset 9 in cluster at offset 829. TrackNumber 1,
> keyframe 1
> [matroska @ 0x558d3e3fbac0] Writing block of size 222 with pts 167, dts
> 42, duration 42 at relative offset 869 in cluster at offset 829.
> TrackNumber 1, keyframe 0
> [matroska @ 0x558d3e3fbac0] Writing block of size 223 with pts 83, dts
> 83, duration 42 at relative offset 1098 in cluster at offset 829.
> TrackNumber 1, keyframe 0
> [vost#0:0/copy @ 0x558d3e3fb400] Non-monotonic DTS; previous: 2, current:
> 2; changing to 3. This may result in incorrect timestamps in the output
> file.
> [matroska @ 0x558d3e3fbac0] Writing block of size 223 with pts 125, dts
> 125, duration 42 at relative offset 1328 in cluster at offset 829.
> TrackNumber 1, keyframe 0
> [vost#0:0/copy @ 0x558d3e3fb400] Non-monotonic DTS; previous: 3, current:
> 2; changing to 4. This may result in incorrect timestamps in the output
> file.
> [matroska @ 0x558d3e3fbac0] Writing block of size 223 with pts 167, dts
> 167, duration 42 at relative offset 1558 in cluster at offset 829.
> TrackNumber 1, keyframe 0
> [vost#0:0/copy @ 0x558d3e3fb400] Non-monotonic DTS; previous: 4, current:
> 3; changing to 5. This may result in incorrect timestamps in the output
> file.
> [matroska @ 0x558d3e3fbac0] Writing block of size 232 with pts 333, dts
> 208, duration 42 at relative offset 1788 in cluster at offset 829.
> TrackNumber 1, keyframe 0
> [vost#0:0/copy @ 0x558d3e3fb400] Non-monotonic DTS; previous: 5, current:
> 4; changing to 6. This may result in incorrect timestamps in the output
> file.
> [matroska @ 0x558d3e3fbac0] Writing block of size 222 with pts 250, dts
> 250, duration 42 at relative offset 2027 in cluster at offset 829.
> TrackNumber 1, keyframe 0
> [vost#0:0/copy @ 0x558d3e3fb400] Non-monotonic DTS; previous: 6, current:
> 5; changing to 7. This may result in incorrect timestamps in the output
> file.
> [matroska @ 0x558d3e3fbac0] Writing block of size 222 with pts 292, dts
> 292, duration 42 at relative offset 2256 in cluster at offset 829.
> TrackNumber 1, keyframe 0
> [vost#0:0/copy @ 0x558d3e3fb400] Non-monotonic DTS; previous: 7, current:
> 6; changing to 8. This may result in incorrect timestamps in the output
> file.
> [matroska @ 0x558d3e3fbac0] Writing block of size 222 with pts 333, dts
> 333, duration 42 at relative offset 2485 in cluster at offset 829.
> TrackNumber 1, keyframe 0
> [vost#0:0/copy @ 0x558d3e3fb400] Non-monotonic DTS; previous: 8, current:
> 7; changing to 9. This may result in incorrect timestamps in the output
> file.
> [matroska @ 0x558d3e3fbac0] Writing block of size 232 with pts 500, dts
> 375, duration 42 at relative offset 2714 in cluster at offset 829.
> TrackNumber 1, keyframe 0
> [vost#0:0/copy @ 0x558d3e3fb400] Non-monotonic DTS; previous: 9, current:
> 8; changing to 10. This may result in incorrect timestamps in the output
> file.
> [matroska @ 0x558d3e3fbac0] Writing block of size 230 with pts 417, dts
> 417, duration 42 at relative offset 2953 in cluster at offset 829.
> TrackNumber 1, keyframe 0
> [vost#0:0/copy @ 0x558d3e3fb400] Non-monotonic DTS; previous: 10,
> current: 9; changing to 11. This may result in incorrect timestamps in
> the output file.
> [matroska @ 0x558d3e3fbac0] Writing block of size 230 with pts 458, dts
> 458, duration 42 at relative offset 3190 in cluster at offset 829.
> TrackNumber 1, keyframe 0
> [vost#0:0/copy @ 0x558d3e3fb400] Non-monotonic DTS; previous: 11,
> current: 10; changing to 12. This may result in incorrect timestamps in
> the output file.
> [matroska @ 0x558d3e3fbac0] Writing block of size 230 with pts 500, dts
> 500, duration 42 at relative offset 3427 in cluster at offset 829.
> TrackNumber 1, keyframe 0
> [in#0/matroska,webm @ 0x558d3e3ea740] EOF while reading input
> Terminating thread with return code 0 (success)
> [vost#0:0/copy @ 0x558d3e3fb400] Non-monotonic DTS; previous: 12,
> current: 11; [vost#0:0/copy @ 0x558d3e3fb400] changing to 13. This may
> result in incorrect timestamps in the output file.
> [matroska @ 0x558d3e3fbac0] Writing block of size 232 with pts 667, dts
> 542, duration 42 at relative offset 3664 in cluster at offset 829.
> TrackNumber 1, keyframe 0
> [out#0/tee @ 0x558d3e3f1140] All streams finished
> [out#0/tee @ 0x558d3e3f1140] Terminating thread with return code 0
> (success)
> [matroska @ 0x558d3e3fbac0] end duration = 709
> [matroska @ 0x558d3e3fbac0] stream 0 end duration = 709
> [AVIOContext @ 0x558d3e4de100] Statistics: 4766 bytes written, 0 seeks, 1
> writeouts
> [out#0/tee @ 0x558d3e3f1140] Output file #0 ([f=matroska]out.mkv):
> [out#0/tee @ 0x558d3e3f1140] Output stream #0:0 (video): 14 packets
> muxed (3796 bytes);
> [out#0/tee @ 0x558d3e3f1140] Total: 14 packets (3796 bytes) muxed
> [out#0/tee @ 0x558d3e3f1140] video:4kB audio:0kB subtitle:0kB other
> streams:0kB global headers:0kB muxing overhead: unknown
> size=N/A time=00:00:00.49 bitrate=N/A speed= 556x
> [in#0/matroska,webm @ 0x558d3e3ea740] Input file #0 (test.mkv):
> [in#0/matroska,webm @ 0x558d3e3ea740] Input stream #0:0 (video): 14
> packets read (3796 bytes);
> [in#0/matroska,webm @ 0x558d3e3ea740] Total: 14 packets (3796 bytes)
> demuxed
> [AVIOContext @ 0x558d3e3f3280] Statistics: 4749 bytes read, 0 seeks
> }}}
> - without tee:
> {{{
> ffmpeg started on 2023-12-20 at 21:35:05
> Report written to "ffmpeg-20231220-213505.log"
> Log level: 48
> Command line:
> ffmpeg -report -i test.mkv -map 0 -c copy out.mkv
> ffmpeg version N-113034-g89215237dd Copyright (c) 2000-2023 the FFmpeg
> developers
> built with gcc 13.2.1 (GCC) 20230801
> configuration: --prefix=/usr --disable-debug --disable-static
> --disable-stripping --disable-htmlpages --enable-amf --enable-avisynth
> --enable-cuda-llvm --enable-lto --enable-fontconfig --enable-gmp
> --enable-gnutls --enable-gpl --enable-ladspa --enable-libaom --enable-
> libass --enable-libbluray --enable-libbs2b --enable-libdav1d --enable-
> libdrm --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-
> libiec61883 --enable-libjack --enable-libjxl --enable-libmodplug
> --enable-libmp3lame --enable-libopencore_amrnb --enable-libopencore_amrwb
> --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-
> libpulse --enable-librav1e --enable-librsvg --enable-libsoxr --enable-
> libspeex --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-
> libtheora --enable-libv4l2 --enable-libvidstab --enable-libvmaf --enable-
> libvorbis --enable-libvpl --enable-libvpx --enable-libwebp --enable-
> libx264 --enable-libx265 --enable-libxcb --enable-libxml2 --enable-
> libxvid --enable-libzimg --enable-nvdec --enable-nvenc -- libavutil
> 58. 35.100 / 58. 35.100
> libavcodec 60. 36.100 / 60. 36.100
> libavformat 60. 20.100 / 60. 20.100
> libavdevice 60. 4.100 / 60. 4.100
> libavfilter 9. 14.100 / 9. 14.100
> libswscale 7. 6.100 / 7. 6.100
> libswresample 4. 13.100 / 4. 13.100
> libpostproc 57. 4.100 / 57. 4.100
> Splitting the commandline.
> Reading option '-report' ... matched as option 'report' (generate a
> report) with argument '1'.
> Reading option '-i' ... matched as output url with argument 'test.mkv'.
> Reading option '-map' ... matched as option 'map' (set input stream
> mapping) with argument '0'.
> Reading option '-c' ... matched as option 'c' (codec name) with argument
> 'copy'.
> Reading option 'out.mkv' ... matched as output url.
> Finished splitting the commandline.
> Parsing a group of options: global .
> Applying option report (generate a report) with argument 1.
> Successfully parsed a group of options.
> Parsing a group of options: input url test.mkv.
> Successfully parsed a group of options.
> Opening an input file: test.mkv.
> [AVFormatContext @ 0x5588b7605a00] Opening 'test.mkv' for reading
> [file @ 0x5588b7606080] Setting default whitelist 'file,crypto,data'
> [matroska,webm @ 0x5588b7605a00] Format matroska,webm probed with
> size=2048 and score=100
> st:0 removing common factor 1000000 from timebase
> [matroska,webm @ 0x5588b7605a00] Before avformat_find_stream_info() pos:
> 816 bytes read:4749 seeks:0 nb_streams:1
> [hevc @ 0x5588b7608040] nal_unit_type: 35(AUD), nuh_layer_id: 0,
> temporal_id: 0
> [hevc @ 0x5588b7608040] nal_unit_type: 32(VPS), nuh_layer_id: 0,
> temporal_id: 0
> [hevc @ 0x5588b7608040] nal_unit_type: 33(SPS), nuh_layer_id: 0,
> temporal_id: 0
> [hevc @ 0x5588b7608040] nal_unit_type: 34(PPS), nuh_layer_id: 0,
> temporal_id: 0
> [hevc @ 0x5588b7608040] nal_unit_type: 39(SEI_PREFIX), nuh_layer_id: 0,
> temporal_id: 0
> [hevc @ 0x5588b7608040] nal_unit_type: 39(SEI_PREFIX), nuh_layer_id: 0,
> temporal_id: 0
> [hevc @ 0x5588b7608040] nal_unit_type: 39(SEI_PREFIX), nuh_layer_id: 0,
> temporal_id: 0
> [hevc @ 0x5588b7608040] nal_unit_type: 19(IDR_W_RADL), nuh_layer_id: 0,
> temporal_id: 0
> [hevc @ 0x5588b7608040] nal_unit_type: 19(IDR_W_RADL), nuh_layer_id: 0,
> temporal_id: 0
> [hevc @ 0x5588b7608040] nal_unit_type: 19(IDR_W_RADL), nuh_layer_id: 0,
> temporal_id: 0
> [hevc @ 0x5588b7608040] nal_unit_type: 19(IDR_W_RADL), nuh_layer_id: 0,
> temporal_id: 0
> [hevc @ 0x5588b7608040] nal_unit_type: 40(SEI_SUFFIX), nuh_layer_id: 0,
> temporal_id: 0
> [hevc @ 0x5588b7608040] Decoding VPS
> [hevc @ 0x5588b7608040] Main 10 profile bitstream
> [hevc @ 0x5588b7608040] Decoding SPS
> [hevc @ 0x5588b7608040] Main 10 profile bitstream
> [hevc @ 0x5588b7608040] Decoding VUI
> [hevc @ 0x5588b7608040] Decoding PPS
> [hevc @ 0x5588b7608040] Decoding SEI
> [hevc @ 0x5588b7608040] Decoding SEI
> [hevc @ 0x5588b7608040] Skipped PREFIX SEI 0
> [hevc @ 0x5588b7608040] Decoding SEI
> [hevc @ 0x5588b7608040] Format yuv420p10le chosen by get_format().
> [hevc @ 0x5588b7608040] Decoding SEI
> [hevc @ 0x5588b7608040] Decoded frame with POC 0.
> [matroska,webm @ 0x5588b7605a00] All info found
> [matroska,webm @ 0x5588b7605a00] After avformat_find_stream_info() pos:
> 1687 bytes read:4749 seeks:0 frames:1
> Input #0, matroska,webm, from 'test.mkv':
> Metadata:
> ENCODER : Lavf60.3.100
> Duration: 00:00:00.71, start: 0.000000, bitrate: 53 kb/s
> Stream #0:0(eng), 1, 1/1000: Video: hevc (Main 10), yuv420p10le(tv,
> bt709), 1920x1080 [SAR 1:1 DAR 16:9], 24 fps, 24 tbr, 1k tbn (default)
> (original)
> Metadata:
> BPS : 5329518
> NUMBER_OF_FRAMES: 62522
> NUMBER_OF_BYTES : 1735480512
> _STATISTICS_WRITING_APP: mkvmerge v63.0.0 ('Everything') 64-bit
> _STATISTICS_WRITING_DATE_UTC: 2021-11-22 23:23:46
> _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
> DURATION : 00:00:00.708000000
> Successfully opened the file.
> Parsing a group of options: output url out.mkv.
> Applying option map (set input stream mapping) with argument 0.
> Applying option c (codec name) with argument copy.
> Successfully parsed a group of options.
> Opening an output file: out.mkv.
> [out#0/matroska @ 0x5588b760c140] Adding streams from explicit maps...
> [vost#0:0/copy @ 0x5588b7616400] Created video stream from input stream
> 0:0
> [file @ 0x5588b7608400] Setting default whitelist 'file,crypto,data'
> Successfully opened the file.
> Stream mapping:
> Stream #0:0 -> #0:0 (copy)
> [matroska @ 0x5588b760d980] get_metadata_duration returned: 708000
> [matroska @ 0x5588b760d980] Write early duration from metadata = 708
> Output #0, matroska, to 'out.mkv':
> Metadata:
> encoder : Lavf60.20.100
> Stream #0:0(eng), 0, 1/1000: Video: hevc (Main 10), yuv420p10le(tv,
> bt709), 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 24 fps, 24 tbr, 1k tbn
> (default) (original)
> Metadata:
> BPS : 5329518
> NUMBER_OF_FRAMES: 62522
> NUMBER_OF_BYTES : 1735480512
> _STATISTICS_WRITING_APP: mkvmerge v63.0.0 ('Everything') 64-bit
> _STATISTICS_WRITING_DATE_UTC: 2021-11-22 23:23:46
> _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
> DURATION : 00:00:00.708000000
> [out#0/matroska @ 0x5588b760c140] Starting thread...
> [in#0/matroska,webm @ 0x5588b7605740] Starting thread...
> Press [q] to stop, [?] for help
> [matroska @ 0x5588b760d980] Starting new cluster with timestamp 0 at
> offset 829 bytes
> [matroska @ 0x5588b760d980] Writing block of size 853 with pts 0, dts 0,
> duration 41 at relative offset 9 in cluster at offset 829. TrackNumber 1,
> keyframe 1
> [matroska @ 0x5588b760d980] Writing block of size 222 with pts 167, dts
> 41, duration 41 at relative offset 869 in cluster at offset 829.
> TrackNumber 1, keyframe 0
> [matroska @ 0x5588b760d980] Writing block of size 223 with pts 83, dts
> 82, duration 41 at relative offset 1098 in cluster at offset 829.
> TrackNumber 1, keyframe 0
> [matroska @ 0x5588b760d980] Writing block of size 223 with pts 82, dts
> 82, duration 41 at relative offset 1328 in cluster at offset 829.
> TrackNumber 1, keyframe 0
> [matroska @ 0x5588b760d980] Writing block of size 223 with pts 125, dts
> 83, duration 41 at relative offset 1558 in cluster at offset 829.
> TrackNumber 1, keyframe 0
> [matroska @ 0x5588b760d980] Writing block of size 232 with pts 333, dts
> 125, duration 41 at relative offset 1788 in cluster at offset 829.
> TrackNumber 1, keyframe 0
> [matroska @ 0x5588b760d980] Writing block of size 222 with pts 250, dts
> 167, duration 41 at relative offset 2027 in cluster at offset 829.
> TrackNumber 1, keyframe 0
> [matroska @ 0x5588b760d980] Writing block of size 222 with pts 208, dts
> 208, duration 41 at relative offset 2256 in cluster at offset 829.
> TrackNumber 1, keyframe 0
> [matroska @ 0x5588b760d980] Writing block of size 222 with pts 292, dts
> 250, duration 41 at relative offset 2485 in cluster at offset 829.
> TrackNumber 1, keyframe 0
> [matroska @ 0x5588b760d980] Writing block of size 232 with pts 500, dts
> 292, duration 41 at relative offset 2714 in cluster at offset 829.
> TrackNumber 1, keyframe 0
> [matroska @ 0x5588b760d980] Writing block of size 230 with pts 417, dts
> 333, duration 41 at relative offset 2953 in cluster at offset 829.
> TrackNumber 1, keyframe 0
> [matroska @ 0x5588b760d980] Writing block of size 230 with pts 375, dts
> 375, duration 41 at relative offset 3190 in cluster at offset 829.
> TrackNumber 1, keyframe 0
> [matroska @ 0x5588b760d980] Writing block of size 230 with pts 458, dts
> 417, duration 41 at relative offset 3427 in cluster at offset 829.
> TrackNumber 1, keyframe 0
> [matroska @ 0x5588b760d980] Writing block of size 232 with pts 667, dts
> 458, duration 41 at relative offset 3664 in cluster at offset 829.
> TrackNumber 1, keyframe 0
> [in#0/matroska,webm @ 0x5588b7605740] EOF while reading input
> [in#0/matroska,webm @ 0x5588b7605740] Terminating thread with return code
> 0 (success)
> [out#0/matroska @ 0x5588b760c140] All streams finished
> [out#0/matroska @ 0x5588b760c140] Terminating thread with return code 0
> (success)
> [matroska @ 0x5588b760d980] end duration = 708
> [matroska @ 0x5588b760d980] stream 0 end duration = 708
> [AVIOContext @ 0x5588b76f9100] Statistics: 4766 bytes written, 0 seeks, 1
> writeouts
> [out#0/matroska @ 0x5588b760c140] Output file #0 (out.mkv):
> [out#0/matroska @ 0x5588b760c140] Output stream #0:0 (video): 14
> packets muxed (3796 bytes);
> [out#0/matroska @ 0x5588b760c140] Total: 14 packets (3796 bytes) muxed
> [out#0/matroska @ 0x5588b760c140] video:4kB audio:0kB subtitle:0kB other
> streams:0kB global headers:0kB muxing overhead: 25.553214%
> size= 5kB time=00:00:00.49 bitrate= 76.4kbits/s speed= 698x
> [in#0/matroska,webm @ 0x5588b7605740] Input file #0 (test.mkv):
> [in#0/matroska,webm @ 0x5588b7605740] Input stream #0:0 (video): 14
> packets read (3796 bytes);
> [in#0/matroska,webm @ 0x5588b7605740] Total: 14 packets (3796 bytes)
> demuxed
> [AVIOContext @ 0x5588b760e280] Statistics: 4749 bytes read, 0 seeks
> }}}
New description:
Summary of the bug:
When using ffmpeg to copy a stream which has some error in the DTS
ordering, normally this error will be fixed for that single timestamp,
result in a single warning and cause no further issues. E.g.
{{{#!bash
ffmpeg -i test.mkv -map 0 -c copy out.mkv
}}}
However, when doing the exact same thing but via the tee muxer
{{{#!bash
ffmpeg -i test.mkv -map 0 -c copy -f tee '[f=matroska]out.mkv'
}}}
all timestamps get broken and an offset is created in the file.
Tested with latest git version, as well as with current Ubuntu 22.04 and
Archlinux.
You can find a small example file attached.
Logs:
- with tee:
{{{
ffmpeg started on 2023-12-20 at 21:34:29
Report written to "ffmpeg-20231220-213429.log"
Log level: 48
Command line:
ffmpeg -report -i test.mkv -map 0 -c copy -f tee "[f=matroska]out.mkv"
ffmpeg version N-113034-g89215237dd Copyright (c) 2000-2023 the FFmpeg
developers
built with gcc 13.2.1 (GCC) 20230801
configuration: --prefix=/usr --disable-debug --disable-static --disable-
stripping --disable-htmlpages --enable-amf --enable-avisynth --enable-
cuda-llvm --enable-lto --enable-fontconfig --enable-gmp --enable-gnutls
--enable-gpl --enable-ladspa --enable-libaom --enable-libass --enable-
libbluray --enable-libbs2b --enable-libdav1d --enable-libdrm --enable-
libfreetype --enable-libfribidi --enable-libgsm --enable-libiec61883
--enable-libjack --enable-libjxl --enable-libmodplug --enable-libmp3lame
--enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libopenjpeg
--enable-libopenmpt --enable-libopus --enable-libpulse --enable-librav1e
--enable-librsvg --enable-libsoxr --enable-libspeex --enable-libsrt
--enable-libssh --enable-libsvtav1 --enable-libtheora --enable-libv4l2
--enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpl
--enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265
--enable-libxcb --enable-libxml2 --enable-libxvid --enable-libzimg
--enable-nvdec --enable-nvenc -- libavutil 58. 35.100 / 58. 35.100
libavcodec 60. 36.100 / 60. 36.100
libavformat 60. 20.100 / 60. 20.100
libavdevice 60. 4.100 / 60. 4.100
libavfilter 9. 14.100 / 9. 14.100
libswscale 7. 6.100 / 7. 6.100
libswresample 4. 13.100 / 4. 13.100
libpostproc 57. 4.100 / 57. 4.100
Splitting the commandline.
Reading option '-report' ... matched as option 'report' (generate a
report) with argument '1'.
Reading option '-i' ... matched as output url with argument 'test.mkv'.
Reading option '-map' ... matched as option 'map' (set input stream
mapping) with argument '0'.
Reading option '-c' ... matched as option 'c' (codec name) with argument
'copy'.
Reading option '-f' ... matched as option 'f' (force format) with argument
'tee'.
Reading option '[f=matroska]out.mkv' ... matched as output url.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option report (generate a report) with argument 1.
Successfully parsed a group of options.
Parsing a group of options: input url test.mkv.
Successfully parsed a group of options.
Opening an input file: test.mkv.
[AVFormatContext @ 0x558d3e3eaa00] Opening 'test.mkv' for reading
[file @ 0x558d3e3eb080] Setting default whitelist 'file,crypto,data'
[matroska,webm @ 0x558d3e3eaa00] Format matroska,webm probed with
size=2048 and score=100
st:0 removing common factor 1000000 from timebase
[matroska,webm @ 0x558d3e3eaa00] Before avformat_find_stream_info() pos:
816 bytes read:4749 seeks:0 nb_streams:1
[hevc @ 0x558d3e3ed040] nal_unit_type: 35(AUD), nuh_layer_id: 0,
temporal_id: 0
[hevc @ 0x558d3e3ed040] nal_unit_type: 32(VPS), nuh_layer_id: 0,
temporal_id: 0
[hevc @ 0x558d3e3ed040] nal_unit_type: 33(SPS), nuh_layer_id: 0,
temporal_id: 0
[hevc @ 0x558d3e3ed040] nal_unit_type: 34(PPS), nuh_layer_id: 0,
temporal_id: 0
[hevc @ 0x558d3e3ed040] nal_unit_type: 39(SEI_PREFIX), nuh_layer_id: 0,
temporal_id: 0
[hevc @ 0x558d3e3ed040] nal_unit_type: 39(SEI_PREFIX), nuh_layer_id: 0,
temporal_id: 0
[hevc @ 0x558d3e3ed040] nal_unit_type: 39(SEI_PREFIX), nuh_layer_id: 0,
temporal_id: 0
[hevc @ 0x558d3e3ed040] nal_unit_type: 19(IDR_W_RADL), nuh_layer_id: 0,
temporal_id: 0
[hevc @ 0x558d3e3ed040] nal_unit_type: 19(IDR_W_RADL), nuh_layer_id: 0,
temporal_id: 0
[hevc @ 0x558d3e3ed040] nal_unit_type: 19(IDR_W_RADL), nuh_layer_id: 0,
temporal_id: 0
[hevc @ 0x558d3e3ed040] nal_unit_type: 19(IDR_W_RADL), nuh_layer_id: 0,
temporal_id: 0
[hevc @ 0x558d3e3ed040] nal_unit_type: 40(SEI_SUFFIX), nuh_layer_id: 0,
temporal_id: 0
[hevc @ 0x558d3e3ed040] Decoding VPS
[hevc @ 0x558d3e3ed040] Main 10 profile bitstream
[hevc @ 0x558d3e3ed040] Decoding SPS
[hevc @ 0x558d3e3ed040] Main 10 profile bitstream
[hevc @ 0x558d3e3ed040] Decoding VUI
[hevc @ 0x558d3e3ed040] Decoding PPS
[hevc @ 0x558d3e3ed040] Decoding SEI
[hevc @ 0x558d3e3ed040] Decoding SEI
[hevc @ 0x558d3e3ed040] Skipped PREFIX SEI 0
[hevc @ 0x558d3e3ed040] Decoding SEI
[hevc @ 0x558d3e3ed040] Format yuv420p10le chosen by get_format().
[hevc @ 0x558d3e3ed040] Decoding SEI
[hevc @ 0x558d3e3ed040] Decoded frame with POC 0.
[matroska,webm @ 0x558d3e3eaa00] All info found
[matroska,webm @ 0x558d3e3eaa00] After avformat_find_stream_info() pos:
1687 bytes read:4749 seeks:0 frames:1
Input #0, matroska,webm, from 'test.mkv':
Metadata:
ENCODER : Lavf60.3.100
Duration: 00:00:00.71, start: 0.000000, bitrate: 53 kb/s
Stream #0:0(eng), 1, 1/1000: Video: hevc (Main 10), yuv420p10le(tv,
bt709), 1920x1080 [SAR 1:1 DAR 16:9], 24 fps, 24 tbr, 1k tbn (default)
(original)
Metadata:
BPS : 5329518
NUMBER_OF_FRAMES: 62522
NUMBER_OF_BYTES : 1735480512
_STATISTICS_WRITING_APP: mkvmerge v63.0.0 ('Everything') 64-bit
_STATISTICS_WRITING_DATE_UTC: 2021-11-22 23:23:46
_STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
DURATION : 00:00:00.708000000
Successfully opened the file.
Parsing a group of options: output url [f=matroska]out.mkv.
Applying option map (set input stream mapping) with argument 0.
Applying option c (codec name) with argument copy.
Applying option f (force format) with argument tee.
Successfully parsed a group of options.
Opening an output file: [f=matroska]out.mkv.
[out#0/tee @ 0x558d3e3f1140] Adding streams from explicit maps...
[vost#0:0/copy @ 0x558d3e3fb400] Created video stream from input stream
0:0
Successfully opened the file.
Stream mapping:
Stream #0:0 -> #0:0 (copy)
[matroska @ 0x558d3e3fbac0] Opening 'out.mkv' for writing
[file @ 0x558d3e3fc340] Setting default whitelist 'file,crypto,data'
[matroska @ 0x558d3e3fbac0] get_metadata_duration returned: 708000
[matroska @ 0x558d3e3fbac0] Write early duration from metadata = 708
[tee @ 0x558d3e3f2980] filename:'out.mkv' format:matroska
[tee @ 0x558d3e3f2980] stream:0 codec:hevc type:video bsfs: null
Output #0, tee, to '[f=matroska]out.mkv':
Metadata:
encoder : Lavf60.20.100
Stream #0:0(eng), 0, 1/24: Video: hevc (Main 10), yuv420p10le(tv,
bt709), 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 24 fps, 24 tbr, 24 tbn
(default) (original)
Metadata:
BPS : 5329518
NUMBER_OF_FRAMES: 62522
NUMBER_OF_BYTES : 1735480512
_STATISTICS_WRITING_APP: mkvmerge v63.0.0 ('Everything') 64-bit
_STATISTICS_WRITING_DATE_UTC: 2021-11-22 23:23:46
_STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
DURATION : 00:00:00.708000000
[out#0/tee @ 0x558d3e3f1140] Starting thread...
[in#0/matroska,webm @ 0x558d3e3ea740] Starting thread...
Press [q] to stop, [?] for help
[matroska @ 0x558d3e3fbac0] Starting new cluster with timestamp 0 at
offset 829 bytes
[matroska @ 0x558d3e3fbac0] Writing block of size 853 with pts 0, dts 0,
duration 42 at relative offset 9 in cluster at offset 829. TrackNumber 1,
keyframe 1
[matroska @ 0x558d3e3fbac0] Writing block of size 222 with pts 167, dts
42, duration 42 at relative offset 869 in cluster at offset 829.
TrackNumber 1, keyframe 0
[matroska @ 0x558d3e3fbac0] Writing block of size 223 with pts 83, dts 83,
duration 42 at relative offset 1098 in cluster at offset 829. TrackNumber
1, keyframe 0
[vost#0:0/copy @ 0x558d3e3fb400] Non-monotonic DTS; previous: 2, current:
2; changing to 3. This may result in incorrect timestamps in the output
file.
[matroska @ 0x558d3e3fbac0] Writing block of size 223 with pts 125, dts
125, duration 42 at relative offset 1328 in cluster at offset 829.
TrackNumber 1, keyframe 0
[vost#0:0/copy @ 0x558d3e3fb400] Non-monotonic DTS; previous: 3, current:
2; changing to 4. This may result in incorrect timestamps in the output
file.
[matroska @ 0x558d3e3fbac0] Writing block of size 223 with pts 167, dts
167, duration 42 at relative offset 1558 in cluster at offset 829.
TrackNumber 1, keyframe 0
[vost#0:0/copy @ 0x558d3e3fb400] Non-monotonic DTS; previous: 4, current:
3; changing to 5. This may result in incorrect timestamps in the output
file.
[matroska @ 0x558d3e3fbac0] Writing block of size 232 with pts 333, dts
208, duration 42 at relative offset 1788 in cluster at offset 829.
TrackNumber 1, keyframe 0
[vost#0:0/copy @ 0x558d3e3fb400] Non-monotonic DTS; previous: 5, current:
4; changing to 6. This may result in incorrect timestamps in the output
file.
[matroska @ 0x558d3e3fbac0] Writing block of size 222 with pts 250, dts
250, duration 42 at relative offset 2027 in cluster at offset 829.
TrackNumber 1, keyframe 0
[vost#0:0/copy @ 0x558d3e3fb400] Non-monotonic DTS; previous: 6, current:
5; changing to 7. This may result in incorrect timestamps in the output
file.
[matroska @ 0x558d3e3fbac0] Writing block of size 222 with pts 292, dts
292, duration 42 at relative offset 2256 in cluster at offset 829.
TrackNumber 1, keyframe 0
[vost#0:0/copy @ 0x558d3e3fb400] Non-monotonic DTS; previous: 7, current:
6; changing to 8. This may result in incorrect timestamps in the output
file.
[matroska @ 0x558d3e3fbac0] Writing block of size 222 with pts 333, dts
333, duration 42 at relative offset 2485 in cluster at offset 829.
TrackNumber 1, keyframe 0
[vost#0:0/copy @ 0x558d3e3fb400] Non-monotonic DTS; previous: 8, current:
7; changing to 9. This may result in incorrect timestamps in the output
file.
[matroska @ 0x558d3e3fbac0] Writing block of size 232 with pts 500, dts
375, duration 42 at relative offset 2714 in cluster at offset 829.
TrackNumber 1, keyframe 0
[vost#0:0/copy @ 0x558d3e3fb400] Non-monotonic DTS; previous: 9, current:
8; changing to 10. This may result in incorrect timestamps in the output
file.
[matroska @ 0x558d3e3fbac0] Writing block of size 230 with pts 417, dts
417, duration 42 at relative offset 2953 in cluster at offset 829.
TrackNumber 1, keyframe 0
[vost#0:0/copy @ 0x558d3e3fb400] Non-monotonic DTS; previous: 10, current:
9; changing to 11. This may result in incorrect timestamps in the output
file.
[matroska @ 0x558d3e3fbac0] Writing block of size 230 with pts 458, dts
458, duration 42 at relative offset 3190 in cluster at offset 829.
TrackNumber 1, keyframe 0
[vost#0:0/copy @ 0x558d3e3fb400] Non-monotonic DTS; previous: 11, current:
10; changing to 12. This may result in incorrect timestamps in the output
file.
[matroska @ 0x558d3e3fbac0] Writing block of size 230 with pts 500, dts
500, duration 42 at relative offset 3427 in cluster at offset 829.
TrackNumber 1, keyframe 0
[in#0/matroska,webm @ 0x558d3e3ea740] EOF while reading input
Terminating thread with return code 0 (success)
[vost#0:0/copy @ 0x558d3e3fb400] Non-monotonic DTS; previous: 12, current:
11; [vost#0:0/copy @ 0x558d3e3fb400] changing to 13. This may result in
incorrect timestamps in the output file.
[matroska @ 0x558d3e3fbac0] Writing block of size 232 with pts 667, dts
542, duration 42 at relative offset 3664 in cluster at offset 829.
TrackNumber 1, keyframe 0
[out#0/tee @ 0x558d3e3f1140] All streams finished
[out#0/tee @ 0x558d3e3f1140] Terminating thread with return code 0
(success)
[matroska @ 0x558d3e3fbac0] end duration = 709
[matroska @ 0x558d3e3fbac0] stream 0 end duration = 709
[AVIOContext @ 0x558d3e4de100] Statistics: 4766 bytes written, 0 seeks, 1
writeouts
[out#0/tee @ 0x558d3e3f1140] Output file #0 ([f=matroska]out.mkv):
[out#0/tee @ 0x558d3e3f1140] Output stream #0:0 (video): 14 packets
muxed (3796 bytes);
[out#0/tee @ 0x558d3e3f1140] Total: 14 packets (3796 bytes) muxed
[out#0/tee @ 0x558d3e3f1140] video:4kB audio:0kB subtitle:0kB other
streams:0kB global headers:0kB muxing overhead: unknown
size=N/A time=00:00:00.49 bitrate=N/A speed= 556x
[in#0/matroska,webm @ 0x558d3e3ea740] Input file #0 (test.mkv):
[in#0/matroska,webm @ 0x558d3e3ea740] Input stream #0:0 (video): 14
packets read (3796 bytes);
[in#0/matroska,webm @ 0x558d3e3ea740] Total: 14 packets (3796 bytes)
demuxed
[AVIOContext @ 0x558d3e3f3280] Statistics: 4749 bytes read, 0 seeks
}}}
- without tee:
{{{
ffmpeg started on 2023-12-20 at 21:35:05
Report written to "ffmpeg-20231220-213505.log"
Log level: 48
Command line:
ffmpeg -report -i test.mkv -map 0 -c copy out.mkv
ffmpeg version N-113034-g89215237dd Copyright (c) 2000-2023 the FFmpeg
developers
built with gcc 13.2.1 (GCC) 20230801
configuration: --prefix=/usr --disable-debug --disable-static --disable-
stripping --disable-htmlpages --enable-amf --enable-avisynth --enable-
cuda-llvm --enable-lto --enable-fontconfig --enable-gmp --enable-gnutls
--enable-gpl --enable-ladspa --enable-libaom --enable-libass --enable-
libbluray --enable-libbs2b --enable-libdav1d --enable-libdrm --enable-
libfreetype --enable-libfribidi --enable-libgsm --enable-libiec61883
--enable-libjack --enable-libjxl --enable-libmodplug --enable-libmp3lame
--enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libopenjpeg
--enable-libopenmpt --enable-libopus --enable-libpulse --enable-librav1e
--enable-librsvg --enable-libsoxr --enable-libspeex --enable-libsrt
--enable-libssh --enable-libsvtav1 --enable-libtheora --enable-libv4l2
--enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpl
--enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265
--enable-libxcb --enable-libxml2 --enable-libxvid --enable-libzimg
--enable-nvdec --enable-nvenc -- libavutil 58. 35.100 / 58. 35.100
libavcodec 60. 36.100 / 60. 36.100
libavformat 60. 20.100 / 60. 20.100
libavdevice 60. 4.100 / 60. 4.100
libavfilter 9. 14.100 / 9. 14.100
libswscale 7. 6.100 / 7. 6.100
libswresample 4. 13.100 / 4. 13.100
libpostproc 57. 4.100 / 57. 4.100
Splitting the commandline.
Reading option '-report' ... matched as option 'report' (generate a
report) with argument '1'.
Reading option '-i' ... matched as output url with argument 'test.mkv'.
Reading option '-map' ... matched as option 'map' (set input stream
mapping) with argument '0'.
Reading option '-c' ... matched as option 'c' (codec name) with argument
'copy'.
Reading option 'out.mkv' ... matched as output url.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option report (generate a report) with argument 1.
Successfully parsed a group of options.
Parsing a group of options: input url test.mkv.
Successfully parsed a group of options.
Opening an input file: test.mkv.
[AVFormatContext @ 0x5588b7605a00] Opening 'test.mkv' for reading
[file @ 0x5588b7606080] Setting default whitelist 'file,crypto,data'
[matroska,webm @ 0x5588b7605a00] Format matroska,webm probed with
size=2048 and score=100
st:0 removing common factor 1000000 from timebase
[matroska,webm @ 0x5588b7605a00] Before avformat_find_stream_info() pos:
816 bytes read:4749 seeks:0 nb_streams:1
[hevc @ 0x5588b7608040] nal_unit_type: 35(AUD), nuh_layer_id: 0,
temporal_id: 0
[hevc @ 0x5588b7608040] nal_unit_type: 32(VPS), nuh_layer_id: 0,
temporal_id: 0
[hevc @ 0x5588b7608040] nal_unit_type: 33(SPS), nuh_layer_id: 0,
temporal_id: 0
[hevc @ 0x5588b7608040] nal_unit_type: 34(PPS), nuh_layer_id: 0,
temporal_id: 0
[hevc @ 0x5588b7608040] nal_unit_type: 39(SEI_PREFIX), nuh_layer_id: 0,
temporal_id: 0
[hevc @ 0x5588b7608040] nal_unit_type: 39(SEI_PREFIX), nuh_layer_id: 0,
temporal_id: 0
[hevc @ 0x5588b7608040] nal_unit_type: 39(SEI_PREFIX), nuh_layer_id: 0,
temporal_id: 0
[hevc @ 0x5588b7608040] nal_unit_type: 19(IDR_W_RADL), nuh_layer_id: 0,
temporal_id: 0
[hevc @ 0x5588b7608040] nal_unit_type: 19(IDR_W_RADL), nuh_layer_id: 0,
temporal_id: 0
[hevc @ 0x5588b7608040] nal_unit_type: 19(IDR_W_RADL), nuh_layer_id: 0,
temporal_id: 0
[hevc @ 0x5588b7608040] nal_unit_type: 19(IDR_W_RADL), nuh_layer_id: 0,
temporal_id: 0
[hevc @ 0x5588b7608040] nal_unit_type: 40(SEI_SUFFIX), nuh_layer_id: 0,
temporal_id: 0
[hevc @ 0x5588b7608040] Decoding VPS
[hevc @ 0x5588b7608040] Main 10 profile bitstream
[hevc @ 0x5588b7608040] Decoding SPS
[hevc @ 0x5588b7608040] Main 10 profile bitstream
[hevc @ 0x5588b7608040] Decoding VUI
[hevc @ 0x5588b7608040] Decoding PPS
[hevc @ 0x5588b7608040] Decoding SEI
[hevc @ 0x5588b7608040] Decoding SEI
[hevc @ 0x5588b7608040] Skipped PREFIX SEI 0
[hevc @ 0x5588b7608040] Decoding SEI
[hevc @ 0x5588b7608040] Format yuv420p10le chosen by get_format().
[hevc @ 0x5588b7608040] Decoding SEI
[hevc @ 0x5588b7608040] Decoded frame with POC 0.
[matroska,webm @ 0x5588b7605a00] All info found
[matroska,webm @ 0x5588b7605a00] After avformat_find_stream_info() pos:
1687 bytes read:4749 seeks:0 frames:1
Input #0, matroska,webm, from 'test.mkv':
Metadata:
ENCODER : Lavf60.3.100
Duration: 00:00:00.71, start: 0.000000, bitrate: 53 kb/s
Stream #0:0(eng), 1, 1/1000: Video: hevc (Main 10), yuv420p10le(tv,
bt709), 1920x1080 [SAR 1:1 DAR 16:9], 24 fps, 24 tbr, 1k tbn (default)
(original)
Metadata:
BPS : 5329518
NUMBER_OF_FRAMES: 62522
NUMBER_OF_BYTES : 1735480512
_STATISTICS_WRITING_APP: mkvmerge v63.0.0 ('Everything') 64-bit
_STATISTICS_WRITING_DATE_UTC: 2021-11-22 23:23:46
_STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
DURATION : 00:00:00.708000000
Successfully opened the file.
Parsing a group of options: output url out.mkv.
Applying option map (set input stream mapping) with argument 0.
Applying option c (codec name) with argument copy.
Successfully parsed a group of options.
Opening an output file: out.mkv.
[out#0/matroska @ 0x5588b760c140] Adding streams from explicit maps...
[vost#0:0/copy @ 0x5588b7616400] Created video stream from input stream
0:0
[file @ 0x5588b7608400] Setting default whitelist 'file,crypto,data'
Successfully opened the file.
Stream mapping:
Stream #0:0 -> #0:0 (copy)
[matroska @ 0x5588b760d980] get_metadata_duration returned: 708000
[matroska @ 0x5588b760d980] Write early duration from metadata = 708
Output #0, matroska, to 'out.mkv':
Metadata:
encoder : Lavf60.20.100
Stream #0:0(eng), 0, 1/1000: Video: hevc (Main 10), yuv420p10le(tv,
bt709), 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 24 fps, 24 tbr, 1k tbn
(default) (original)
Metadata:
BPS : 5329518
NUMBER_OF_FRAMES: 62522
NUMBER_OF_BYTES : 1735480512
_STATISTICS_WRITING_APP: mkvmerge v63.0.0 ('Everything') 64-bit
_STATISTICS_WRITING_DATE_UTC: 2021-11-22 23:23:46
_STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
DURATION : 00:00:00.708000000
[out#0/matroska @ 0x5588b760c140] Starting thread...
[in#0/matroska,webm @ 0x5588b7605740] Starting thread...
Press [q] to stop, [?] for help
[matroska @ 0x5588b760d980] Starting new cluster with timestamp 0 at
offset 829 bytes
[matroska @ 0x5588b760d980] Writing block of size 853 with pts 0, dts 0,
duration 41 at relative offset 9 in cluster at offset 829. TrackNumber 1,
keyframe 1
[matroska @ 0x5588b760d980] Writing block of size 222 with pts 167, dts
41, duration 41 at relative offset 869 in cluster at offset 829.
TrackNumber 1, keyframe 0
[matroska @ 0x5588b760d980] Writing block of size 223 with pts 83, dts 82,
duration 41 at relative offset 1098 in cluster at offset 829. TrackNumber
1, keyframe 0
[matroska @ 0x5588b760d980] Writing block of size 223 with pts 82, dts 82,
duration 41 at relative offset 1328 in cluster at offset 829. TrackNumber
1, keyframe 0
[matroska @ 0x5588b760d980] Writing block of size 223 with pts 125, dts
83, duration 41 at relative offset 1558 in cluster at offset 829.
TrackNumber 1, keyframe 0
[matroska @ 0x5588b760d980] Writing block of size 232 with pts 333, dts
125, duration 41 at relative offset 1788 in cluster at offset 829.
TrackNumber 1, keyframe 0
[matroska @ 0x5588b760d980] Writing block of size 222 with pts 250, dts
167, duration 41 at relative offset 2027 in cluster at offset 829.
TrackNumber 1, keyframe 0
[matroska @ 0x5588b760d980] Writing block of size 222 with pts 208, dts
208, duration 41 at relative offset 2256 in cluster at offset 829.
TrackNumber 1, keyframe 0
[matroska @ 0x5588b760d980] Writing block of size 222 with pts 292, dts
250, duration 41 at relative offset 2485 in cluster at offset 829.
TrackNumber 1, keyframe 0
[matroska @ 0x5588b760d980] Writing block of size 232 with pts 500, dts
292, duration 41 at relative offset 2714 in cluster at offset 829.
TrackNumber 1, keyframe 0
[matroska @ 0x5588b760d980] Writing block of size 230 with pts 417, dts
333, duration 41 at relative offset 2953 in cluster at offset 829.
TrackNumber 1, keyframe 0
[matroska @ 0x5588b760d980] Writing block of size 230 with pts 375, dts
375, duration 41 at relative offset 3190 in cluster at offset 829.
TrackNumber 1, keyframe 0
[matroska @ 0x5588b760d980] Writing block of size 230 with pts 458, dts
417, duration 41 at relative offset 3427 in cluster at offset 829.
TrackNumber 1, keyframe 0
[matroska @ 0x5588b760d980] Writing block of size 232 with pts 667, dts
458, duration 41 at relative offset 3664 in cluster at offset 829.
TrackNumber 1, keyframe 0
[in#0/matroska,webm @ 0x5588b7605740] EOF while reading input
[in#0/matroska,webm @ 0x5588b7605740] Terminating thread with return code
0 (success)
[out#0/matroska @ 0x5588b760c140] All streams finished
[out#0/matroska @ 0x5588b760c140] Terminating thread with return code 0
(success)
[matroska @ 0x5588b760d980] end duration = 708
[matroska @ 0x5588b760d980] stream 0 end duration = 708
[AVIOContext @ 0x5588b76f9100] Statistics: 4766 bytes written, 0 seeks, 1
writeouts
[out#0/matroska @ 0x5588b760c140] Output file #0 (out.mkv):
[out#0/matroska @ 0x5588b760c140] Output stream #0:0 (video): 14 packets
muxed (3796 bytes);
[out#0/matroska @ 0x5588b760c140] Total: 14 packets (3796 bytes) muxed
[out#0/matroska @ 0x5588b760c140] video:4kB audio:0kB subtitle:0kB other
streams:0kB global headers:0kB muxing overhead: 25.553214%
size= 5kB time=00:00:00.49 bitrate= 76.4kbits/s speed= 698x
[in#0/matroska,webm @ 0x5588b7605740] Input file #0 (test.mkv):
[in#0/matroska,webm @ 0x5588b7605740] Input stream #0:0 (video): 14
packets read (3796 bytes);
[in#0/matroska,webm @ 0x5588b7605740] Total: 14 packets (3796 bytes)
demuxed
[AVIOContext @ 0x5588b760e280] Statistics: 4749 bytes read, 0 seeks
}}}
--
--
Ticket URL: <https://trac.ffmpeg.org/ticket/10750#comment:1>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list