[FFmpeg-user] Reordering frames in corrupt GoPro videos
Mark Filipak
markfilipak.imdb at gmail.com
Fri Jul 19 04:58:59 EEST 2024
On 18/07/2024 17.56, Vincent Deconinck wrote:
> On Thu, Jul 18, 2024 at 12:26 AM Mark Filipak <markfilipak.imdb at gmail.com>
> wrote:
>
> Based on a recent tip, try this command:
>> ffprobe -flags2 +showall -i ...
>>
>> You may find that what you think is the first frame is not always the
>> first frame.
>>
>
> Thanks.
> I tried the above command but it reports some compatibility issues:
My bad. I assumed you knew more. Try this:
ffprobe -flags2 +showall -sexagesimal -select_streams v -show_frames -of flat -dn -i
in_bad_frame_order.mp4
Under some circumstances (all circumstances?) FFmpeg silently drops initial frames until it
encounters the first I-frame. That may be the case, and if it is, it would throw off your
shuffleframes pattern. If that is indeed the case, you may need to add initial dummy frames by
duplicating the first I-frame a number of times. You would need a -filter_complex.
The first thing to do is see whether there are any dropped frames at the beginning of
in_bad_frame_order.mp4.
About the 3 data streams, '-dn' will eliminate them from the target video. Otherwise, those 'errors'
don't really matter.
--Mark.
More information about the ffmpeg-user
mailing list