#7558(undetermined:new): Ignore coded resolutions in using -c:v copy?
#7558: Ignore coded resolutions in using -c:v copy? -------------------------------------+------------------------------------- Reporter: ponpon | Type: defect Status: new | Priority: normal Component: | Version: undetermined | unspecified Keywords: | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | -------------------------------------+------------------------------------- A coded resolution is {{{1920x1080 (0x0)}}} in using {{{-c:v copy}}}. Does it mean that coded resolutions is ignored? I don't know if it makes an effect on output files. A source file is 1080.mp of ticket #7544. {{{ ffmpeg -y -v debug -i 1080.mp4 -c:v copy test.mp4 ffmpeg version N-92458-gfc94e9704e Copyright (c) 2000-2018 the FFmpeg developers built with clang version 5.0.2 (tags/RELEASE_502/final) configuration: --prefix=/sw --cc=clang-mp-5.0 --cxx=clang++-mp-5.0 --disable-shared --enable-static --enable-gpl --enable-version3 --enable- nonfree --enable-pthreads --optflags=-Ofast --extra-cflags='-I/sw/include -I/opt/local/include ' --extra-ldflags=' -L/sw/lib -L/opt/local/lib -fopenmp' --extra-ldsoflags='-L/sw/lib -L/opt/local/lib -static--target- os=darwin' --arch=x86_64 --cpu=kabylake --enable-avresample --enable- libfdk-aac --enable-libmp3lame --enable-libopencore_amrnb --enable- libopencore_amrwb --enable-libopenjpeg --enable-libopus --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libxvid --enable-libfreetype --enable-gcrypt --enable-gmp --enable-openssl --enable-librtmp --enable-libass --enable- fontconfig --enable-libfribidi --enable-libbluray --enable-libdc1394 --enable-libmodplug --enable-lzma --enable-libx264 --enable-libx265 --enable-libzimg --enable-libvidstab --enable-libsoxr --enable- libsmbclient --enable-libcdio --enable-opengl --enable-opencl --pkg- config-flags=' --libs --static' libavutil 56. 23.101 / 56. 23.101 libavcodec 58. 39.100 / 58. 39.100 libavformat 58. 22.100 / 58. 22.100 libavdevice 58. 6.100 / 58. 6.100 libavfilter 7. 44.100 / 7. 44.100 libavresample 4. 0. 0 / 4. 0. 0 libswscale 5. 4.100 / 5. 4.100 libswresample 3. 4.100 / 3. 4.100 libpostproc 55. 4.100 / 55. 4.100 Splitting the commandline. Reading option '-y' ... matched as option 'y' (overwrite output files) with argument '1'. Reading option '-v' ... matched as option 'v' (set logging level) with argument 'debug'. Reading option '-i' ... matched as input url with argument '1080.mp4'. Reading option '-c:v' ... matched as option 'c' (codec name) with argument 'copy'. Reading option 'test.mp4' ... matched as output url. Finished splitting the commandline. Parsing a group of options: global . Applying option y (overwrite output files) with argument 1. Applying option v (set logging level) with argument debug. Successfully parsed a group of options. Parsing a group of options: input url 1080.mp4. Successfully parsed a group of options. Opening an input file: 1080.mp4. [NULL @ 0x7fec31011200] Opening '1080.mp4' for reading [file @ 0x7fec30c1de80] Setting default whitelist 'file,crypto' [mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fec31011200] Format mov,mp4,m4a,3gp,3g2,mj2 probed with size=2048 and score=100 [mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fec31011200] ISO: File Type Major Brand: isom [mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fec31011200] Unknown dref type 0x206c7275 size 12 [mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fec31011200] Processing st: 0, edit list 0 - media time: 1024, duration: 12800 [mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fec31011200] stts: 0 ctts: 1024, ctts_index: 0, ctts_count: 25 [mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fec31011200] stts: 512 ctts: 2560, ctts_index: 1, ctts_count: 25 [mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fec31011200] stts: 1024 ctts: 1024, ctts_index: 2, ctts_count: 25 [mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fec31011200] stts: 1536 ctts: 0, ctts_index: 3, ctts_count: 25 [mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fec31011200] stts: 2048 ctts: 512, ctts_index: 4, ctts_count: 25 [mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fec31011200] stts: 2560 ctts: 2560, ctts_index: 5, ctts_count: 25 [mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fec31011200] stts: 3072 ctts: 1024, ctts_index: 6, ctts_count: 25 [mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fec31011200] stts: 3584 ctts: 0, ctts_index: 7, ctts_count: 25 [mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fec31011200] stts: 4096 ctts: 512, ctts_index: 8, ctts_count: 25 [mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fec31011200] stts: 4608 ctts: 2560, ctts_index: 9, ctts_count: 25 [mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fec31011200] stts: 5120 ctts: 1024, ctts_index: 10, ctts_count: 25 [mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fec31011200] stts: 5632 ctts: 0, ctts_index: 11, ctts_count: 25 [mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fec31011200] stts: 6144 ctts: 512, ctts_index: 12, ctts_count: 25 [mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fec31011200] stts: 6656 ctts: 2560, ctts_index: 13, ctts_count: 25 [mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fec31011200] stts: 7168 ctts: 1024, ctts_index: 14, ctts_count: 25 [mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fec31011200] stts: 7680 ctts: 0, ctts_index: 15, ctts_count: 25 [mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fec31011200] stts: 8192 ctts: 512, ctts_index: 16, ctts_count: 25 [mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fec31011200] stts: 8704 ctts: 2560, ctts_index: 17, ctts_count: 25 [mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fec31011200] stts: 9216 ctts: 1024, ctts_index: 18, ctts_count: 25 [mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fec31011200] stts: 9728 ctts: 0, ctts_index: 19, ctts_count: 25 [mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fec31011200] stts: 10240 ctts: 512, ctts_index: 20, ctts_count: 25 [mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fec31011200] stts: 10752 ctts: 2560, ctts_index: 21, ctts_count: 25 [mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fec31011200] stts: 11264 ctts: 1024, ctts_index: 22, ctts_count: 25 [mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fec31011200] stts: 11776 ctts: 0, ctts_index: 23, ctts_count: 25 [mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fec31011200] stts: 12288 ctts: 512, ctts_index: 24, ctts_count: 25 [mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fec31011200] Offset DTS by 1024 to make first pts zero. [mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fec31011200] Setting codecpar->delay to 2 for stream st: 0 [mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fec31011200] Before avformat_find_stream_info() pos: 3962 bytes read:3962 seeks:0 nb_streams:1 [h264 @ 0x7fec31011e00] nal_unit_type: 7(SPS), nal_ref_idc: 3 [h264 @ 0x7fec31011e00] nal_unit_type: 8(PPS), nal_ref_idc: 3 [h264 @ 0x7fec31011e00] nal_unit_type: 6(SEI), nal_ref_idc: 0 [h264 @ 0x7fec31011e00] nal_unit_type: 5(IDR), nal_ref_idc: 3 [h264 @ 0x7fec31011e00] Format yuv420p chosen by get_format(). [h264 @ 0x7fec31011e00] Reinit context to 1920x1088, pix_fmt: yuv420p [h264 @ 0x7fec31011e00] no picture [mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fec31011200] All info found [mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fec31011200] After avformat_find_stream_info() pos: 1168 bytes read:3962 seeks:0 frames:1 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '1080.mp4': Metadata: major_brand : isom minor_version : 512 compatible_brands: isomiso2avc1mp41 encoder : Lavf58.18.101 Duration: 00:00:01.00, start: 0.000000, bitrate: 31 kb/s Stream #0:0(und), 1, 1/12800: Video: h264 (High), 1 reference frame (avc1 / 0x31637661), yuv420p(left), 1920x1080 (1920x1088) [SAR 1:1 DAR 16:9], 0/1, 22 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default) Metadata: handler_name : VideoHandler Successfully opened the file. Parsing a group of options: output url test.mp4. Applying option c:v (codec name) with argument copy. Successfully parsed a group of options. Opening an output file: test.mp4. [file @ 0x7fec30f06900] Setting default whitelist 'file,crypto' Successfully opened the file. Output #0, mp4, to 'test.mp4': Metadata: major_brand : isom minor_version : 512 compatible_brands: isomiso2avc1mp41 encoder : Lavf58.22.100 Stream #0:0(und), 0, 1/12800: Video: h264 (High), 1 reference frame (avc1 / 0x31637661), yuv420p(left), 1920x1080 (0x0) [SAR 1:1 DAR 16:9], 0/1, q=2-31, 22 kb/s, 25 fps, 25 tbr, 12800 tbn, 12800 tbc (default) Metadata: handler_name : VideoHandler Stream mapping: Stream #0:0 -> #0:0 (copy) Press [q] to stop, [?] for help cur_dts is invalid (this is harmless if it occurs once at the start per stream) No more output streams to write to, finishing. frame= 25 fps=0.0 q=-1.0 Lsize= 4kB time=00:00:00.88 bitrate= 36.0kbits/s speed=5.12e+03x video:3kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 41.046635% Input file #0 (1080.mp4): Input stream #0:0 (video): 25 packets read (2809 bytes); Total: 25 packets (2809 bytes) demuxed Output file #0 (test.mp4): Output stream #0:0 (video): 25 packets muxed (2809 bytes); Total: 25 packets (2809 bytes) muxed 0 frames successfully decoded, 0 decoding errors [AVIOContext @ 0x7fec30f082c0] Statistics: 2 seeks, 4 writeouts [AVIOContext @ 0x7fec30c1dfc0] Statistics: 3962 bytes read, 0 seeks }}} -- Ticket URL: <https://trac.ffmpeg.org/ticket/7558> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#7558: Ignore coded resolutions in using -c:v copy? -------------------------------------+------------------------------------- Reporter: ponpon | Owner: (none) Type: defect | Status: new Priority: normal | Component: | undetermined Version: unspecified | Resolution: Keywords: | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | -------------------------------------+------------------------------------- Comment (by tomwillow): I tested the file 1080.mp4 with newer ffmpeg(commit 7225e307be6a98a463b7cbb118ff1f20391f21e4 Fri Feb 14 14:52:33 2025 +0100). This issue has been fixed at some time before. And I played the output video, it can be playing well(a pure green frame). {{{ ./ffmpeg -y -v debug -i 1080.mp4 -c:v copy test.mp4 ffmpeg version N-118658-g7225e307be Copyright (c) 2000-2025 the FFmpeg developers built with gcc 11 (Ubuntu 11.4.0-1ubuntu1~22.04) configuration: --enable-shared --disable-stripping --prefix=build --extra-cflags='-fsanitize=address -g' --extra-ldflags='-fsanitize=address -g' libavutil 59. 58.100 / 59. 58.100 libavcodec 61. 33.102 / 61. 33.102 libavformat 61. 9.107 / 61. 9.107 libavdevice 61. 4.100 / 61. 4.100 libavfilter 10. 9.100 / 10. 9.100 libswscale 8. 13.100 / 8. 13.100 libswresample 5. 4.100 / 5. 4.100 Splitting the commandline. Reading option '-y' ... matched as option 'y' (overwrite output files) with argument '1'. Reading option '-v' ... matched as option 'v' (set logging level) with argument 'debug'. Reading option '-i' ... matched as input url with argument '1080.mp4'. Reading option '-c:v' ... matched as option 'c' (select encoder/decoder ('copy' to copy stream without reencoding)) with argument 'copy'. Reading option 'test.mp4' ... matched as output url. Finished splitting the commandline. Parsing a group of options: global . Applying option y (overwrite output files) with argument 1. Applying option v (set logging level) with argument debug. Successfully parsed a group of options. Parsing a group of options: input url 1080.mp4. Successfully parsed a group of options. Opening an input file: 1080.mp4. [AVFormatContext @ 0x617000000080] Opening '1080.mp4' for reading [file @ 0x610000000340] Setting default whitelist 'file,crypto,data' [mov,mp4,m4a,3gp,3g2,mj2 @ 0x617000000080] Format mov,mp4,m4a,3gp,3g2,mj2 probed with size=2048 and score=100 [mov,mp4,m4a,3gp,3g2,mj2 @ 0x617000000080] ISO: File Type Major Brand: isom [mov,mp4,m4a,3gp,3g2,mj2 @ 0x617000000080] Unknown dref type 0x206c7275 size 12 [mov,mp4,m4a,3gp,3g2,mj2 @ 0x617000000080] Processing st: 0, edit list 0 - media time: 1024, duration: 12800 [mov,mp4,m4a,3gp,3g2,mj2 @ 0x617000000080] Offset DTS by 1024 to make first pts zero. [mov,mp4,m4a,3gp,3g2,mj2 @ 0x617000000080] Setting codecpar->delay to 2 for stream st: 0 [mov,mp4,m4a,3gp,3g2,mj2 @ 0x617000000080] Before avformat_find_stream_info() pos: 3962 bytes read:3962 seeks:0 nb_streams:1 [h264 @ 0x619000000580] nal_unit_type: 7(SPS), nal_ref_idc: 3 [h264 @ 0x619000000580] Decoding VUI [h264 @ 0x619000000580] nal_unit_type: 8(PPS), nal_ref_idc: 3 [h264 @ 0x619000000580] nal_unit_type: 7(SPS), nal_ref_idc: 3 [h264 @ 0x619000000580] Decoding VUI [h264 @ 0x619000000580] nal_unit_type: 8(PPS), nal_ref_idc: 3 [h264 @ 0x619000000580] nal_unit_type: 6(SEI), nal_ref_idc: 0 [h264 @ 0x619000000580] nal_unit_type: 5(IDR), nal_ref_idc: 3 [h264 @ 0x619000000580] Format yuv420p chosen by get_format(). [h264 @ 0x619000000580] Reinit context to 1920x1088, pix_fmt: yuv420p [h264 @ 0x619000000580] no picture [mov,mp4,m4a,3gp,3g2,mj2 @ 0x617000000080] All info found [mov,mp4,m4a,3gp,3g2,mj2 @ 0x617000000080] After avformat_find_stream_info() pos: 1168 bytes read:3962 seeks:0 frames:1 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '1080.mp4': Metadata: major_brand : isom minor_version : 512 compatible_brands: isomiso2avc1mp41 encoder : Lavf58.18.101 Duration: 00:00:01.00, start: 0.000000, bitrate: 31 kb/s Stream #0:0[0x1](und), 1, 1/12800: Video: h264 (High), 1 reference frame (avc1 / 0x31637661), yuv420p(progressive, left), 1920x1080 [SAR 1:1 DAR 16:9], 0/1, 22 kb/s, 25 fps, 25 tbr, 12800 tbn (default) Metadata: handler_name : VideoHandler vendor_id : [0][0][0][0] Successfully opened the file. Parsing a group of options: output url test.mp4. Applying option c:v (select encoder/decoder ('copy' to copy stream without reencoding)) with argument copy. Successfully parsed a group of options. Opening an output file: test.mp4. [out#0/mp4 @ 0x611000001440] No explicit maps, mapping streams automatically... [vost#0:0/copy @ 0x617000001200] Created video stream from input stream 0:0 [file @ 0x610000001f40] Setting default whitelist 'file,crypto,data' Successfully opened the file. Stream mapping: Stream #0:0 -> #0:0 (copy) Output #0, mp4, to 'test.mp4': Metadata: major_brand : isom minor_version : 512 compatible_brands: isomiso2avc1mp41 encoder : Lavf61.9.107 Stream #0:0(und), 0, 1/12800: Video: h264 (High), 1 reference frame (avc1 / 0x31637661), yuv420p(progressive, left), 1920x1080 [SAR 1:1 DAR 16:9], 0/1, q=2-31, 22 kb/s, 25 fps, 25 tbr, 12800 tbn (default) Metadata: handler_name : VideoHandler vendor_id : [0][0][0][0] [out#0/mp4 @ 0x611000001440] Starting thread... [in#0/mov,mp4,m4a,3gp,3g2,mj2 @ 0x613000000200] Starting thread... Press [q] to stop, [?] for help [in#0/mov,mp4,m4a,3gp,3g2,mj2 @ 0x613000000200] EOF while reading input [in#0/mov,mp4,m4a,3gp,3g2,mj2 @ 0x613000000200] Terminating thread with return code 0 (success) [out#0/mp4 @ 0x611000001440] All streams finished [out#0/mp4 @ 0x611000001440] Terminating thread with return code 0 (success) [AVIOContext @ 0x613000001000] Statistics: 3985 bytes written, 2 seeks, 4 writeouts [out#0/mp4 @ 0x611000001440] Output file #0 (test.mp4): [out#0/mp4 @ 0x611000001440] Output stream #0:0 (video): 25 packets muxed (2809 bytes); [out#0/mp4 @ 0x611000001440] Total: 25 packets (2809 bytes) muxed [out#0/mp4 @ 0x611000001440] video:3KiB audio:0KiB subtitle:0KiB other streams:0KiB global headers:0KiB muxing overhead: 41.723033% frame= 25 fps=0.0 q=-1.0 Lsize= 4KiB time=00:00:00.92 bitrate= 34.6kbits/s speed= 500x [in#0/mov,mp4,m4a,3gp,3g2,mj2 @ 0x613000000200] Input file #0 (1080.mp4): [in#0/mov,mp4,m4a,3gp,3g2,mj2 @ 0x613000000200] Input stream #0:0 (video): 25 packets read (2809 bytes); [in#0/mov,mp4,m4a,3gp,3g2,mj2 @ 0x613000000200] Total: 25 packets (2809 bytes) demuxed [AVIOContext @ 0x6130000003c0] Statistics: 3962 bytes read, 0 seeks }}} -- Ticket URL: <https://trac.ffmpeg.org/ticket/7558#comment:1> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#7558: Ignore coded resolutions in using -c:v copy? -------------------------------------+------------------------------------- Reporter: ponpon | Owner: (none) Type: defect | Status: closed Priority: normal | Component: | undetermined Version: unspecified | Resolution: fixed Keywords: | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | -------------------------------------+------------------------------------- Changes (by tomwillow): * resolution: => fixed * status: new => closed -- Ticket URL: <https://trac.ffmpeg.org/ticket/7558#comment:2> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
participants (1)
-
FFmpeg