is Huffyuv 2.1.1 really lossless?

Locked
User avatar
Khanh Bui
Joined: Tue Jul 06, 2004 12:16 am
Location: Houston, TX
Contact:
Org Profile

is Huffyuv 2.1.1 really lossless?

Post by Khanh Bui » Sun Apr 02, 2006 2:22 pm

Everyone,
I've been using Huffyuv for a while now, and I thought that it was lossless meaning the quality is supposed to be identity to the source. Maybe I was naive to think that way. A careful look at the original footage and the Huffyuv-rendered footage made me realize that the Huffyuv-rendered quality actually slightly got worse. It's very subtle, but it seems to be true. Is it?

If so, then are there really lossless codec?

Thanks,

User avatar
Zarxrax
Joined: Sun Apr 01, 2001 6:37 pm
Contact:
Org Profile

Post by Zarxrax » Sun Apr 02, 2006 2:25 pm

As long as huffyuv encodes using the same colorspace as the source, then yes it is lossless.

Huffyuv only encodes to YUY2 and RGB though, and most video is stored as YV12... so yea, its not exactly lossless if a colorspace conversion happens.

A better codec to try might be lagarith, as it supports YV12.

User avatar
Khanh Bui
Joined: Tue Jul 06, 2004 12:16 am
Location: Houston, TX
Contact:
Org Profile

Post by Khanh Bui » Sun Apr 02, 2006 5:03 pm

Zarxrax,
Thanks for the info. Now I know why.

If you don't mind, is there any way for me to find out what colorspace a video clip is using?

Thanks,

User avatar
Zarxrax
Joined: Sun Apr 01, 2001 6:37 pm
Contact:
Org Profile

Post by Zarxrax » Sun Apr 02, 2006 6:15 pm

Using Avisynth, just use the command
Info()
after you load the video.

User avatar
Khanh Bui
Joined: Tue Jul 06, 2004 12:16 am
Location: Houston, TX
Contact:
Org Profile

Post by Khanh Bui » Tue Apr 04, 2006 3:28 am

Zarxrax,
I did find the time to try out your suggestions. I did use avisynth to find the colorspace of the clips I was using; it turned out to be YUY2. However, after numerous tries, I still could not get the rendered version to be lossless. I've decided to post a few images through yousendit so that if you're interested you can see what subtle differences I was referring to.

Let me know if you have any other suggestions,
Thanks again,
Khanh Bui


After using the lossless codec (I tried both Huffyuv and Lagarith and the results were the same)
http://s52.yousendit.com/d.aspx?id=0H8A ... OFLFAW76BD

Original clip
http://s52.yousendit.com/d.aspx?id=3MKO ... O66IBELKJM

User avatar
Keeper of Hellfire
Joined: Sun Jan 09, 2005 6:13 am
Location: Germany
Org Profile

Post by Keeper of Hellfire » Tue Apr 04, 2006 4:31 am

Assuming you have used VirtualDub(Mod): Did you use "Full processing mode" to save it? If so, VD(M) makes a color space conversion to RGB. Use "fast recompress" to keep it in YUY2 color space.

User avatar
Khanh Bui
Joined: Tue Jul 06, 2004 12:16 am
Location: Houston, TX
Contact:
Org Profile

Post by Khanh Bui » Tue Apr 04, 2006 11:57 am

Keeper of Hellfire,
Actually I was using Vegas 4.0. The source was interlaced so I kept it interlaced when rendering using the lossless codec. I've tried both upper field and lower field. I've tried YUY2, RGB, YV12. YUY2 produced better quality than RGB, and YV12 didn't work (it rendered 1 frame and then the rest was black, but the quality of this one frame seems to be completely lossless, which was kinda surprising).

From what you wrote, it seems to me that Vegas could be doing something fishy before allowing the lossless codec to do its job.

Thanks,

User avatar
Khanh Bui
Joined: Tue Jul 06, 2004 12:16 am
Location: Houston, TX
Contact:
Org Profile

Post by Khanh Bui » Mon Apr 10, 2006 11:52 am

For the record, I just want to let all those who was kind enough to provide useful inputs for my question know that I've fixed the problem, and now, I can render videos losslessly using Lagarith.

Here's how I did it using Vegas 4.0:

1) Install Lagarith of course
2) Choose Videos for Windows
3) Choose Lagarith for encoder
4) Choose Interlaced Upper
5) Choose YV12
6) Chose NTSC [720x480]
7) Change the frame rate from 29.97 to 30

That's all.

Locked

Return to “Video & Audio Help”