I have a very high quality video and I need to produce a high quality and a low quality version for transport into other systems.
For the high quality version I use
- a lossy compression (currently VP9 because I have HW acceleration for that)
For the low quality version I use
- half the framerate (possibly I could use even lower)
- lower resolution
- cropping to 50% of the canvas
- possibly an even lossier compression
Both video files need to be transferred over the same limited bandwidth link. The lower quality is somewhat time critical, so it needs to be as small as possible. The high quality video is not time critical, it can be transferred whenever free bandwidth is available. But the link being limited overall, I do not want to waste anything. Obviously some information is duplicated if I transfer the low quality video first and then the full high quality video. I wonder whether there are existing delta encodings that allow me to transfer only the low quality file and a delta file and reconstruct a high quality video at the destination.
Although information is duplicated, with standard video compressions I don't think there is much data duplicated if I just produce 2 videos using different parameters. So the delta would not be helpful. Instead the video encoding needs to be tuned in a clever way resulting in duplicated data that does not need to be sent twice.
A very naive algorithm to produce a useful delta would work like this: I start to produce the high quality version, thereby guaranteeing that every odd frame (if counting starts at 1) is an I-frame. To produce the low quality version I remove every even frame from the high quality version. So I get a low quality video with half the frame rate. As the delta I collect all the even frames and transfer them separately. At the destination I can combine odd and even frames again to losslessly reconstruct the high quality video.
Obviously that is not a very good algorithm. The delta will most likely be p-frames (or b if the codec used those). So I end up with a "big" low quality video and a "small" delta. The "other way round" would be preferred. Maybe the low quality video consisting of only I-frames could still be compressed using a lossless compression. This algorithm does not yet make use of cropping and downscaling. The cropping part I might be able to figure out myself without deeper studies in video encoding, the downscaling unlikely so.
So the question is: Are there known delta encodings for video files that would be applicable here? Preferably with an open source implementation.
As a further constraint I do not have a GPU available on the machine applying the delta. (But a GPU is available on the machine producing the delta.)