[FFmpeg-trac] #6937(undetermined:new): When converting from APE program eats up 4 bytes.

FFmpeg trac at avcodec.org
Fri Dec 29 21:00:58 EET 2017


#6937: When converting from APE program eats up 4 bytes.
-------------------------------------+-------------------------------------
             Reporter:  sokoloff     |                    Owner:
                 Type:  defect       |                   Status:  new
             Priority:  normal       |                Component:
              Version:  unspecified  |  undetermined
             Keywords:  APE          |               Resolution:
             Blocking:               |               Blocked By:
Analyzed by developer:  0            |  Reproduced by developer:  0
-------------------------------------+-------------------------------------

Comment (by sokoloff):

 >Is the issue you want to report reproducible with current FFmpeg git
 head?
 Yes this bug is reproduced on 0c78b6a416c661afed745d44495b5194f714fb96
 commit.

 {{{
 [sokoloff at sokoloff-home 2]$ ./ffmpeg -y -t 60 -f s16le -i /dev/urandom -ar
 44100 -acodec pcm_s16le -ac 2 in.wav
 ffmpeg version N-89656-g0c78b6a416 Copyright (c) 2000-2017 the FFmpeg
 developers
   built with gcc 4.9.4 (Linaro GCC 4.9-2017.01) 20160726 (ROSA)
   configuration:
   libavutil      56.  7.100 / 56.  7.100
   libavcodec     58.  9.100 / 58.  9.100
   libavformat    58.  3.100 / 58.  3.100
   libavdevice    58.  0.100 / 58.  0.100
   libavfilter     7.  8.100 /  7.  8.100
   libswscale      5.  0.101 /  5.  0.101
   libswresample   3.  0.101 /  3.  0.101
 Guessed Channel Layout for Input Stream #0.0 : mono
 Input #0, s16le, from '/dev/urandom':
   Duration: N/A, bitrate: 705 kb/s
     Stream #0:0: Audio: pcm_s16le, 44100 Hz, mono, s16, 705 kb/s
 Stream mapping:
   Stream #0:0 -> #0:0 (pcm_s16le (native) -> pcm_s16le (native))
 Press [q] to stop, [?] for help
 Output #0, wav, to 'in.wav':
   Metadata:
     ISFT            : Lavf58.3.100
     Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 44100 Hz,
 stereo, s16, 1411 kb/s
     Metadata:
       encoder         : Lavc58.9.100 pcm_s16le
 size=   10336kB time=00:01:00.00 bitrate=1411.2kbits/s speed= 219x
 video:0kB audio:10336kB subtitle:0kB other streams:0kB global headers:0kB
 muxing overhead: 0.000737%

 [sokoloff at sokoloff-home 2]$ mac in.wav in.ape -c2000
 --- Monkey's Audio Console Front End (v 4.11) (c) Matthew T. Ashland ---
 Compressing (normal)...
 Progress: 100.0% (0.0 seconds remaining, 0.2 seconds total)
 Success...

 [sokoloff at sokoloff-home 2]$ ffmpeg -y -accurate_seek -ss 5 -t 30 -i in.wav
 -f wav from_wav.wav
 ffmpeg version 3.2.4 Copyright (c) 2000-2017 the FFmpeg developers
   built with gcc 4.9.4 (Linaro GCC 4.9-2017.01) 20160726 (ROSA)
   configuration: --prefix=/usr --enable-shared --libdir=/usr/lib64
 --shlibdir=/usr/lib64 --incdir=/usr/include --disable-stripping --enable-
 postproc --enable-gpl --enable-pthreads --enable-ladspa --enable-libbluray
 --enable-libtheora --enable-libvorbis --disable-encoder=vorbis --enable-
 libvpx --enable-x11grab --enable-runtime-cpudetect --enable-libdc1394
 --enable-libschroedinger --enable-librtmp --enable-libspeex --enable-
 libfreetype --enable-libnut --enable-libgsm --enable-libcelt --enable-
 avresample --enable-opencl --disable-libopencv --enable-libopenjpeg
 --enable-libopus --enable-libsoxr --enable-libwavpack --disable-libxavs
 --enable-libmodplug --enable-libass --enable-gnutls --enable-libcdio
 --enable-libpulse --enable-libv4l2 --enable-libmp3lame --enable-
 libopencore-amrnb --enable-libopencore-amrwb --enable-version3 --enable-
 libx264 --enable-libx265 --enable-libvo-amrwbenc --enable-libxvid
   libavutil      55. 34.101 / 55. 34.101
   libavcodec     57. 64.101 / 57. 64.101
   libavformat    57. 56.101 / 57. 56.101
   libavdevice    57.  1.100 / 57.  1.100
   libavfilter     6. 65.100 /  6. 65.100
   libavresample   3.  1.  0 /  3.  1.  0
   libswscale      4.  2.100 /  4.  2.100
   libswresample   2.  3.100 /  2.  3.100
   libpostproc    54.  1.100 / 54.  1.100
 Guessed Channel Layout for Input Stream #0.0 : stereo
 Input #0, wav, from 'in.wav':
   Metadata:
     encoder         : Lavf58.3.100
   Duration: 00:01:00.00, bitrate: 1411 kb/s
     Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 44100 Hz,
 stereo, s16, 1411 kb/s
 Output #0, wav, to 'from_wav.wav':
   Metadata:
     ISFT            : Lavf57.56.101
     Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 44100 Hz,
 stereo, s16, 1411 kb/s
     Metadata:
       encoder         : Lavc57.64.101 pcm_s16le
 Stream mapping:
   Stream #0:0 -> #0:0 (pcm_s16le (native) -> pcm_s16le (native))
 Press [q] to stop, [?] for help
 size=    5168kB time=00:00:30.00 bitrate=1411.2kbits/s speed=1.52e+03x
 video:0kB audio:5168kB subtitle:0kB other streams:0kB global headers:0kB
 muxing overhead: 0.001474%


 [sokoloff at sokoloff-home 2]$ ffmpeg -y -accurate_seek -ss 5 -t 30 -i in.ape
 -f wav from_ape.wav
 ffmpeg version 3.2.4 Copyright (c) 2000-2017 the FFmpeg developers
   built with gcc 4.9.4 (Linaro GCC 4.9-2017.01) 20160726 (ROSA)
   configuration: --prefix=/usr --enable-shared --libdir=/usr/lib64
 --shlibdir=/usr/lib64 --incdir=/usr/include --disable-stripping --enable-
 postproc --enable-gpl --enable-pthreads --enable-ladspa --enable-libbluray
 --enable-libtheora --enable-libvorbis --disable-encoder=vorbis --enable-
 libvpx --enable-x11grab --enable-runtime-cpudetect --enable-libdc1394
 --enable-libschroedinger --enable-librtmp --enable-libspeex --enable-
 libfreetype --enable-libnut --enable-libgsm --enable-libcelt --enable-
 avresample --enable-opencl --disable-libopencv --enable-libopenjpeg
 --enable-libopus --enable-libsoxr --enable-libwavpack --disable-libxavs
 --enable-libmodplug --enable-libass --enable-gnutls --enable-libcdio
 --enable-libpulse --enable-libv4l2 --enable-libmp3lame --enable-
 libopencore-amrnb --enable-libopencore-amrwb --enable-version3 --enable-
 libx264 --enable-libx265 --enable-libvo-amrwbenc --enable-libxvid
   libavutil      55. 34.101 / 55. 34.101
   libavcodec     57. 64.101 / 57. 64.101
   libavformat    57. 56.101 / 57. 56.101
   libavdevice    57.  1.100 / 57.  1.100
   libavfilter     6. 65.100 /  6. 65.100
   libavresample   3.  1.  0 /  3.  1.  0
   libswscale      4.  2.100 /  4.  2.100
   libswresample   2.  3.100 /  2.  3.100
   libpostproc    54.  1.100 / 54.  1.100
 Input #0, ape, from 'in.ape':
   Duration: 00:01:00.00, start: 0.000000, bitrate: 699 kb/s
     Stream #0:0: Audio: ape (APE  / 0x20455041), 44100 Hz, stereo, s16p
 Output #0, wav, to 'from_ape.wav':
   Metadata:
     ISFT            : Lavf57.56.101
     Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 44100 Hz,
 stereo, s16, 1411 kb/s
     Metadata:
       encoder         : Lavc57.64.101 pcm_s16le
 Stream mapping:
   Stream #0:0 -> #0:0 (ape (native) -> pcm_s16le (native))
 Press [q] to stop, [?] for help
 size=    5168kB time=00:00:30.00 bitrate=1411.2kbits/s speed= 391x
 video:0kB audio:5168kB subtitle:0kB other streams:0kB global headers:0kB
 muxing overhead: 0.001474%

 [sokoloff at sokoloff-home 2]$ ls -l from_wav.wav from_ape.wav
 -rw-rw-r-- 1 sokoloff sokoloff 5292074 дек 29 21:46 from_ape.wav
 -rw-rw-r-- 1 sokoloff sokoloff 5292078 дек 29 21:45 from_wav.wav
 }}}

 Files have different length.
 Size of from_ape.wav is incorrect, it should be 5292078 bytes 78 (header)
 + 5292000 (data) (44100 * 2 channel * 2 byte per sec. * 30 seconds)

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


More information about the FFmpeg-trac mailing list