[FFmpeg-trac] #9616(ffmpeg:new): concat of ffmpeg-created opus files defect

FFmpeg trac at avcodec.org
Thu Jan 27 15:21:54 EET 2022


#9616: concat of ffmpeg-created opus files defect
-------------------------------------+-------------------------------------
             Reporter:  Wolfgang     |                     Type:  defect
  May                                |
               Status:  new          |                 Priority:  normal
            Component:  ffmpeg       |                  Version:  git-
                                     |  master
             Keywords:  concat opus  |               Blocked By:
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------
 There seems to be a problem when concatenating two webm (with
 audiocodec opus) files (our application is to edit Big Blue Button raw
 source files for revising our teaching materials). Viewing
 them with firefox results in errors (both under ubuntu and under windows):

 (newly downloaded version ffmpeg-git-20220108-amd64-static.tar.xz)

 Minimal example: concat 2x 5 seconds of nothing, generated
 by ffmpeg itself:

 ffmpeg -f lavfi -i anullsrc -t 5 silence.webm
 ffmpeg -f lavfi -i anullsrc -t 5 silence2.webm

 ## file 'audiofiles.txt':
 file 'silence.webm'
 file 'silence2.webm'

 ffmpeg -f concat -i audiofiles.txt -c copy bla.webm


 Watching the video with firefox stops at 5 seconds with the following
 output:

 [Child 14301, MediaDecoderStateMachine #1] WARNING: Decoder=7fbf36a35300
 Decode error: NS_ERROR_DOM_MEDIA_FATAL\
 _ERR (0x806e0005) - virtual RefPtr<MediaDataDecoder::DecodePromise>
 mozilla::OpusDataDecoder::Decode(mozilla::M\
 ediaRawData *): Discard padding on interstitial packet: file /build
 /firefox-oDiU8w/firefox-96.0+build2/dom/medi\
 a/MediaDecoderStateMachine.cpp:3568


 ** when the first file is further cut by ffmpeg, there is no problem:

 ffmpeg -f lavfi -i anullsrc -t 5 silence.webm
 ffmpeg -ss 00:00:01 -i silence.webm -c copy -t 00:00:03 silence1.webm
 ffmpeg -f lavfi -i anullsrc -t 5 silence2.webm

 ## file 'audiofiles2.txt':
 file 'silence1.webm'
 file 'silence2.webm'

 ffmpeg -f concat -i audiofiles2.txt -c copy bla2.webm

 => then it works well with firefox. So the problem seems to be at the end
 of the generated file that then is the first file in the concat.

 * same problems for audio files that are not generated
   by ffmpeg but by obs <https://obsproject.com/>
 * watching the video with vlc or chrome works.


 If this is not considered a bug, I would be happy to learn how this is
 done correctly (without re-encoding by filter_complex).
-- 
Ticket URL: <https://trac.ffmpeg.org/ticket/9616>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list