JPEG has a progressive enhancement mode where a full frame can be downloaded quickly at low quality, and then the quality enhanced as the file is continually loaded.
(Example image from http://promokit.eu/prestahop-blog/image-optimization-to-speed-up-your-site/)
I'm wondering if there is a widely compatible video codec that enables the same functionality.
If the codec were structured this way, it should be technically possible for a player to download a first-pass low-quality stream, begin playback immediately, and then download second-pass and third-pass quality enhancing streams if bandwidth is available to do so, combining them on playback for form progressively higher quality frames.
On the server, there would be segment files for each quality stream, similar to how HLS works today.
(Diagram from http://www.streamingmedia.com/Articles/Editorial/What-Is-.../What-is-HLS-(HTTP-Live-Streaming)-78221.aspx)
The key difference here is that with HLS, entire separate copies of the stream are stored in each stream's segments. If I want a mid-quality stream, I read from the mid-quality files only. If I want low-quality, I read from the low-quality files only.
What I'm proposing with progressive enhancement is that all players would always read the low-quality (first pass) stream files, and additionally the mid-quality (second pass) stream files if they wanted that mid-quality stream. For high quality, they would read all three. This should greatly reduce the storage overhead of the stream since the total disk usage to support low, mid, and high quality streams should be only slightly more than would be required for just the high quality stream. This means that the upload bandwidth required on the source end is much less as well, since the stream is effectively uploaded once (plus some overhead) for all three qualities. I imagine there would be overall a bit less CPU used in the encoding process since I'm only really making one stream (albeit in an unusual structure) rather than having to run three independent codecs simultaneously where much of the codec work is likely duplicated.
I have read about some proprietary codecs in random tech news articles, but never found anything concrete. I also know that a few companies did audio codecs this way when audio streaming was booming in the mid/late 90s, but that's apples and oranges.
Questions
- Is there a codec available that allows for progressive enhancement and segementation?
- Is there a way to do this with a widely implemented codec like VP8 or VP9?
I suppose there is some hacky stuff I could do with MJPEG, since MJPEG is basically JPEG progressive enhancement under the hood, but I'd rather find a better codec if it exists.