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

FFmpeg trac at avcodec.org
Fri Dec 29 18:27:36 EET 2017


#6937: When converting from APE program eats up 4 bytes.
----------------------------------+---------------------------------------
             Reporter:  sokoloff  |                     Type:  defect
               Status:  new       |                 Priority:  normal
            Component:  ffmpeg    |                  Version:  unspecified
             Keywords:  APE       |               Blocked By:
             Blocking:            |  Reproduced by developer:  0
Analyzed by developer:  0         |
----------------------------------+---------------------------------------
 '''Summary of the bug:'''
 If I use the -ss option and the seconds value is a multiple of 5, then the
 program eats up the first 2 bytes.

 How to reproduce:

 '''Preparing:'''
 {{{
 ffmpeg -y -t 60 -f s16le -i /dev/urandom -ar 44100 -acodec pcm_s16le -ac 2
 in.wav
 mac in.wav in.ape -c2000
 }}}

 '''Test 1 (Size):'''
 {{{
 ffmpeg -y -accurate_seek -ss 5 -t 30 -i in.wav -f wav from_wav.wav
 ffmpeg -y -accurate_seek -ss 5 -t 30 -i in.ape -f wav from_ape.wav

 ls -l from_wav.wav from_ape.wav
 -rw-rw-r-- 1 sokoloff sokoloff 5292074 дек 29 18:49 from_ape.wav
 -rw-rw-r-- 1 sokoloff sokoloff 5292078 дек 29 18:49 from_wav.wav
 }}}
 The size of the file "from_ape.wav" is less on 4 bytes

 '''Test 2 (Hex):'''
 {{{
 ffmpeg -y -accurate_seek -ss 5 -t 30 -i in.wav -f s16le from_wav.raw
 ffmpeg -y -accurate_seek -ss 5 -t 30 -i in.ape -f s16le from_ape.raw

 hexdump from_wav.raw | head -n 4
 0000000 aa55 aa55 b179 b179 fa3d fa3d 0f09 0f09
 0000010 4981 4981 bd53 bd53 aec1 aec1 ebca ebca
 0000020 c4bb c4bb d85d d85d eeb1 eeb1 b934 b934
 0000030 c1dd c1dd 295d 295d 0851 0851 3641 3641

 hexdump from_ape.raw | head -n 4
 0000000 b179 b179 fa3d fa3d 0f09 0f09 4981 4981
 0000010 bd53 bd53 aec1 aec1 ebca ebca c4bb c4bb
 0000020 d85d d85d eeb1 eeb1 b934 b934 c1dd c1dd
 0000030 295d 295d 0851 0851 3641 3641 2f58 2f58
 }}}

 As you can see in from_ape.raw missing 4 bytes (aa55 aa55) at the
 beginning



 '''Version'''
 {{{
 ffmpeg -version
 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
 }}}
 Reproduced on Fedora 25
 {{{
 ffmpeg -version
 ffmpeg version 3.1.11 Copyright (c) 2000-2017 the FFmpeg developers
 built with gcc 6.4.1 (GCC) 20170727 (Red Hat 6.4.1-1)
 configuration: --prefix=/usr --bindir=/usr/bin --datadir=/usr/share/ffmpeg
 --incdir=/usr/include/ffmpeg --libdir=/usr/lib64 --mandir=/usr/share/man
 --arch=x86_64 --optflags='-O2 -g -pipe -Wall -Werror=format-security
 -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-
 buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-
 hardened-cc1 -m64 -mtune=generic' --extra-ldflags='-Wl,-z,relro
 -specs=/usr/lib/rpm/redhat/redhat-hardened-ld' --enable-bzlib --disable-
 crystalhd --enable-fontconfig --enable-frei0r --enable-gcrypt --enable-
 gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libcdio
 --enable-indev=jack --enable-libfreetype --enable-libfribidi --enable-
 libgsm --enable-libmp3lame --enable-nvenc --extra-
 cflags=-I/usr/include/nvenc --enable-openal --enable-opencl --enable-
 opengl --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-
 libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora
 --enable-libvorbis --enable-libv4l2 --enable-libvpx --enable-libx264
 --enable-libx265 --enable-libxvid --enable-x11grab --enable-avfilter
 --enable-avresample --enable-postproc --enable-pthreads --disable-static
 --enable-shared --enable-gpl --disable-debug --disable-stripping
 --shlibdir=/usr/lib64 --enable-libmfx --enable-runtime-cpudetect
 libavutil      55. 28.100 / 55. 28.100
 libavcodec     57. 48.101 / 57. 48.101
 libavformat    57. 41.100 / 57. 41.100
 libavdevice    57.  0.101 / 57.  0.101
 libavfilter     6. 47.100 /  6. 47.100
 libavresample   3.  0.  0 /  3.  0.  0
 libswscale      4.  1.100 /  4.  1.100
 libswresample   2.  1.100 /  2.  1.100
 libpostproc    54.  0.100 / 54.  0.100

 }}}

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


More information about the FFmpeg-trac mailing list