How to determine all video codec settings important for appending

Started by x2abc33d, April 04, 2020, 10:50:32 PM

Previous topic - Next topic

x2abc33d

I ran into the generic "Codec or codec settings across a cut point of the pasted video do not match" error and I'm trying to figure out what is actually different about the clip I'm trying to append.

I saw an old forum posts that shows a nice printout: https://avidemux.org/smif/index.php?topic=18020.0 but I can't find anything in the GUI that would let me get the same detailed printout of codec  settings. I can use ffmprobe -show_streams to get some info about each video, but it's not clear which of those properties Avidemux actually cares about when appending.
Can someone please point me in the right direction?

eumagga0x2a

Quote from: x2abc33d on April 04, 2020, 10:50:32 PM
I saw an old forum posts that shows a nice printout: https://avidemux.org/smif/index.php?topic=18020.0 but I can't find anything in the GUI that would let me get the same detailed printout of codec  settings.

There is no GUI to convey this info and I seriously doubt that it would be of any use as even the info in the Avidemux log is incomplete because we don't evaluate the whole truckload of H.264 parameter sets but just the minimal subset necessary to decode the POC* of a slice.

QuoteI can use ffmprobe -show_streams to get some info about each video, but it's not clear which of those properties Avidemux actually cares about when appending.

For appending the entirety of parameter sets must be strictly identical. Avidemux cares only about values included in ADM_SPSInfo for H.264 and ADM_SPSinfoH265 for HEVC: avidemux_core/ADM_coreUtils/include/ADM_videoInfoExtractor.h:43. It is very unlikely to encounter two differently encoded videos with all these values matching, but, of course, this sort of detection is not watertight.

* as you know from reading the code, FFmpeg freaks out when picture order count unexpectedly goes back, what users of popular libavcodec clients like VLC perceive as "the video stops for many seconds". Truth be told, we should disallow delete and append operations at recovery frames completely, because the resulting stream is always invalid. But this is like the fight with the coronavirus: you are damned when you do the right thing, you are damned when you don't.