[FFmpeg-trac] #7332(ffmpeg:closed): ffmpeg hangs when converting some crafted MP4 videos to MOV/MP4

FFmpeg trac at avcodec.org
Wed Aug 1 02:23:18 EEST 2018


#7332: ffmpeg hangs when converting some crafted MP4 videos to MOV/MP4
------------------------------------+--------------------------------------
             Reporter:  HongxuChen  |                    Owner:
                 Type:  defect      |                   Status:  closed
             Priority:  normal      |                Component:  ffmpeg
              Version:  git-master  |               Resolution:  worksforme
             Keywords:              |               Blocked By:
             Blocking:              |  Reproduced by developer:  0
Analyzed by developer:  0           |
------------------------------------+--------------------------------------
Changes (by cehoyos):

 * status:  new => closed
 * resolution:   => worksforme


Comment:

 {{{
 $ ffmpeg -i hang_1.mp4 -vsync cfr -qscale 2 out.avi
 ffmpeg version N-91546-g1ffd63a Copyright (c) 2000-2018 the FFmpeg
 developers
   built with gcc 6.4.0 (GCC)
   configuration: --enable-gpl --enable-gnutls --enable-libxml2
   libavutil      56. 18.102 / 56. 18.102
   libavcodec     58. 22.100 / 58. 22.100
   libavformat    58. 17.101 / 58. 17.101
   libavdevice    58.  4.101 / 58.  4.101
   libavfilter     7. 26.100 /  7. 26.100
   libswscale      5.  2.100 /  5.  2.100
   libswresample   3.  2.100 /  3.  2.100
   libpostproc    55.  2.100 / 55.  2.100
 [mov,mp4,m4a,3gp,3g2,mj2 @ 0x2811600] overread end of atom 'stsd' by
 16121600 bytes
 [mov,mp4,m4a,3gp,3g2,mj2 @ 0x2811600] Found duplicated MOOV Atom. Skipped
 it
 [mov,mp4,m4a,3gp,3g2,mj2 @ 0x2811600] wrong sample count
 [h264 @ 0x2813040] error while decoding MB 0 3, bytestream 98
 [h264 @ 0x2813040] concealing 9 DC, 9 AC, 9 MV errors in I frame
 [h264 @ 0x2813040] error while decoding MB 0 3, bytestream -36
 [h264 @ 0x2813040] concealing 9 DC, 9 AC, 9 MV errors in P frame
 [h264 @ 0x2813040] error while decoding MB 0 3, bytestream -47
 [h264 @ 0x2813040] concealing 9 DC, 9 AC, 9 MV errors in B frame
 [h264 @ 0x2813040] error while decoding MB 0 3, bytestream -47
 [h264 @ 0x2813040] concealing 9 DC, 9 AC, 9 MV errors in B frame
 [h264 @ 0x2813040] no frame!
 [h264 @ 0x2813040] Invalid NAL unit size (4194306 > 21).
 [h264 @ 0x2813040] Error splitting the input into NAL units.
 [h264 @ 0x2813040] Invalid NAL unit 9, skipping.
 [h264 @ 0x2813040] no frame!
 Truncating packet of size 268435461 to 61161
 [h264 @ 0x2813040] Invalid NAL unit size (1718909296 > 61150).
 [h264 @ 0x2813040] Error splitting the input into NAL units.
 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'hang_1.mp4':
   Metadata:
     major_brand     : mp42
     minor_version   : 19529854
     compatible_brands: mp42isom
   Duration: 11:32:50.48, start: 0.083333, bitrate: 0 kb/s
     Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv422p(tv,
 GBR), 16x144 [SAR 1:1 DAR 1:9], SAR 1:32 DAR 1:288, 12 tbn, 24 tbc
 (default)
     Metadata:
       rotate          : 0
       creation_time   : 2014-11-14T07:34:24.000000Z
       handler_name    : dia?Handler
       encoder         : AVC Coding
     Side data:
       displaymatrix: rotation of -0.00 degrees
     Stream #0:1(eng): Data: none, SAR 1:32 DAR 0:0 (default)
     Metadata:
       rotate          : 0
       creation_time   : 2014-11-14T05:09:20.000000Z
       handler_name    : dia Handler
     Stream #0:2(eng): Data: none, SAR 1:32 DAR 0:0 (default)
     Metadata:
       rotate          : 0
       creation_time   : 2014-11-14T05:09:20.000000Z
       handler_name    : dia Handler
 Please use -q:a or -q:v, -qscale is ambiguous
 Stream mapping:
   Stream #0:0 -> #0:0 (h264 (native) -> mpeg4 (native))
 Press [q] to stop, [?] for help
 [h264 @ 0x2820a80] error while decoding MB 0 3, bytestream 98
 [h264 @ 0x2820a80] concealing 9 DC, 9 AC, 9 MV errors in I frame
 [h264 @ 0x284ec80] error while decoding MB 0 3, bytestream -36
 [h264 @ 0x284ec80] concealing 9 DC, 9 AC, 9 MV errors in P frame
 [h264 @ 0x2888400] error while decoding MB 0 3, bytestream -47
 [h264 @ 0x2888400] concealing 9 DC, 9 AC, 9 MV errors in B frame
 [h264 @ 0x288dcc0] error while decoding MB 0 3, bytestream -47
 [h264 @ 0x288dcc0] concealing 9 DC, 9 AC, 9 MV errors in B frame
 [h264 @ 0x2933e40] no frame!
 [h264 @ 0x2988b40] Invalid NAL unit size (4194306 > 21).
 [h264 @ 0x2988b40] Error splitting the input into NAL units.
 [h264 @ 0x2820a80] Invalid NAL unit 5, skipping.
 [h264 @ 0x2820a80] no frame!
 [mpeg4 @ 0x2879d40] ignoring invalid SAR: 1/32
 Output #0, avi, to 'out.avi':
   Metadata:
     major_brand     : mp42
     minor_version   : 19529854
     compatible_brands: mp42isom
     ISFT            : Lavf58.17.101
     Stream #0:0(eng): Video: mpeg4 (FMP4 / 0x34504D46), yuv420p, 16x144,
 q=2-31, 200 kb/s, SAR 1:32 DAR 1:288, 12 tbn, 12 tbc (default)
     Metadata:
       encoder         : Lavc58.22.100 mpeg4
       creation_time   : 2014-11-14T07:34:24.000000Z
       handler_name    : dia?Handler
     Side data:
       cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: -1
       displaymatrix: rotation of -0.00 degrees
 [h264 @ 0x284ec80] Invalid NAL unit size (1718909296 > 61150).
 [h264 @ 0x284ec80] Error splitting the input into NAL units.
 Error while decoding stream #0:0: Invalid data found when processing input
 More than 1000 frames duplicated
 Error while decoding stream #0:0: Invalid data found when processing input
 Error while decoding stream #0:0: Invalid data found when processing
 input4kbits/s dup=65530 drop=2 speed=1.43e+03x
     Last message repeated 1 times
 frame=65534 fps=17175 q=2.0 Lsize=    4731kB time=01:31:01.16 bitrate=
 7.1kbits/s dup=65530 drop=3 speed=1.43e+03x
 video:3136kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB
 muxing overhead: 50.856773%
 }}}
 {{{
 $ ffmpeg -i hang_2.mp4 -vsync cfr -qscale 2 out2.avi
 ffmpeg version N-91546-g1ffd63a Copyright (c) 2000-2018 the FFmpeg
 developers
   built with gcc 6.4.0 (GCC)
   configuration: --enable-gpl --enable-gnutls --enable-libxml2
   libavutil      56. 18.102 / 56. 18.102
   libavcodec     58. 22.100 / 58. 22.100
   libavformat    58. 17.101 / 58. 17.101
   libavdevice    58.  4.101 / 58.  4.101
   libavfilter     7. 26.100 /  7. 26.100
   libswscale      5.  2.100 /  5.  2.100
   libswresample   3.  2.100 /  3.  2.100
   libpostproc    55.  2.100 / 55.  2.100
 [mov,mp4,m4a,3gp,3g2,mj2 @ 0x286f600] stream 1, timescale not set
 [mov,mp4,m4a,3gp,3g2,mj2 @ 0x286f600] overread end of atom 'stsd' by
 16121600 bytes
 [mov,mp4,m4a,3gp,3g2,mj2 @ 0x286f600] Found duplicated MOOV Atom. Skipped
 it
 [mov,mp4,m4a,3gp,3g2,mj2 @ 0x286f600] wrong sample count
 [mov,mp4,m4a,3gp,3g2,mj2 @ 0x286f600] stream 2, timescale not set
 [h264 @ 0x2871040] error while decoding MB 0 3, bytestream 98
 [h264 @ 0x2871040] concealing 9 DC, 9 AC, 9 MV errors in I frame
 [h264 @ 0x2871040] error while decoding MB 0 3, bytestream -36
 [h264 @ 0x2871040] concealing 9 DC, 9 AC, 9 MV errors in P frame
 [h264 @ 0x2871040] error while decoding MB 0 3, bytestream -47
 [h264 @ 0x2871040] concealing 9 DC, 9 AC, 9 MV errors in B frame
 [h264 @ 0x2871040] error while decoding MB 0 3, bytestream -47
 [h264 @ 0x2871040] concealing 9 DC, 9 AC, 9 MV errors in B frame
 [h264 @ 0x2871040] no frame!
 [h264 @ 0x2871040] error while decoding MB 0 8, bytestream -21
 [h264 @ 0x2871040] concealing 9 DC, 9 AC, 9 MV errors in P frame
 Truncating packet of size 268435461 to 5699
 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'hang_2.mp4':
   Metadata:
     major_brand     : mp42
     minor_version   : 19529854
     compatible_brands: mp42isom
   Duration: 11:32:50.48, start: 0.083333, bitrate: 0 kb/s
     Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv422p(tv,
 GBR), 16x144 [SAR 1:1 DAR 1:9], SAR 1:32 DAR 1:288, 12 tbn, 24 tbc
 (default)
     Metadata:
       rotate          : 0
       creation_time   : 2014-11-14T07:34:24.000000Z
       handler_name    : dia?Handler
       encoder         : AVC Coding
     Side data:
       displaymatrix: rotation of -0.00 degrees
     Stream #0:1: Data: none (default)
     Metadata:
       rotate          : 0
     Stream #0:2: Data: none (default)
     Metadata:
       rotate          : 0
 Please use -q:a or -q:v, -qscale is ambiguous
 Stream mapping:
   Stream #0:0 -> #0:0 (h264 (native) -> mpeg4 (native))
 Press [q] to stop, [?] for help
 [h264 @ 0x287ea00] error while decoding MB 0 3, bytestream 98
 [h264 @ 0x287ea00] concealing 9 DC, 9 AC, 9 MV errors in I frame
 [h264 @ 0x2879780] error while decoding MB 0 3, bytestream -36
 [h264 @ 0x2879780] concealing 9 DC, 9 AC, 9 MV errors in P frame
 [h264 @ 0x28c0e00] error while decoding MB 0 3, bytestream -47
 [h264 @ 0x28c0e00] concealing 9 DC, 9 AC, 9 MV errors in B frame
 [h264 @ 0x28c6580] error while decoding MB 0 3, bytestream -47
 [h264 @ 0x28c6580] concealing 9 DC, 9 AC, 9 MV errors in B frame
 [h264 @ 0x2984300] no frame!
 [h264 @ 0x29d9000] error while decoding MB 0 8, bytestream -21
 [h264 @ 0x287ea00] Invalid NAL unit 5, skipping.
 [h264 @ 0x287ea00] no frame!
 [h264 @ 0x29d9000] concealing 9 DC, 9 AC, 9 MV errors in P frame
 [mpeg4 @ 0x28d61c0] ignoring invalid SAR: 1/32
 Output #0, avi, to 'out2.avi':
   Metadata:
     major_brand     : mp42
     minor_version   : 19529854
     compatible_brands: mp42isom
     ISFT            : Lavf58.17.101
     Stream #0:0(eng): Video: mpeg4 (FMP4 / 0x34504D46), yuv420p, 16x144,
 q=2-31, 200 kb/s, SAR 1:32 DAR 1:288, 12 tbn, 12 tbc (default)
     Metadata:
       encoder         : Lavc58.22.100 mpeg4
       creation_time   : 2014-11-14T07:34:24.000000Z
       handler_name    : dia?Handler
     Side data:
       cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: -1
       displaymatrix: rotation of -0.00 degrees
 [h264 @ 0x2879780] Invalid NAL unit size (1718909296 > 5688).
 [h264 @ 0x2879780] Error splitting the input into NAL units.
 Error while decoding stream #0:0: Invalid data found when processing input
 More than 1000 frames duplicated
 Error while decoding stream #0:0: Invalid data found when processing
 input5.5kbits/s dup=1114107 drop=2 speed=1.39e+03x
     Last message repeated 1 times
 frame=1114112 fps=16691 q=2.0 Lsize=   80336kB time=25:47:22.66 bitrate=
 7.1kbits/s dup=1114107 drop=3 speed=1.39e+03x
 video:53312kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB
 muxing overhead: 50.690712%
 }}}

--
Ticket URL: <https://trac.ffmpeg.org/ticket/7332#comment:3>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list