[FFmpeg-trac] #3829(avfilter:open): atempo filter cuts off data

FFmpeg trac at avcodec.org
Wed Aug 6 19:05:47 CEST 2014


#3829: atempo filter cuts off data
------------------------------------+------------------------------------
             Reporter:  rmk         |                    Owner:
                 Type:  defect      |                   Status:  open
             Priority:  normal      |                Component:  avfilter
              Version:  git-master  |               Resolution:
             Keywords:  atempo      |               Blocked By:
             Blocking:              |  Reproduced by developer:  1
Analyzed by developer:  0           |
------------------------------------+------------------------------------
Changes (by cehoyos):

 * keywords:   => atempo
 * status:  new => open
 * version:  unspecified => git-master
 * reproduced:  0 => 1


Old description:

> The following command line with a file containein two click sounds (one
> in the beginning, the other right before the end) demonstrates the
> problem:
>
> ffmpeg -i two-clicks.wav -af "atempo=0.5" -acodec pcm_s16le two-clicks-
> half-speed.wav
> ffmpeg version N-65311-g6f3e15a Copyright (c) 2000-2014 the FFmpeg
> developers
>   built on Aug  5 2014 17:28:11 with Apple LLVM version 5.1
> (clang-503.0.40) (based on LLVM 3.4svn)
>   configuration: --enable-gpl --enable-libx264 --enable-libfaac --enable-
> nonfree --extra-ldflags=-L/usr/local/lib --extra-
> cflags=-I/usr/local/include
>   libavutil      52. 97.100 / 52. 97.100
>   libavcodec     55. 72.101 / 55. 72.101
>   libavformat    55. 51.101 / 55. 51.101
>   libavdevice    55. 13.102 / 55. 13.102
>   libavfilter     4. 11.102 /  4. 11.102
>   libswscale      2.  6.100 /  2.  6.100
>   libswresample   0. 19.100 /  0. 19.100
>   libpostproc    52.  3.100 / 52.  3.100
> Guessed Channel Layout for  Input Stream #0.0 : mono
> Input #0, wav, from 'two-clicks.wav':
>   Duration: 00:00:01.00, bitrate: 705 kb/s
>     Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 44100 Hz, 1
> channels, s16, 705 kb/s
> Output #0, wav, to 'two-clicks-half-speed.wav':
>   Metadata:
>     ISFT            : Lavf55.51.101
>     Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 44100 Hz,
> mono, s16, 705 kb/s
>     Metadata:
>       encoder         : Lavc55.72.101 pcm_s16le
> Stream mapping:
>   Stream #0:0 -> #0:0 (pcm_s16le (native) -> pcm_s16le (native))
> Press [q] to stop, [?] for help
> size=     168kB time=00:00:01.95 bitrate= 705.9kbits/s
> video:0kB audio:168kB subtitle:0kB other streams:0kB global headers:0kB
> muxing overhead: 0.045340%
>
> Then checking the output shows the file is 0.05 seconds too short:
>
> ffmpeg -i two-clicks-half-speed.wav
> ffmpeg version N-65311-g6f3e15a Copyright (c) 2000-2014 the FFmpeg
> developers
>   built on Aug  5 2014 17:28:11 with Apple LLVM version 5.1
> (clang-503.0.40) (based on LLVM 3.4svn)
>   configuration: --enable-gpl --enable-libx264 --enable-libfaac --enable-
> nonfree --extra-ldflags=-L/usr/local/lib --extra-
> cflags=-I/usr/local/include
>   libavutil      52. 97.100 / 52. 97.100
>   libavcodec     55. 72.101 / 55. 72.101
>   libavformat    55. 51.101 / 55. 51.101
>   libavdevice    55. 13.102 / 55. 13.102
>   libavfilter     4. 11.102 /  4. 11.102
>   libswscale      2.  6.100 /  2.  6.100
>   libswresample   0. 19.100 /  0. 19.100
>   libpostproc    52.  3.100 / 52.  3.100
> Guessed Channel Layout for  Input Stream #0.0 : mono
> Input #0, wav, from 'two-clicks-half-speed.wav':
>   Metadata:
>     encoder         : Lavf55.51.101
>   Duration: 00:00:01.95, bitrate: 705 kb/s
>     Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 44100 Hz, 1
> channels, s16, 705 kb/s
> At least one output file must be specified
>
> And looking at the file in a wave editor (and listening to it), you
> see/hear that the second click was cut off.

New description:

 The following command line with a file containein two click sounds (one in
 the beginning, the other right before the end) demonstrates the problem:
 {{{
 ffmpeg -i two-clicks.wav -af "atempo=0.5" -acodec pcm_s16le two-clicks-
 half-speed.wav
 ffmpeg version N-65311-g6f3e15a Copyright (c) 2000-2014 the FFmpeg
 developers
   built on Aug  5 2014 17:28:11 with Apple LLVM version 5.1
 (clang-503.0.40) (based on LLVM 3.4svn)
   configuration: --enable-gpl --enable-libx264 --enable-libfaac --enable-
 nonfree --extra-ldflags=-L/usr/local/lib --extra-
 cflags=-I/usr/local/include
   libavutil      52. 97.100 / 52. 97.100
   libavcodec     55. 72.101 / 55. 72.101
   libavformat    55. 51.101 / 55. 51.101
   libavdevice    55. 13.102 / 55. 13.102
   libavfilter     4. 11.102 /  4. 11.102
   libswscale      2.  6.100 /  2.  6.100
   libswresample   0. 19.100 /  0. 19.100
   libpostproc    52.  3.100 / 52.  3.100
 Guessed Channel Layout for  Input Stream #0.0 : mono
 Input #0, wav, from 'two-clicks.wav':
   Duration: 00:00:01.00, bitrate: 705 kb/s
     Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 44100 Hz, 1
 channels, s16, 705 kb/s
 Output #0, wav, to 'two-clicks-half-speed.wav':
   Metadata:
     ISFT            : Lavf55.51.101
     Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 44100 Hz, mono,
 s16, 705 kb/s
     Metadata:
       encoder         : Lavc55.72.101 pcm_s16le
 Stream mapping:
   Stream #0:0 -> #0:0 (pcm_s16le (native) -> pcm_s16le (native))
 Press [q] to stop, [?] for help
 size=     168kB time=00:00:01.95 bitrate= 705.9kbits/s
 video:0kB audio:168kB subtitle:0kB other streams:0kB global headers:0kB
 muxing overhead: 0.045340%
 }}}
 Then checking the output shows the file is 0.05 seconds too short:
 {{{
 ffmpeg -i two-clicks-half-speed.wav
 ffmpeg version N-65311-g6f3e15a Copyright (c) 2000-2014 the FFmpeg
 developers
   built on Aug  5 2014 17:28:11 with Apple LLVM version 5.1
 (clang-503.0.40) (based on LLVM 3.4svn)
   configuration: --enable-gpl --enable-libx264 --enable-libfaac --enable-
 nonfree --extra-ldflags=-L/usr/local/lib --extra-
 cflags=-I/usr/local/include
   libavutil      52. 97.100 / 52. 97.100
   libavcodec     55. 72.101 / 55. 72.101
   libavformat    55. 51.101 / 55. 51.101
   libavdevice    55. 13.102 / 55. 13.102
   libavfilter     4. 11.102 /  4. 11.102
   libswscale      2.  6.100 /  2.  6.100
   libswresample   0. 19.100 /  0. 19.100
   libpostproc    52.  3.100 / 52.  3.100
 Guessed Channel Layout for  Input Stream #0.0 : mono
 Input #0, wav, from 'two-clicks-half-speed.wav':
   Metadata:
     encoder         : Lavf55.51.101
   Duration: 00:00:01.95, bitrate: 705 kb/s
     Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 44100 Hz, 1
 channels, s16, 705 kb/s
 At least one output file must be specified
 }}}
 And looking at the file in a wave editor (and listening to it), you
 see/hear that the second click was cut off.

--

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


More information about the FFmpeg-trac mailing list