#6540 closed defect (fixed)
Atempo filter cuts off data at the end
Reported by: | asdamos | Owned by: | |
---|---|---|---|
Priority: | important | Component: | avfilter |
Version: | git-master | Keywords: | atempo regression |
Cc: | Marton Balint | Blocked By: | |
Blocking: | Reproduced by developer: | yes | |
Analyzed by developer: | no |
Description
When using atempo filter it cuts off sound data at the end of file.
I was also using atempo filter from C API in similar way to https://www.ffmpeg.org/doxygen/trunk/filter_audio_8c-example.html.
I noticed that, when I pushed frame to filter graph, I had to push few more frames before I could get frame number one from filter graph. So at the end of filtering, I did not get all the frames I pushed to filter graph.
Following command should produce 1 second file but produces 0.97 second file.
./ffmpeg -i one-second-file.wav -filter:a "atempo=1.0" -vn output.wavffmpeg version N-86695-g0a24d7c Copyright (c) 2000-2017 the FFmpeg developers built with gcc 4.8 (Ubuntu 4.8.4-2ubuntu1~14.04.3) configuration: --prefix=/home/user/ffmpeg_build --pkg-config-flags=--static --extra-cflags=-I/home/user/ffmpeg_build/include --extra-ldflags=-L/home/user/ffmpeg_build/lib --bindir=/home/user/bin --enable-nonfree libavutil 55. 67.100 / 55. 67.100 libavcodec 57.100.103 / 57.100.103 libavformat 57. 75.100 / 57. 75.100 libavdevice 57. 7.100 / 57. 7.100 libavfilter 6. 94.100 / 6. 94.100 libswscale 4. 7.101 / 4. 7.101 libswresample 2. 8.100 / 2. 8.100 Guessed Channel Layout for Input Stream #0.0 : mono Input #0, wav, from 'one-second-file.wav': Duration: 00:00:01.00, bitrate: 705 kb/s Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 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 'output.wav': Metadata: ISFT : Lavf57.75.100 Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 44100 Hz, mono, s16, 705 kb/s Metadata: encoder : Lavc57.100.103 pcm_s16le size= 84kB time=00:00:00.97 bitrate= 706.2kbits/s speed=6.55x video:0kB audio:84kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.090681%
Following command should produce 2 seconds file but produces 1.92 seconds file.
./ffmpeg -i one-second-file.wav -filter:a "atempo=0.5" -vn output.wav ffmpeg version N-86695-g0a24d7c Copyright (c) 2000-2017 the FFmpeg developers built with gcc 4.8 (Ubuntu 4.8.4-2ubuntu1~14.04.3) configuration: --prefix=/home/user/ffmpeg_build --pkg-config-flags=--static --extra-cflags=-I/home/user/ffmpeg_build/include --extra-ldflags=-L/home/user/ffmpeg_build/lib --bindir=/home/user/bin --enable-nonfree libavutil 55. 67.100 / 55. 67.100 libavcodec 57.100.103 / 57.100.103 libavformat 57. 75.100 / 57. 75.100 libavdevice 57. 7.100 / 57. 7.100 libavfilter 6. 94.100 / 6. 94.100 libswscale 4. 7.101 / 4. 7.101 libswresample 2. 8.100 / 2. 8.100 Guessed Channel Layout for Input Stream #0.0 : mono Input #0, wav, from 'one-second-file.wav': Duration: 00:00:01.00, bitrate: 705 kb/s Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 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 'output.wav': Metadata: ISFT : Lavf57.75.100 Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 44100 Hz, mono, s16, 705 kb/s Metadata: encoder : Lavc57.100.103 pcm_s16le size= 166kB time=00:00:01.92 bitrate= 705.9kbits/s speed= 282x video:0kB audio:166kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.045887%
Attachments (1)
Change History (4)
by , 8 years ago
Attachment: | one-second-file.wav added |
---|
comment:1 by , 7 years ago
Cc: | added |
---|---|
Keywords: | regression added |
Priority: | normal → important |
Reproduced by developer: | set |
Status: | new → open |
Regerssion since 4240e5b047379b29c33dd3f4438bc4e610527b83.
comment:2 by , 7 years ago
Resolution: | → fixed |
---|---|
Status: | open → closed |
Fixed in edb4ba5bd4e7856fd6aaa37829150957dc5f4da3.
comment:3 by , 7 years ago
Version: | 3.2.4 → git-master |
---|
Sample one second file