Log in

View Full Version : Bug in HuffYuv Codec?


SenorKaffee
14th January 2003, 23:04
Some people use the HuffYuv codec for capturing video, so I think this board fits best. ;)

I'm filtering a bunch of captured videos from MotionJPEG (hardware compression) to HuffYuv. The target resolution is 763x352 (cropped from 768x576).

If I try to play the filtered videos in the Media Player Classic, it doesn't show any video. If I try to open this video in VirtuaDub it crashes when I use the slide at the bottom. I think it's a codec bug so I didn't send the crash report to the author of VirtualDub.

Other resolutions seem to work without problems. Both 768x576 and 768x352 can be decoded just fine.

http://www.planetpantsu.net/huvycrash/5_1_60_768huvy.avi
3.5 Mbytes, 768x576, working

http://www.planetpantsu.net/huvycrash/5_1_60_352huvy.avi
2.9 Mbytes, 763x352, not working

http://www.planetpantsu.net/huvycrash/crashinfo.txt
VirtualDub Crashinfo

cjv
15th January 2003, 01:55
Originally posted by SenorKaffee
http://www.planetpantsu.net/huvycrash/5_1_60_352huvy.avi
2.9 Mbytes, 763x352, not working
I can confirm that this file crashes VDub as well, but I highly doubt it is a VDub bug (or even a HuffYUV bug).

Most codecs do not like resolutions that are not at least mod2. You are using a very strange one of 763x? If possible, either crop one pixel more or less, to get 762x or 764x and it should work fine.

cjv

SenorKaffee
15th January 2003, 10:31
I do this now, but because the codec doesn't "notify" VirtualDub about this and seems to encode just fine it could be considered a bug.

I found a paragraph on the HuffYuv homepage that could be the cause of the problem, but I think the codec should at least complain if the video source is invalid.

"Quirks and missing features
Huffyuv assumes that your video has a horizontal resolution which is a multiple of four. I may remove this limitation in the future."

I'll just send the author a small bug report.

frank
16th January 2003, 22:13
And for DirectShow you must have resolutions which have a multiple of 16.

SenorKaffee
17th January 2003, 12:46
Let's just say it is a not properly documented limitation? :D

Mike456
19th January 2003, 09:50
You can only compress on resolution that are a multiply of 16 (horizontally + vertically). e.g 768, 752, 736, 720 and so on. Divx, xvid and most other codecs also require that.

SenorKaffee
19th January 2003, 11:10
That's not the point.

As I already said I'm now aware that HuffYuv has certain limitations, but VirtualDub gives you an "invalid source" message when trying to compress a strange resolution with divX and doesn't produce garbage.

And I often use HuffYuv encoded AVIs as an "inbetween" file, that's where these resolutions come from.

dar1us
19th January 2003, 23:18
Kinda, but it is generally accepted that encodes must be in either multiples of 8 or 16, some may work at 4 or lower, but to counteract problems (if you dont want to change the aspect ratio) add borders and encode at one of those multiples.

So add a border of 3 to the left and encode at 768x352 or whatever.

VirtualDub will give you invalid source, because it IS an invalid source. Multiples my boy, multiples!

SenorKaffee
20th January 2003, 23:16
I am aware of the common limitations - I know my posting count cries "newbie" but I played around with video editing for some years now. If I crop by the eye to an inbetween file compressed with HuffYuv I don't usually care for it because I never ran into this limitation. Now I know better. :cool:

But when a codec produces garbage you can't just say "everyone knows that has to produce garbage so there does not have to be error handling for it". There is no error message that tells me "invalid source". That is the point of my 'bug report'. :rolleyes: