How can you transcode media to higher bitrates when there is no new information to be included?

205 views

How can you transcode media to higher bitrates when there is no new information to be included?

In: Technology

You can run the transcode job and set the bitrate very high no problem. You’re right in that the image quality won’t be any higher than the original input (without something modifying the video in between, but we will ignore that).

However that doesn’t mean the bitrate you request is impossible. The encoder doesn’t know what the source is. It just gets a bunch of still images in a row and needs to encode them into a video file. It looks at them and does its best to preserve all the details it sees. Now some of those “details” will actually be the errors and artefacts of the lower bitrate decoded version, but dammit, it’s going to preserve them as best it can! All the bits that are available to it will be used to make the new output look as close to the input it was given!

For some types of video – like a cartoon with very little motion and a lot of stills – you might not reach your requested bitrate. The encoder does reserve the right to say “I’ve done my best, higher bitrates won’t help”. However that point can still be way higher than the original input.

Also don’t forget multiple codecs exist. I might convert from codec A to codec B. If codec B is worse than codec A, yeah it’s going to need more bits just to not go to crap relative to what codec A can do. An original master source would be preferable to the codec A file I have, but sometimes you make do with what you have.

Think of it this way…. Can you spill the water from a mug into a bucket? Sure. There will be the same amount of water, just the container will be bigger.

Say you have a pixel of color C.
You transcode so it has 4x the video resolution.
Now you have a patch of 4 pixels arranged in a box, all of color C.
No new information, but needs more bytes.
Or you could do some thing like rather then send 20 frames, you send 60 frames. It’s just that each of the original 20 is sent 3 times.

There is some upsampling rule to “fill in” the missing information, which often means adding no information at all.

For instance, say you have a bitmap image encoded with a color depth of 8 bits. That is, each pixel is encoded with an 8-bit code that says which of 256 possible colors it is. Now you save this image as a 24-bit bitmap instead. The pixels will still be limited to the original palet of 256 colors. Each of these 256 colors has a corresponding 24-bit code that encodes the same color. You just won’t be using any of the other 16+ million codes/colors that are available at this higher color depth.

Or, suppose you take a 100*100 pixel image and save it as a 200*200 pixel image instead. Every pixel then becomes a block of 2*2 pixels, and the simplest way to do this is simply to copy the value of the original pixel to the new 2*2 pixels. This doesn’t actually improve the image quality (or add information) – it just takes up more space. There are more sophisticated ways of upsampling, these days even using neural nets to make intelligent guesses about the missing information, but it will always be a guess.

It’s a bit like paying somebody $100 in dimes, vs. paying them in $50-bills. It’s the same amount, just using unnecessarily many coins. But using dimes you can in principle pay more precise sums, e.g. $100.20, which you can’t when using large bills.