Opened 8 months ago

#7558 new defect

Ignore coded resolutions in using -c:v copy?

Reported by: ponpon Owned by:
Priority: normal Component: undetermined
Version: unspecified Keywords:
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

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

Attachments (1)

test.mp4 (3.9 KB) - added by ponpon 8 months ago.

Download all attachments as: .zip

Change History (1)

Changed 8 months ago by ponpon

Note: See TracTickets for help on using tickets.