[FFmpeg-user] Create "concatenable" h264/mp4

Gabriele Greco gabrielegreco at gmail.com
Wed Feb 6 12:16:54 EET 2019


It's possible to get from an mp4 with ffprobe all the parameters needed by
ffmpeg to encode an h264/mp4 that is 100% concatenable with the original
mp4 (without re encoding)?

We are having a lot of problems creating "titles" (simple loops of a few
secs of a single PNG image) for existings video files.

Everything works 90% of the time, but breaks if something is different from
the parameters we can get probing the original file before encoding the
title.

We found that the following parameters breaks the concat filter or the
playback of the destination video on given players (typically quicktime is
very picky):

- different fps/timebases (easy to probe with ffmpeg)
- different profile/level (easy to probe with ffmpeg, at least for the
declared one)
- different number of ref frames used (impossibile to probe with ffmpeg,
can be probed with mediainfo)
- something else we cannot probe neither with mediainfo or ffprobe

It will be a very useful option for ffprobe (or ffmpeg?) something like a
-guess_encoding switch that outputs something like:

> ffprobe -guess_encoding source.mp4
-vcodec h264 -profile baseline -level 5 -ref-frames 5 -s 1280x720 -r 25
(...) -f mp4

... I'm asking since video concat it's quite a common problem and maybe
someone already solved it in a clean way.

-- 
Bye,
 Gabry


More information about the ffmpeg-user mailing list