Log in

View Full Version : Re-encoding HuffYUV?


papilio
29th August 2007, 07:53
An earlier reply to my "File-size reduction suggestions and MC H.264 woes" suggested, as a way to reduce file-size before encoding/compression, first encoding with a lossless codec (HuffYUV for one) *before* implementing the *real*, playable compression.

My understanding/experience, limited as it is, has led me to the understanding that VD first un-compresses whatever you give it, then, after processing, re-encodes with a lossy codec of one's choosing. (I did give it a try last night -- first HuffYUV then WMV9. No luck, no evidence of HuffYUV remained.)

Am I just plain wrong about this -- am I doing making some mistake? Is there perhaps a workaround, or another program (though I'd hate to depart from VD) which *doesn't* de- and then re-compress?

Thanks for helping newbies! I try searching the forums, but end up lost/intimidated/overwhelmed (take your pick).

-- Michael

Zarxrax
29th August 2007, 11:54
I'm not really sure what you are asking here, but simply encoding to a lossless codec before encoding to something else will not result in smaller filesizes.
I think you are perhaps a little confused about the decompressing stage. Video files are ALWAYS decompressed when you need to actually do anything with them (watch them, edit them, reencode them, whatever).
Think of it kind of like a zip file. You can take a text document and zip it. Now, if you want to make a change to that text file, you can't change the zip file itself, because the zip file is not the text file. The text file has to be decompressed, you make a change, and then it can be recompressed. Compressed data is really not much more than a meaningless series of 1's and 0's, until it is decompressed.

J_Darnley
29th August 2007, 11:57
VirtualDub will decompress anyvideo you give it as most encoders need raw video to work on. VD won't create any tempory files, it links the decoder to the encoder (via a processing chain if you make one).

To make a lossless encode you must save the file from VD whilst you have chosen that encoder. This will create a huge file. I got a >9 GiB file for a film I was processing for my Dad.

When VD has finished you can load thge lossless encode into it and then use that to encode the final video with Xvid, WMV, whatever. VD will now have created two files, the lossless and the final encode. This way is sometime recommended if you are doing a two-pass encode and you have a really, really slow filtering chain (complex deinterlacing, sharpening, etc). This may save you some time as you only have to do the slow filtering once.

If you don't want to create a lossless encode, then don't but the program you use will still have to decode the video to provide the encoder with a raw video stream.

Dark Shikari
29th August 2007, 15:00
An earlier reply to my "File-size reduction suggestions and MC H.264 woes" suggested, as a way to reduce file-size before encoding/compression, first encoding with a lossless codec (HuffYUV for one) *before* implementing the *real*, playable compression.

My understanding/experience, limited as it is, has led me to the understanding that VD first un-compresses whatever you give it, then, after processing, re-encodes with a lossy codec of one's choosing. (I did give it a try last night -- first HuffYUV then WMV9. No luck, no evidence of HuffYUV remained.)

Am I just plain wrong about this -- am I doing making some mistake? Is there perhaps a workaround, or another program (though I'd hate to depart from VD) which *doesn't* de- and then re-compress?

Thanks for helping newbies! I try searching the forums, but end up lost/intimidated/overwhelmed (take your pick).

-- Michael
You encode to HuffYUV to save disk space for your lossless intermediate file, not to affect the final file. Lossless, by definition, means the final encode isn't affected.

LoRd_MuldeR
29th August 2007, 15:09
Only reason I can think about to encode to a lossless format first and then re-encode to a lossy format is a Multi-Pass encode with heavy (CPU intensive) filters. If you filter you video first and save the result to a lossless format, you can use the lossless (filtered) video as source for your actual Multi-Pass encode. This way you need to run the filters only once, not one time per pass. Nevertheless this will only give a speed-up, if the filters require more CPU time then encoding+decoding from/to the lossless format. And of course you need the diskspace...

Dark Shikari
30th August 2007, 04:35
Only reason I can think about to encode to a lossless format first and then re-encode to a lossy format is a Multi-Pass encode with heavy (CPU intensive) filters. If you filter you video first and save the result to a lossless format, you can use the lossless (filtered) video as source for your actual Multi-Pass encode. This way you need to run the filters only once, not one time per pass. Nevertheless this will only give a speed-up, if the filters require more CPU time then encoding+decoding from/to the lossless format. And of course you need the diskspace...
Also because many video editing programs (e.g. Adobe Premiere, Sony Vegas, etc) don't allow exporting directly to x264 or the like.