Buggy video after appending H.264 clips that had filters applied to raw H.264

Started by Ciaran O, July 28, 2021, 05:41:13 PM

Previous topic - Next topic

Ciaran O

I am splicing and appending H.264 shot on Google Pixels and processing the clips on Windows, using Avidemux 2.7.8 release.
I apply filters and the resulting footage looks fine.
However as soon as I try appending a clip that has had a filter applied, all the subsequent clips appear in green on Avidemux (and unwatchable on VLC, with random 'rainbow' artefacts).  There is no error message. The sound is normal.

The error seems to happen whatever the filter I use (eg just Fade let alone fancy filters like dropping or FPS), and whatever the processing options that I use.
I've tried recoding using different encoders and output formats, to no avail.
The x264 library ships with the installer, so no problem there it would seem.

The reason why I want to append clips that have been treated with filters is that I want to minimise recoding.
I want to join together most of the clips with no recoding... only a few scenes benefit from filters and this requires recoding.

There are no errors if instead I compile using raw footage only and then apply the filters afterwards, to the final version.  That works fine. 

However I see a drop in quality once Avidemux does the recoding  ... colours overall notably are less vivid, with a greyer, duller image.  This might be insignificant for some.  But the whole reason I prefer Avidemux is because it is lossless.

So any ideas on how I can append raw H.264 and a few other clips with filters applied ?
Thanks for any ideas.




Ciaran O

Maybe the above issue is a feature of Avidemux ?  Any ideas?  Thanks

eumagga0x2a

For appended video saved in copy mode to be playable, the codec and the codec extradata of both videos must match perfectly. Avidemux actually checks some of the properties specified by the extradata and warns if they don't match, unless you have disabled all warnings in Avidemux Preferences. Usually, this means that you will need to re-encode both videos.

Please use the latest nightly to have an easy way to inspect video codec extradata (the first 64 bytes of it, but this is often enough), 2.7.8 is pretty outdated.

Quote from: Ciaran O on July 28, 2021, 05:41:13 PMHowever I see a drop in quality once Avidemux does the recoding  ... colours overall notably are less vivid, with a greyer, duller image.

This indicates either a wrong range (the source has limited range, the output is flagged as full, so that the contrast is not properly enhanced by the player) or a wrong colorspace (Avidemux doesn't support conversion of BT.2020 into BT.709, it can only manually add a hint to Matroska or WebM containers for the player what colorspace the video is meant to be in).

It might help to identify the precise cause of poor colors if you post the output of MediaInfo for both videos involved as well as the project file from editing and encoding steps used to generate the filtered video in Avidemux.

Quote from: Ciaran O on July 28, 2021, 05:41:13 PMThe x264 library ships with the installer

This is completely irrelevant as Avidemux uses only the version of the library shipped with the application.