[FFmpeg-trac] #6601(avcodec:new): MP2 files are decoded with errors

FFmpeg trac at avcodec.org
Sun Aug 20 13:28:18 EEST 2017


#6601: MP2 files are decoded with errors
---------------------------------+--------------------------------------
             Reporter:  koops    |                     Type:  defect
               Status:  new      |                 Priority:  normal
            Component:  avcodec  |                  Version:  git-master
             Keywords:  mp2      |               Blocked By:
             Blocking:           |  Reproduced by developer:  0
Analyzed by developer:  0        |
---------------------------------+--------------------------------------
 Summary of the bug:
 How to reproduce:
 {{{
 % ffmpeg -i Common_Room.mp2 Common_Room.wav
 ffmpeg version N-86994-g92da230
 built with gcc 7.1.0 (GCC)

 ...

 [mp2 @ 0000000001295920] Header missing
 Error while decoding stream #0:0: Invalid data found when processing input

 ...

 1379 frames successfully decoded, 1 decoding errors
 }}}

 File is decoded successfully, but there are decoding errors.

 Log:
 {{{
 ffmpeg started on 2017-08-20 at 13:02:39
 Report written to "ffmpeg-20170820-130239.log"
 Command line:
 ffmpeg.exe -report -i Common_Room.mp2 Common_Room.wav
 ffmpeg version N-86994-g92da230 Copyright (c) 2000-2017 the FFmpeg
 developers
   built with gcc 7.1.0 (GCC)
   configuration: --enable-gpl --enable-version3 --enable-cuda --enable-
 cuvid --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-nvenc
 --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r
 --enable-gnutls --enable-iconv --enable-libass --enable-libbluray
 --enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme
 --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame
 --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264
 --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libsnappy
 --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame
 --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-
 libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-
 libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-lzma
 --enable-zlib
   libavutil      55. 74.100 / 55. 74.100
   libavcodec     57.102.100 / 57.102.100
   libavformat    57. 76.100 / 57. 76.100
   libavdevice    57.  7.100 / 57.  7.100
   libavfilter     6. 99.100 /  6. 99.100
   libswscale      4.  7.102 /  4.  7.102
   libswresample   2.  8.100 /  2.  8.100
   libpostproc    54.  6.100 / 54.  6.100
 Splitting the commandline.
 Reading option '-report' ... matched as option 'report' (generate a
 report) with argument '1'.
 Reading option '-i' ... matched as input url with argument
 'Common_Room.mp2'.
 Reading option 'Common_Room.wav' ... 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 Common_Room.mp2.
 Successfully parsed a group of options.
 Opening an input file: Common_Room.mp2.
 [NULL @ 00000000010564a0] Opening 'Common_Room.mp2' for reading
 [file @ 0000000001283e60] Setting default whitelist 'file,crypto'
 [mp3 @ 00000000010564a0] Format mp3 probed with size=4096 and score=51
 [mp3 @ 00000000010564a0] Skipping 0 bytes of junk at 0.
 [mp3 @ 00000000010564a0] Before avformat_find_stream_info() pos: 0 bytes
 read:65664 seeks:2 nb_streams:1
 [mp3 @ 00000000010564a0] All info found
 [mp3 @ 00000000010564a0] Estimating duration from bitrate, this may be
 inaccurate
 [mp3 @ 00000000010564a0] After avformat_find_stream_info() pos: 31744
 bytes read:65664 seeks:2 frames:50
 Input #0, mp3, from 'Common_Room.mp2':
   Duration: 00:01:12.05, start: 0.000000, bitrate: 95 kb/s
     Stream #0:0, 50, 1/14112000: Audio: mp2, 22050 Hz, stereo, s16p, 96
 kb/s
 Successfully opened the file.
 Parsing a group of options: output url Common_Room.wav.
 Successfully parsed a group of options.
 Opening an output file: Common_Room.wav.
 [file @ 00000000012a05a0] Setting default whitelist 'file,crypto'
 Successfully opened the file.
 Stream mapping:
   Stream #0:0 -> #0:0 (mp2 (native) -> pcm_s16le (native))
 Press [q] to stop, [?] for help
 cur_dts is invalid (this is harmless if it occurs once at the start per
 stream)
 detected 12 logical cores
 [graph_0_in_0_0 @ 00000000012e3b60] Setting 'time_base' to value '1/22050'
 [graph_0_in_0_0 @ 00000000012e3b60] Setting 'sample_rate' to value '22050'
 [graph_0_in_0_0 @ 00000000012e3b60] Setting 'sample_fmt' to value 's16p'
 [graph_0_in_0_0 @ 00000000012e3b60] Setting 'channel_layout' to value
 '0x3'
 [graph_0_in_0_0 @ 00000000012e3b60] tb:1/22050 samplefmt:s16p
 samplerate:22050 chlayout:0x3
 [format_out_0_0 @ 00000000012e63e0] Setting 'sample_fmts' to value 's16'
 [format_out_0_0 @ 00000000012e63e0] auto-inserting filter
 'auto_resampler_0' between the filter 'Parsed_anull_0' and the filter
 'format_out_0_0'
 [AVFilterGraph @ 000000000129f040] query_formats: 4 queried, 6 merged, 3
 already done, 0 delayed
 [auto_resampler_0 @ 00000000012e6940] [SWR @ 00000000012e6b20] Using s16p
 internally between filters
 [auto_resampler_0 @ 00000000012e6940] ch:2 chl:stereo fmt:s16p r:22050Hz
 -> ch:2 chl:stereo fmt:s16 r:22050Hz
 Output #0, wav, to 'Common_Room.wav':
   Metadata:
     ISFT            : Lavf57.76.100
     Stream #0:0, 0, 1/22050: Audio: pcm_s16le ([1][0][0][0] / 0x0001),
 22050 Hz, stereo, s16, 705 kb/s
     Metadata:
       encoder         : Lavc57.102.100 pcm_s16le
 [mp2 @ 0000000001295920] Header missing
 Error while decoding stream #0:0: Invalid data found when processing input
 [out_0_0 @ 00000000012e6200] EOF on sink link out_0_0:default.
 No more output streams to write to, finishing.
 size=    6206kB time=00:01:12.04 bitrate= 705.6kbits/s speed= 922x
 video:0kB audio:6206kB subtitle:0kB other streams:0kB global headers:0kB
 muxing overhead: 0.001227%
 Input file #0 (Common_Room.mp2):
   Input stream #0:0 (audio): 1380 packets read (864596 bytes); 1379 frames
 decoded (1588608 samples);
   Total: 1380 packets (864596 bytes) demuxed
 Output file #0 (Common_Room.wav):
   Output stream #0:0 (audio): 1379 frames encoded (1588608 samples); 1379
 packets muxed (6354432 bytes);
   Total: 1379 packets (6354432 bytes) muxed
 1379 frames successfully decoded, 1 decoding errors
 [AVIOContext @ 00000000012e0680] Statistics: 4 seeks, 28 writeouts
 [AVIOContext @ 0000000001057440] Statistics: 897492 bytes read, 2 seeks
 }}}

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


More information about the FFmpeg-trac mailing list