CrazyEngineers
  • How does video encoding work?

    Kaustubh Katdare

    Administrator

    Updated: Oct 21, 2024
    Views: 1.0K
    I spent some time reading about: https://en.wikipedia.org/wiki/H.264/MPEG-4_AVC

    I'm wondering how video encoding actually works. I've tried searching onilne but found nothing that'd satisfy my curiosity. Remember I've no clue about video encoding.

    Can anyone explain in his/her own language? We don't need any copy-paste from various sources.
    0
    Replies
Howdy guest!
Dear guest, you must be logged-in to participate on CrazyEngineers. We would love to have you as a member of our community. Consider creating an account or login.
Replies
  • Manish Goyal

    MemberJan 18, 2010

    I don't know the whole process in detail but i can provide the base

    Basically a Video is analog data which is essential requirement for display of data on

    computer.so in order to transfer it through computer buses we have to convert it to

    digital data for which we can use many techniques like PCM ie Pulse code modulation

    For details of pulse code modulation you can refer wikipedia

    now in order to transfer it through computer network you have to encode the digital

    data to digital signal for that you can use either Polar or Bipolar encoding technique.here

    Basically we prefer digital signal for transer of data which has its own advantages.

    Polar encoding includes NRZ-I and NRZ

    Bipolar encoding includes Manchester or differential encoding
    Are you sure? This action cannot be undone.
    Cancel
  • moonfalsh

    MemberJan 18, 2010

    Upto my knowledge the encoding in video is done by KEYS. Most probably the public key and the private key is activated in the encoding and the decoding part.

    To get some complicated encoding they use some of the hash functions to encode the information which is considered as much secure thing in the process of encoding.

    This is what i have studied. Can anyone comment on my views????
    Are you sure? This action cannot be undone.
    Cancel
  • Manish Goyal

    MemberJan 18, 2010

    moonfalsh
    Upto my knowledge the encoding in video is done by KEYS. Most probably the public key and the private key is activated in the encoding and the decoding part.

    To get some complicated encoding they use some of the hash functions to encode the information which is considered as much secure thing in the process of encoding.

    This is what i have studied. Can anyone comment on my views????
    hey moonflash I think you are talking about encryption and decryption

    in which we require public and private keys these techniques are basically

    used for security of data

    but encoding techniques is used to transfer data from one place to another

    by converting data from digital to digital signal ,analog to analog signal
    Are you sure? This action cannot be undone.
    Cancel
  • moonfalsh

    MemberJan 18, 2010

    Oops! got cofused. Will search and tel my best my friend.
    Are you sure? This action cannot be undone.
    Cancel
  • faizaan

    MemberJan 19, 2010

    This is what i know about video encoding ;

    Basically there are 2 types of encoding ( i.e compression techniques )

    1)Lossless.(exact replica of orignal file can be obtained on decompression) eg:-runlength encoding
    2)Lossy.(exact replica cannot be obtained on decompression)eg:-jpeg,mpeg,

    Lossless compression can only be used to compress ascii text files or binary images in which there are only black and white pixels.

    So using technique call Run Length Encoding we can compress such binary images.

    Lossy compressionis used only when using lossless compression does not yields required compression ratio.So we need to remove some actual data but here we need to think of effect of such loss of data.And carefully remove data that does not effect visual quality .

    Now comes the real thing.

    As we know that continuous Video is generated by displaying several picture frames per second (fps)
    So when we capture any video the camera lens captures the picture frames using its ccd several times per second.And this data is converted into digital form i.e 0 & 1.

    Now as we know that the picture frames that will be captured number of times per secod will be much similar to one another
    So we can say that there is redundency in our captured video.So solution is that we will not store whole picture defination for each picture frame
    instead of that we will store only changes or deltas between succesive frames .This will reduce size of video file.

    But some times this is also not enough So technique known as motion compensation is used which carefully identifies those picture frames that can be discarded and remove such picture frames from video file
    Here the decison to discard the frame is taken so that removal of such frames does not effect much to visual quality of video.


    Thus using motion compensation more higher compression rates can be achieved.

    Pls correct me if i am wrong .

    The whole process of mpeg encoding is much longer but in nutshell i can say that it uses jpeg compressionn in begining and than apply motion compansation techniques to achieve higher compression ratio.
    Are you sure? This action cannot be undone.
    Cancel
  • Guttu

    MemberJan 21, 2010

    faizaan
    This is what i know about video encoding ;

    Basically there are 2 types of encoding ( i.e compression techniques )

    1)Lossless.(exact replica of orignal file can be obtained on decompression) eg:-runlength encoding
    2)Lossy.(exact replica cannot be obtained on decompression)eg:-jpeg,mpeg,

    Lossless compression can only be used to compress ascii text files or binary images in which there are only black and white pixels.

    So using technique call Run Length Encoding we can compress such binary images.

    Lossy compressionis used only when using lossless compression does not yields required compression ratio.So we need to remove some actual data but here we need to think of effect of such loss of data.And carefully remove data that does not effect visual quality .

    Now comes the real thing.

    As we know that continuous Video is generated by displaying several picture frames per second (fps)
    So when we capture any video the camera lens captures the picture frames using its ccd several times per second.And this data is converted into digital form i.e 0 & 1.

    Now as we know that the picture frames that will be captured number of times per secod will be much similar to one another
    So we can say that there is redundency in our captured video.So solution is that we will not store whole picture defination for each picture frame
    instead of that we will store only changes or deltas between succesive frames .This will reduce size of video file.

    But some times this is also not enough So technique known as motion compensation is used which carefully identifies those picture frames that can be discarded and remove such picture frames from video file
    Here the decison to discard the frame is taken so that removal of such frames does not effect much to visual quality of video.


    Thus using motion compensation more higher compression rates can be achieved.

    Pls correct me if i am wrong .

    The whole process of mpeg encoding is much longer but in nutshell i can say that it uses jpeg compressionn in begining and than apply motion compansation techniques to achieve higher compression ratio.
    Bang on!! That's the correct answer.😁
    Are you sure? This action cannot be undone.
    Cancel
  • Kaustubh Katdare

    AdministratorJan 21, 2010

    Thanks a lot, folks. With that information, I'm going to dig further. I'll post my questions in this thread.
    Are you sure? This action cannot be undone.
    Cancel
  • MaRo

    MemberJan 21, 2010

    Every codec uses different ways in compression & frame-to-frame transition..As motion picture only the frames transition is different the rest are normal still image compression techniques.

    - One of the most important compression is the YCC, it is a color space extracted from RGB

    Y = Luma or brightness, C=Color-Blue, C=Color-Red.

    Human eyes is much sensitive for luma variance much more than color change, so one color is replaced with whole image luma data & the third color can be predicted in the other end.

    This color space used within the compression techniques in JPEG format & most of (#-Link-Snipped-#) codecs like MPEG-1, MPEG-2..etc.

    - Another important compression factor is the algorithm used to transform image samples into frequency domain, as in JPEG the DCT is used, there's also DWT, FFT & much more transformations.

    These transformations are done on a very small portions (like 8x8 or 16x16 bits blocks) of the image & they can get the information of the whole portion in one value, the first value which can be named fundamental frequency, this gets much more compression to the image.

    And more more more about this topic, I've been reading about it for years now & it never ends.

    Compression always depend on removing the things that human can't detect, like in images: the third color elimination.

    Audio: Removing high frequencies & masked samples.

    Video: Frame-to-frame variance.

    That means the *real* compression is very little, it's just scientific elimination.
    Are you sure? This action cannot be undone.
    Cancel
  • faizaan

    MemberJan 21, 2010

    Thanks for appreciation .. Guttu & big_k also Maro has provided intresting technical info about video encoding.

    Thankyou ce .
    Are you sure? This action cannot be undone.
    Cancel
Home Channels Search Login Register