[FFmpeg-trac] #10288(avfilter:new): defect: concat does not skip video errors

FFmpeg trac at avcodec.org
Tue Mar 28 21:57:41 EEST 2023


#10288: defect: concat does not skip video errors
-------------------------------------+-------------------------------------
             Reporter:  Lyubomir     |                     Type:  defect
  Filipov                            |
               Status:  new          |                 Priority:  normal
            Component:  avfilter     |                  Version:
                                     |  unspecified
             Keywords:  concat       |               Blocked By:
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------
 Summary of the bug:

 I am using concat in order to create a timelapse video. However, it
 happens, that from 50GB files a single file is corrupt. The corruption
 consists in the following:

 When playing the video, it starts normally but at some exact time, 5
 seconds from it cannot be played. ffplay outputs errors

 [aac @ 0x55bdaf31c3c0] Number of bands (13) exceeds limit
 (8).itrate=21842.8kbits/s speed=36.3x
 Error while decoding stream #0:1: Invalid data found when processing input

 but after skipping these 5 seconds, the playback continues. This is ok,
 the file is corrupt and I do not care about these 5 seconds.

 The problem is with concat. I have a list of files and I do not know if
 there is a problem in any of them. Their total length is 5 hours and their
 total size is 50GB.

 when concat encounters the same problematic file, it outputs the error:

 [aac @ 0x55e6c2a369c0] Number of bands (13) exceeds limit
 (8).itrate=21771.2kbits/s speed=34.8x
 Error while decoding stream #0:1: Invalid data found when processing input
 [concat @ 0x55e6c259d140] h264_mp4toannexb filter failed to receive output
 packet
 timelapse_test/list-tiny.txt: Invalid data found when processing input

 and stops without even trying to skip the error or even ignoring the file
 at all
 Both playing the file with vlc or ffplay or even converting it with ffmpeg
 have the proper behavior - they skip the problematic area (5 seconds) and
 continue the video playback

 I even noticed that the error is related to the aac audio codec. As I do
 not need audio in the timelapse that I am creating, I added the -an option
 in order to ignore audio. Now converting with ffmpeg does not result in
 error, but converting with concat still produces an error and aborts the
 processing.

 Creating a timelaps video this way is very tedious. I have to start the
 process, which takes hours, and if there is an error, I have to find the
 erroneous video (concat does not even print the file name which has caused
 an error), manually find the problematic area, convert it so that I crop
 this area, put it back in the file list and start the timelapse again...
 until the next error.

 I have also tried running ffprobe on the problematic video, but it does
 not find any error - it seems that it does not scan the entire file

 How to reproduce:
 {{{

 (concat example with a single file)
 % ffmpeg -f concat -safe 0 -i <(echo file
 '/media/nuclear/0000-0001/DCIM/Movie/2023_0318_111248_005.MP4') -vcodec
 copy -an concat-copy.mp4

 result:

 [concat @ 0x55d676fae180] h264_mp4toannexb filter failed to receive output
 packet/s speed=54.7x
 /dev/fd/63: Invalid data found when processing input
 frame=12641 fps=3297 q=-1.0 Lsize=  558073kB time=00:03:30.66
 bitrate=21701.3kbits/s speed=54.9x
 video:558011kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB
 muxing overhead: 0.011056%

 The resulting video length is 3:30, where the problematic area start. If
 there are multiple files in the list, the processing will stop on the
 first corrupt file, which breaks processing multiple files using concat

 (no concat)
 ffmpeg -i /media/nuclear/0000-0001/DCIM/Movie/2023_0318_111248_005.MP4
 -vcodec copy -an file-copy.mp4

 result: (no errors)
 frame=18000 fps=4000 q=-1.0 Lsize=  780377kB time=00:04:59.98
 bitrate=21310.7kbits/s speed=66.7x
 video:780291kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB
 muxing overhead: 0.011070%

 The resulting video has the entire length (5 minutes). At 3:30 it freezes
 for 5 seconds and then continues normally (which is the expected behavior,
 as the input file is corrupted)

 ffmpeg version 4.3.1-4ubuntu1 Copyright (c) 2000-2020 the FFmpeg
 developers
   built with gcc 10 (Ubuntu 10.2.0-9ubuntu2)

 }}}
 Patches should be submitted to the ffmpeg-devel mailing list and not this
 bug tracker.
-- 
Ticket URL: <https://trac.ffmpeg.org/ticket/10288>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list