0
$\begingroup$

I'm trying to understand how video compression works by looking at the HEVC encoder, and I was wondering how a compressed video looks like; I mean, in the encoder, the last step is entropy coding (CABAC), therefore, assuming we code a single frame:

  1. Is that frame actually watchable or do we need to decode it first?
  2. If we need to decode it, does it mean it returns to the original size?

I could also ask my question this way:

  1. Can I compare the output frame from the encoder with the input frame or do I need to decode it?
  2. In orhter words, if I implement an encoder and I save a compressed video, then, I need to implement a decoder to watch it?

I'm asking this because when you compress a video with any commercial software, you can watch that compressed file and I don't know if that means it is decoded by the video player the moment you double-click on it to watch it,, because the file size remains unchanged (compressed) but I see, in the task manager, lots of RAM used it.

Please, let me know if you need clarification on my question.

$\endgroup$

1 Answer 1

1
$\begingroup$

Is that frame actually watchable or do we need to decode it first?

Of course you need to decode it first. That's the point of encoding, isn't it?

Also, individual frames in a (modern) compressed video do not "exist" individually (exception: B-Frames, and those are heavily compressed still frames, still), they are made from differences to previous (and, for HEVC, also future) frames.

If we need to decode it, does it mean it returns to the original size?

Not quite sure what that would mean – decoding means reconstructing something that can be played back using any given device, in the end.

Can I compare the output frame from the encoder with the input frame or do I need to decode it?

I mean, what do you expect an encoder to do if it's not fundamentally changing the type of data? You need to decode.

In orhter words, if I implement an encoder and I save a compressed video, then, I need to implement a decoder to watch it?

Yes. That is what "encoding" means.

if that means it is decoded by the video player the moment you double-click on it to watch it,

yes.

$\endgroup$
2
  • $\begingroup$ "If we need to decode it, does it mean it returns to the original size?" I mean, if the encoder compress, does the decoder "de-compress"? Also, if you compress/encode using a software and decode using another software, does it mean the compressed file is stored in a standard format all decoders understand, right? like mp4? $\endgroup$ Jan 30, 2023 at 11:54
  • $\begingroup$ It takes the encoded data stream and converts it to a decoded form, as fit for the purpose of decoding (which might, for example, be display of frames on a RGB pixel surface that is the same pixel size as the original video, or might be much smaller; or it might be for the purpose of displaying it with a normal GPU, in which case it might be a texture of the original size, but not at all in a RGB color space; or it might be for the purpose of re-encoding with a different encoder at a different size and different frame rate…) $\endgroup$ Jan 30, 2023 at 12:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.