[FFmpeg-trac] #7186(undetermined:new): use " -c copy ", but the output's duration and file size doubled

FFmpeg trac at avcodec.org
Thu May 3 04:09:19 EEST 2018


#7186: use  " -c  copy ", but  the output's duration and file size doubled
-------------------------------------+-------------------------------------
             Reporter:  zjj1209354   |                     Type:  defect
               Status:  new          |                 Priority:  important
            Component:               |                  Version:  git-
  undetermined                       |  master
             Keywords:               |               Blocked By:
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------
 Summary of the bug:
     I am trying to copy a mp4 file, use "-c copy" parameter. the input
 file can be played normally, the duration is 90s, and filesize is 93M;
    but, the output file, duration is 180s, file size is 184M; it seems
 that the video track is repeated.
    i can reproduce this problem use the current FFmpeg git head

    the sample file url: https://www.datafilehost.com/d/c6b3ff9b

    Is there something wrong with the input video?



 How to reproduce:
 {{{
 ffmpeg-20180502-e07b191-win64-static\bin\ffmpeg.exe -y -i
 headphone_G951_PINK.mp4 -c
  copy copy.mp4
 ffmpeg version N-90920-ge07b1913fc Copyright (c) 2000-2018 the FFmpeg
 developers

   built with gcc 7.3.0 (GCC)
   configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-
 bzlib --e
 nable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-
 libblur
 ay --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb
 --enable-
 libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine
 --enab
 le-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame
 --enable-li
 bvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-
 libx265 --en
 able-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp
 --enable-
 libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa
 --enabl
 e-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-amf
 --enabl
 e-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec
 --enab
 le-dxva2 --enable-avisynth
   libavutil      56. 18.100 / 56. 18.100
   libavcodec     58. 19.100 / 58. 19.100
   libavformat    58. 13.100 / 58. 13.100
   libavdevice    58.  4.100 / 58.  4.100
   libavfilter     7. 21.100 /  7. 21.100
   libswscale      5.  2.100 /  5.  2.100
   libswresample   3.  2.100 /  3.  2.100
   libpostproc    55.  2.100 / 55.  2.100
 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'headphone_G951_PINK.mp4':
   Metadata:
     major_brand     : mp42
     minor_version   : 0
     compatible_brands: mp42isom
     creation_time   : 2018-04-22T15:08:18.000000Z
     encoder         : mp4creator 1.6.1d
   Duration: 00:01:31.99, start: 0.000000, bitrate: 8502 kb/s
     Stream #0:0(eng): Video: h264 (Constrained Baseline) (avc1 /
 0x31637661), yu
 v420p, 1280x720 [SAR 1:1 DAR 16:9], 8376 kb/s, 50 fps, 50 tbr, 90k tbn,
 100 tbc
 (default)
     Metadata:
       creation_time   : 2018-04-22T15:08:18.000000Z
       encoder         : VC Coding
     Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz,
 stereo, flt
 p, 130 kb/s (default)
     Metadata:
       creation_time   : 2018-04-22T15:08:18.000000Z
 Output #0, mp4, to 'copy.mp4':
   Metadata:
     major_brand     : mp42
     minor_version   : 0
     compatible_brands: mp42isom
     encoder         : Lavf58.13.100
     Stream #0:0(eng): Video: h264 (Constrained Baseline) (avc1 /
 0x31637661), yu
 v420p, 1280x720 [SAR 1:1 DAR 16:9], q=2-31, 8376 kb/s, 50 fps, 50 tbr, 90k
 tbn,
 90k tbc (default)
     Metadata:
       creation_time   : 2018-04-22T15:08:18.000000Z
       encoder         : VC Coding
     Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz,
 stereo, flt
 p, 130 kb/s (default)
     Metadata:
       creation_time   : 2018-04-22T15:08:18.000000Z
 Stream mapping:
   Stream #0:0 -> #0:0 (copy)
   Stream #0:1 -> #0:1 (copy)
 Press [q] to stop, [?] for help
 [mp4 @ 000000cb820f33c0] Packet with invalid duration -8269200 in stream 0
 frame= 9190 fps=0.0 q=-1.0 Lsize=  189512kB time=00:03:03.78
 bitrate=8447.5kbits
 /s speed= 619x
 video:187951kB audio:1461kB subtitle:0kB other streams:0kB global
 headers:0kB mu
 xing overhead: 0.052934%
 }}}
 Patches should be submitted to the ffmpeg-devel mailing list and not this
 bug tracker.

--
Ticket URL: <https://trac.ffmpeg.org/ticket/7186>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list