[FFmpeg-trac] #2912(FFmpeg:new): splitting the first minute from a wav file generated a slightly too long file (off by 160 samples)
FFmpeg
trac at avcodec.org
Thu Aug 29 13:21:05 CEST 2013
#2912: splitting the first minute from a wav file generated a slightly too long
file (off by 160 samples)
----------------------------------+----------------------------------
Reporter: bernhard | Type: defect
Status: new | Priority: normal
Component: FFmpeg | Version: 2.0.1
Keywords: | Blocked By:
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
----------------------------------+----------------------------------
What you were trying to accomplish:
split the first minute from a wav file
The problem you encountered:
the resulting file was not the exact length expected.
I expected the file to have length 2646000 (= 60 * 44100) samples,
but received length 2646160, i.e. 160 samples too many. I confirmed that
sox generates a file of the expected length.
The exact command line you were using:
ffmpeg -i exil1211212315_02WaveGain.wav -ss 00:00:00 -t 00:01:00
-acodec copy outffmpeg2.wav
The full, uncut console output provided by ffmpeg -v 9 -loglevel 99 -i
ffmpeg version 2.0.1 Copyright (c) 2000-2013 the FFmpeg developers
built on Aug 15 2013 10:56:46 with llvm-gcc 4.2.1 (LLVM build
2336.11.00)
configuration: --prefix=/Volumes/Ramdisk/sw --enable-gpl
--enable-pthreads --enable-version3 --enable-libspeex --enable-libvpx
--disable-decoder=libvpx --enable-libmp3lame --enable-libtheora --enable-
libvorbis --enable-libx264 --enable-avfilter --enable-libopencore_amrwb
--enable-libopencore_amrnb --enable-filters --enable-libgsm --arch=x86_64
--enable-runtime-cpudetect
libavutil 52. 38.100 / 52. 38.100
libavcodec 55. 18.102 / 55. 18.102
libavformat 55. 12.100 / 55. 12.100
libavdevice 55. 3.100 / 55. 3.100
libavfilter 3. 79.101 / 3. 79.101
libswscale 2. 3.100 / 2. 3.100
libswresample 0. 17.102 / 0. 17.102
libpostproc 52. 3.100 / 52. 3.100
Splitting the commandline.
Reading option '-v' ... matched as option 'v' (set logging level)
with argument '9'.
Reading option '-loglevel' ... matched as option 'loglevel' (set
logging level) with argument '99'.
Reading option '-i' ... matched as input file with argument
'exil1211212315_02WaveGain.wav'.
Reading option '-ss' ... matched as option 'ss' (set the start
time offset) with argument '00:00:00'.
Reading option '-t' ... matched as option 't' (record or transcode
"duration" seconds of audio/video) with argument '00:01:00'.
Reading option '-acodec' ... matched as option 'acodec' (force
audio codec ('copy' to copy stream)) with argument 'copy'.
Reading option 'outffmpeg3.wav' ... matched as output file.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option v (set logging level) with argument 9.
Successfully parsed a group of options.
Parsing a group of options: input file
exil1211212315_02WaveGain.wav.
Successfully parsed a group of options.
Opening an input file: exil1211212315_02WaveGain.wav.
[wav @ 0x7fae6881a600] Format wav probed with size=2048 and
score=99
[wav @ 0x7fae6881a600] File position before
avformat_find_stream_info() is 44
[wav @ 0x7fae6881a600] parser not found for codec pcm_s24le,
packets or times may be invalid.
Last message repeated 1 times
[wav @ 0x7fae6881a600] max_analyze_duration 5000000 reached at
5010612 microseconds
[wav @ 0x7fae6881a600] File position after
avformat_find_stream_info() is 1338128
Guessed Channel Layout for Input Stream #0.0 : stereo
Input #0, wav, from 'exil1211212315_02WaveGain.wav':
Duration: 00:28:14.47, bitrate: 2116 kb/s
Stream #0:0, 326, 1/44100: Audio: pcm_s24le ([1][0][0][0] /
0x0001), 44100 Hz, stereo, s32, 2116 kb/s
Successfully opened the file.
Parsing a group of options: output file outffmpeg3.wav.
Applying option ss (set the start time offset) with argument
00:00:00.
Applying option t (record or transcode "duration" seconds of
audio/video) with argument 00:01:00.
Applying option acodec (force audio codec ('copy' to copy stream))
with argument copy.
Successfully parsed a group of options.
Opening an output file: outffmpeg3.wav.
Successfully opened the file.
Output #0, wav, to 'outffmpeg3.wav':
Metadata:
ISFT : Lavf55.12.100
Stream #0:0, 0, 1/44100: Audio: pcm_s24le ([1][0][0][0] /
0x0001), 44100 Hz, stereo, 2116 kb/s
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Press [q] to stop, [?] for help
No more output streams to write to, finishing.
size= 15505kB time=00:01:00.00 bitrate=2116.8kbits/s
video:0kB audio:15505kB subtitle:0 global headers:0kB muxing
overhead 0.000642%
0 frames successfully decoded, 0 decoding errors
[AVIOContext @ 0x7fae684046a0] Statistics: 4 seeks, 3883 writeouts
[AVIOContext @ 0x7fae68403e20] Statistics: 15892480 bytes read, 0
seeks
The input file is of this type, according to soxi:
Input File : 'exil1211212315_02WaveGain.wav'
Channels : 2
Sample Rate : 44100
Precision : 24-bit
Duration : 00:28:14.47 = 74726144 samples = 127085 CDDA
sectors
File Size : 448M
Bit Rate : 2.12M
Sample Encoding: 24-bit Signed Integer PCM
--
Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/2912>
FFmpeg <http://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list