@don.alcombright said:
Now that I have this up and running in docker (thanks @bjønness) is this a straight remux of the container or does it tweak other things as well? What I don’t want it lose quality. I tested it out on a 480p avi file and it went from 1.3GB to 750MB, which is troublesome to me.
Hey mate. Thanks for the feedback.
This is kind of a difficult question to answer.
Basically, the AVI container uses XVID/mpeg4 video codec. It’s quite inferior by comparison to that of h.264 or h.265. The compression algorithms used in h.265 are extremely good at creating a high quality output file, at a much smaller file size. On average, I can create an output file of h.265/MKV that is around 30-50% smaller than the input, with minimal loss.
To the question of video quality loss: You will always get some loss in any form of compression of video. Think of it like copying a cassette tape in the old ghetto blasters of the 80’s/90’s. If you copy the tape once, it’s a pretty good quality copy. If you copy the copy, then the quality decreases. If you keep doing this over and over, you will eventually end up with just white noise, as the quality decreases with each copy.
That said, I’ve tweaked the script to give as good a quality output as possible (in my eyes at least), with a good amount of compression.
If you want to see what the script is doing, you can add echo to the beginning of line 216. It will show you the command it is running, instead of actually running it.
Like this: echo avconv -i "$i" $vconvert $fps -crf $crf -map_metadata 0 -map_chapters 0 -c:s copy $aconvert "${i%.*}."$container
It means you can compare the output as required.
Hope that helps!