[FFmpeg-trac] #7288(avfilter:new): The amix filter is truncating a channel on merge

FFmpeg trac at avcodec.org
Fri Jun 29 13:00:29 EEST 2018


#7288: The amix filter is truncating a channel on merge
-------------------------------------+-------------------------------------
             Reporter:  veryflatcat  |                     Type:  defect
               Status:  new          |                 Priority:  normal
            Component:  avfilter     |                  Version:
             Keywords:               |  unspecified
             Blocking:               |               Blocked By:
Analyzed by developer:  0            |  Reproduced by developer:  0
-------------------------------------+-------------------------------------
 Summary of the bug:
 When merging 3 opus encoded audio channels in a mkv formatted container,
 the primary issue is that the first channel is incorrectly truncated. As a
 separate issue, the 3rd channel is incorrectly positioned in time.

  We have the following from ffprobe of the input file:

 {{{
     Stream #0:0: Audio: opus, 48000 Hz, mono, fltp (default)
     Metadata:
       DURATION        : 00:00:02.023000000
     Stream #0:1: Audio: opus, 48000 Hz, mono, fltp (default)
     Metadata:
       DURATION        : 00:00:02.048000000
     Stream #0:2: Audio: opus, 48000 Hz, mono, fltp (default)
     Metadata:
       DURATION        : 00:00:02.038000000
 }}}

 * Stream #0.0 is 2 seconds long, starts at 0 seconds and contains a 1kHz
 sine wave that was opus encoded
 * Stream #0.1 is 2 seconds long, starts at 0 seconds and contains a 1.5kHz
 sine wave that was opus encoded
 * Strea2 #0.2 is 1 second long, with the first packet apearing at 1 second
 and contains a 2kHz sine wave that was opus encoded


 How to reproduce:
 The ffmpeg version is 4.0.1-0york0~16.04 (Ubuntu)
 {{{
 ffmpeg --i test.mkv -filter_complex amix=inputs=3:duration=longest -ar
 8000 test.wav
 }}}

 This produces the expected wav file with the input stream #0:0 truncated
 at 1 second. The stream #0:2 starts at 0 seconds even though the first
 packet appears 1 second into the mkv stream.

 This can be established by viewing a spectrogram of test.wav (Audacity has
 such a tool). Attached is the input file (test.mkv) as well as an
 annotated output from Audacity's spectrogram view.

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


More information about the FFmpeg-trac mailing list