VideoHelp Forum




+ Reply to Thread
Results 1 to 21 of 21
  1. Hello, my e-friends!

    I have a question. I keep hearing and hearing (actually reading) that when we re-encode a video, we lose quality in the process. However, doesn't this only applies when we re-encode with different specifications? Let's say, without considering the audio, if we re-encode an MPEG-2 video, 720 X 480 size, 29.97 fames per second, and 8000 kbps constant bitrate to another MPEG-2 with exactly the same specifications, do we still lose quality in the process? I tend to think that losing ony happens when we re-encode to different specifications or to different video formats like from MPEG-2 to WMV, for instance.

    If I am wrong, why does this degradation take place then?

    CAL "Disco Mak"
    Quote Quote  
  2. Member
    Join Date
    Apr 2003
    Location
    Maryland
    Search Comp PM
    I could be wrong but I believe it wil continue to degrade no matter what.
    No DVD can withstand the power of DVDShrink along with AnyDVD!
    Quote Quote  
  3. Member
    Join Date
    Dec 2004
    Location
    Australia
    Search Comp PM
    Whenever you re-encode with a lossy codec or change specifications, you lose quality. Whether the quality loss is noticable or not is a different matter. So MPEG-2 to MPEG-2, you lose quality. MPEG-2 to wmv, maybe not since wmv supports lossless audio and video. Re-encoding lossy to lossless doesn't make a lot of sense though since the filesize increases and the quality stays the same. Can be usefull for instance if you have some heavy filtering and are doing multiple passes.
    Quote Quote  
  4. Member mats.hogberg's Avatar
    Join Date
    Jul 2002
    Location
    Sweden (PAL)
    Search Comp PM
    Originally Posted by Disco Makberto
    why does this degradation take place then?
    Think of a copier (Xerox machine) - Take an image, make a copy. Place the copy on the copier and copy that. Repeat a while. each generation will be (more or less) worse than the previous. Depending on how good the copier is, after one or more generations, you start to see differences between the original and the copy.
    That's similar to how lossy compression works. Every time, something is taken out of the source to make the compressed version. Even if you use exactly the same compression as the source, this will happen.

    /Mats
    Quote Quote  
  5. Always Watching guns1inger's Avatar
    Join Date
    Apr 2004
    Location
    Miskatonic U
    Search Comp PM
    First encode - throw away some data
    Second Encode - throw away some data
    Third Encode - throw away some data
    Fourth Encode - you get the picture

    At no point does that data get restored, so it a constant erosion. Some codecs are more forgiving than others, and may survive several generations before the damage becomes very obvious. Others will show signs from the initial encoding onwards.
    Read my blog here.
    Quote Quote  
  6. How about if you take an mpeg2 at 3700kbps and re-encode at 7000kbps? And what kind of data loss are we talking about? Is it color info? Motion (noticeable in fast-moving scenes). Detail? What are we going to notice first?


    Darryl
    Quote Quote  
  7. Originally Posted by dphirschler
    How about if you take an mpeg2 at 3700kbps and re-encode at 7000kbps?
    The image quality will still degrade a bit.

    Originally Posted by dphirschler
    And what kind of data loss are we talking about? Is it color info? Motion (noticeable in fast-moving scenes). Detail? What are we going to notice first?
    All of those things happen. The most obvious problems are macroblocks and ringing (or mosquito noise) around high contrast edges.

    8x, nearest neighbor enlargement of mosquito noise:



    This is an artifact of DCT compression and happens regardless of the bitrate chosen.
    Quote Quote  
  8. Member Cornucopia's Avatar
    Join Date
    Oct 2001
    Location
    Deep in the Heart of Texas
    Search PM
    What people may forget is that to re-encode = encode + decode + encode. That means, 1st encode loses some stuff, decode doesn't lose anything--but it does play the lesser stuff AS IF it were always uncompressed AT THAT LEVEL.
    And so, encoding the 2nd time, it sees an UNCOMRPESSED (but of lesser quality) image TO START WITH, and then takes out what it needs.

    The good thing is, that image has less "stuff in need of taking out", so the 2nd and subsequent compressions are a little more efficient than the 1st--unless you're REALLY taking out alot (much lower bitrate).

    Example:

    Starting with good image = 100%

    1st compression is bitrate of 6000kbps = 85%
    De-compressed image is still 85%

    Starting with that,
    2nd compression is bitrate of 7500kbps (thinking "let's make this better) = 90%
    Well, 90% of 85% is 76.5% -- STILL LESS.
    If you had done 6000kbps again, it might have been 87% (because of less to take out),
    but that still is 87% of 85% = 73.95%
    Even 9800kbps isn't = 100%, it might be 98.5%
    So 98.5% of 85% = 83.725%.

    How to fix this?

    Go back to the source and do a new 1st encode.

    Scott
    Quote Quote  
  9. Member mats.hogberg's Avatar
    Join Date
    Jul 2002
    Location
    Sweden (PAL)
    Search Comp PM
    Originally Posted by Cornucopia
    Example:

    Starting with good image = 100%

    1st compression is bitrate of 6000kbps = 85%
    De-compressed image is still 85%

    Starting with that,
    2nd compression is bitrate of 7500kbps (thinking "let's make this better) = 90%
    Well, 90% of 85% is 76.5% -- STILL LESS.
    If you had done 6000kbps again, it might have been 87% (because of less to take out),
    but that still is 87% of 85% = 73.95%
    Even 9800kbps isn't = 100%, it might be 98.5%
    So 98.5% of 85% = 83.725%.
    Excellent explanation! I think I'll bookmark it.

    /Mats
    Quote Quote  
  10. Member
    Join Date
    Dec 2004
    Location
    Australia
    Search Comp PM
    The other thing is that an encoder can't really tell the difference between artifacts and details, so it has to waste bits preserving artifacts and if you don't crop/resize to move the macroblocks, then you can compound the macroblocks.
    Quote Quote  
  11. Hello Scott and rest!

    Thanks to each of you for your explanations.

    Okay, Scott, I kind of understand what you are saying, but I have two questions:

    1) Let's say that I have an MPEG file recorded from an analog VHS source. The original digital file is obviously the MPEG file but the original file is still the analog VHS source. If I work from the original digital file, will I be encoding or re-encoding? Needless to say is the fact that I cannot work from the original file, the analog file, since it is analog.

    2) If we always lose quality no matter what, then, when we author DVD-ready files such as VOB, BUP, etc. from an MPEG source, will we also be losing quality?

    Any responses are appreciated.

    CAL "Disco Mak"
    discomakberto@megamixers.co.uk
    Quote Quote  
  12. There are MPEG editors that will not reencode if you are performing simple cut and paste operations -- except for small segments right at the cuts which need to be reencoded. Or, if you add a transition between two clips, they will only reencode the frames during the transition.

    If you perform any filtering (resizing, sharpening, color adjustments, etc) the filtered segment will have to be reencoded.

    In short, anything that modifies the picture necessitates that the MPEG data be decompressed, the picture modified, then the picture be recompressed.

    Converting to VOB to MPEG is just a different multiplexing, or layout, of the audio, video, and other other data. The MPEG data isn't decoded for this, just "repackaged".
    Quote Quote  
  13. Member Cornucopia's Avatar
    Join Date
    Oct 2001
    Location
    Deep in the Heart of Texas
    Search PM
    I concur with jagabo, with this addition:

    Authoring may include encoding (if it's necessary to make compliant) or just be re-organizing (if it's already compliant).

    And, Yes, VHS is analog and so isn't a "file" such that it can be reworked. Nonetheless, if your 1st generation from VHS is directly an MPEG, and it isn't exactly what you want in terms of specifications, then IIWY, I'd re-digitize the VHS to the correct specifications.

    (Of course, I almost ALWAYS digitize to uncompressed/lossless/MJPEG/DV AVI/QT first anyway).

    Scott
    Quote Quote  
  14. Member mats.hogberg's Avatar
    Join Date
    Jul 2002
    Location
    Sweden (PAL)
    Search Comp PM
    Originally Posted by Cornucopia
    Authoring may include encoding
    I beg to differ. Authoring and encoding are two entirely separate tasks. Like Jagabo says, encoding alters the video/audio, whereas authoring merely repackages it.

    /Mats
    Quote Quote  
  15. Member Cornucopia's Avatar
    Join Date
    Oct 2001
    Location
    Deep in the Heart of Texas
    Search PM
    I'm talking about Authoring programs/packages, not "authoring" the process.

    Scott
    Quote Quote  
  16. Member j4gg3rr's Avatar
    Join Date
    Nov 2005
    Location
    Australia
    Search Comp PM
    I think it is possible to encode mpeg to mpeg without loosing quality as below:
    use all P frames no I or B frames
    quant matrix all 1's

    Warning do not try this at home.
    It may just fill up the rest of you hard drives free space

    There is another way, go into explorer and cut and paste
    Quote Quote  
  17. Member Cornucopia's Avatar
    Join Date
    Oct 2001
    Location
    Deep in the Heart of Texas
    Search PM
    Originally Posted by j4gg3rr
    I think it is possible to encode mpeg to mpeg without loosing quality as below:
    use all P frames no I or B frames
    quant matrix all 1's

    Warning do not try this at home.
    It may just fill up the rest of you hard drives free space

    There is another way, go into explorer and cut and paste
    No I-frames???? That's not a valid GOP.
    And QuantMatrix of 1's is counter to "saving space", which is what MPEG is all about.

    Yes, let's "don't try this at home".

    Scott
    Quote Quote  
  18. Member j4gg3rr's Avatar
    Join Date
    Nov 2005
    Location
    Australia
    Search Comp PM
    Sorry all I frames no P or B.
    But does that loose quality at all, maybee in the search precision it still does?
    Quote Quote  
  19. Originally Posted by j4gg3rr
    Sorry all I frames no P or B.
    But does that loose quality at all, maybee in the search precision it still does?
    All I frames still loses quality. I frames are essentially jpeg images.
    Quote Quote  
  20. Member
    Join Date
    Aug 2005
    Location
    Belgium
    Search Comp PM
    Hello,

    I have been following this discussion and I'm wondering :
    - suppose you do "original -> codec -> decode -> re-encode" and
    you use the same codec for 're-encoding' as you did for the
    'original' compression and the same quality, will there be a
    difference between the 2 coded files ?
    Quote Quote  
  21. Member mats.hogberg's Avatar
    Join Date
    Jul 2002
    Location
    Sweden (PAL)
    Search Comp PM
    Yes. Cornucopias explanation still holds true, no matter what source and destination codec is used.

    /Mats
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!