Encoding settings for lossless converison

Started by drake, April 28, 2018, 07:50:33 PM

Previous topic - Next topic

drake

Hello dear comunity.
I hope you can help me with some video encoding issues. I record a lot of HD-videos from TV with a Linux TV reciever. These files are saved with the h.264 codec in a ts-container.
Now I would like to cut out the advertising for archiving and leave the quality as untouched. Unfortunately, I can not use the copy mode because the cut points are not always on key frames.
Which settings for the Mpeg4-AVC codec would be most useful here?

eumagga0x2a

I would strongly suggest tolerating a few seconds of commercials rather than reencoding.

Unfortunately, with some H.264 streams, even cutting strictly on keyframes doesn't produce cleanly decodable results. This issue, which seems to be related to field encoding, is being currently investigated. In any case I'd recommend to use the most recent nightly build matching your operating system (on Linux, it is better to build from the latest git master yourself).

drake

Thank you for this view of the situation and the reference to the nightly version.
The key point for me, however, is the removal of commercials. I'd rather accept less quality  than one second commercials. Maybe not very smart, but sometimes you just have to be stubborn  ;D
The main problem with quality are scenes that work with relatively few different color gradients. Here I get with my settings clear block artifacts. I attached an example: The .ts file as original (relatively even gradient in the logo); test_s1.mkv a new encoding with default settings (crf19 / here you can see significant artifact formation). The last file, the only possibility to improve the quality so far: Here the qpmin parameter was set to 18. However, this leads to a significantly enlarged file in relation to the original, which is also very unfortunate.
megwe.bplaced.net/video/test_original.ts
megwe.bplaced.net/video/test_s1.mkv
megwe.bplaced.net/video/test_s2.mkv
Any suggestions?