digitalFAQ.com Forum

digitalFAQ.com Forum (https://www.digitalfaq.com/forum/)
-   Edit Video, Audio (https://www.digitalfaq.com/forum/video-editing/)
-   -   Convert HuffYUV to lagarith without loss? (https://www.digitalfaq.com/forum/video-editing/6413-convert-huffyuv-lagarith.html)

hysteriah 03-03-2015 05:10 AM

Convert HuffYUV to lagarith without loss?
 
I think I made a "mistake" and started digitizing my VHS tapes using the HuffYUV codec, but now I've change my mind and think I will move over to the Lagarith codec instead. But it would be really nice to archive all my videos with the same codec. Since both the HuffYUV and lagarith codecs are both lossless, I belive it is possible to convert between those to codecs without any loss at all? But how can I do it?

I guess the easiest would be to simply use VirtualDub, but I guess that will result in YUY2 to RGB convertion and quality loss? How can I convert them without any loss at all?

sanlyn 03-04-2015 03:27 AM

I capture in huffyuv instead of Lagarith (because I'm using an ancient AGP XP machine -- a tad slow for Lagarith at capturing). After I review the capture I recompress to Lagarith, especially since most Avisynth filters work in YV12.

-Open the huffyuv AVI in Virtualdub. Do not load any Virtualdub filters.
-"Video..." -> "color depth..." -> Select same colorspace as input file (YUY2, whatever)
-"Video..." -> "compression..." -> Select Lagarith lossless compressor, config Lagarith for the same colorspace.
-"Video..." -> "fast recompress"
-If audio is present: "Audio...." -> "direct stream copy"
-"File..." -> "Save as AVI...", give new name and location for output.

"Fast recompress" doesn't engage RGB and won't let you run VirtualDub filters anyway. All it does is recompress the input file to whatever colorspace and compressor you specify.

BTW, the term isn't "convertion", it's "conversion". Or maybe you're typing is getting spastic like mine ??, LOL!
:wink2::):wink2:

hysteriah 03-04-2015 04:45 AM

4 Attachment(s)
THANK YOU VERY MUCH! :) :congrats:

Okey, so changing the following settings is all that needs to be done to create a 100% lossless conversion from HuffYUV to Lagarith?:

http://www.digitalfaq.com/forum/atta...1&d=1425465807

http://www.digitalfaq.com/forum/atta...1&d=1425465807

http://www.digitalfaq.com/forum/atta...1&d=1425465807



But why is "Color Depth" disabled when "Fast recompress" is selected?
http://www.digitalfaq.com/forum/atta...1&d=1425466267

sanlyn 03-04-2015 05:26 AM

Quote:

Originally Posted by hysteriah (Post 37020)
But why is "Color Depth" disabled when "Fast recompress" is selected?

Think about it. If all you want is "fast recompress", you wouldn't change the incoming or outgoing colorspace from the original or from the defaults. You can still change the compressor. The reason you go into color depth beforehand is because you don't want the default output, which is RGB.

Also, be careful about changing VDub's default colorspace input on the left-hand of this dialog window that you posted above:
http://www.digitalfaq.com/forum/atta...garith-vd01jpg

At the top of the left-hand column, VDub's default is "AutoSelect". You should leave it that way, unless you think VDub is having a problem reading the input's colorspace. Once you make a selection other than the incoming Autoselect default, you have to reset it for every clip you load, unless you close VirtualDub and restart it.

hysteriah 03-04-2015 05:47 AM

Okey. Thank you very much, Sanlyn.
Your information was incredible helpful :)
I think you just "saved my life"! *hehe* :congrats:

friendly_jacek 08-13-2015 12:56 PM

Quote:

Originally Posted by hysteriah (Post 37013)
I think I made a "mistake" and started digitizing my VHS tapes using the HuffYUV codec, but now I've change my mind and think I will move over to the Lagarith codec instead.

so, what's "wrong" with huffyouv again? this is what used/plan to use in my project and don't want to make "mistakes."

hysteriah 08-13-2015 02:24 PM

I do have some issues with HuffYUV when editing my videos in Adobe Premiere

sanlyn 08-13-2015 02:33 PM

It's not a "mistake" using huffyuv for analog capture or lossless working files. True, some apps don't like huffyuv or imbed a version that won't read anything that the app itself didn't compress.

Many filters, such as many in Avisynth, work only in YV12. You wouldn't want to go YUY2->YV12->YUY2 to save that working file, it's an unecesssary color change because sooner or later your final output format is almost always YV12 for DVD, BluRay, AVCHD, and many web apps. Try saving your work with huffyuv as YV12.

Avisynth makes color conversions correctly, based on the color matrix, colorspace, interlaced or progressive, and other characteristics of the working file, along with your own instructions to tell Avisynth what's going on. Some NLE's (e.g., Adobe and sometimes VirtualDub) don't always convert YUY2 and YV12 cleanly, and some apps never do get YV12->RGB back to YV12 for final encoding correctly from their own filters. Some encoders accept YV12 input only and won't make the conversion for you.

YUY2 is almost always used for tape capture because YUY2 is the closest easy-to-get the equivalent to the YPbPr color storage of VHS tape. You might not have to ever use a YV12 or RGB filter on that video. I use huffyuv for caps because my ancient capture PC's are a bit pokey with Lagarith -- which is not that slow (let us know if you can tell the difference), but apparently it's just minutely slow enough to cause a few dropped frames on my old gear.

Another problem brought up by a member here and by others: there are so many versions of huffyuv out there over the years, including some by ffdshow that seem to change every year or so, that often there are compatibility problems reading huff files between systems. In my own case, after downloading a ton of sample huff videos from forums over the years, I got tired of unplayable files and stopping to enable ffdshow's huff or modify my own huffyuv to match what some other users have set as threshold. Afterwards I have to disable ffdshow's version or reconfigure my own in order to read my own huff files.

Lagarith doesn't seem to have those problems across implentations. Both Lagarith and huffyuv for quite a while could not be read by some media players. Just about any player can handle both of them now, unless you get an ancient huff version or an obsolete ffdshow or other codec pack version, and you have to play around just to see a video. Of course if all you do is stay with YUY2, you have to depend on the way your filtering NLE converts to RGB for its filters and the way it converts RGB to YV12 for encoding. Knowing that some NLE's don't do RGB->YV12 correctly, I do it myself in Avisynth. I often use the HCenc MPEG encoder, which wants YV12 and won't convert for you. Another advantage with Lageith is the versatility to save files as RGB24, RGB32, RGBA, YUY2, and YV12 when needed.

In short: I use Lagarith for working files that need work and saving in YV12, and saving to YV12 for encoding. I use huffyuv for analog capture because it's faster in my capture machines and I don't want to hassle with capture colorspaces other than 4:2:2 YUY2 for analog tape.

lordsmurf 08-16-2015 12:52 PM

I don't find YV12>YUY2 or even YUY2>RGB to be the end of the world. Those are generally harmless compared to 4:1:1 vs 4:2:2 vs 4:2:0 conversions, with the NTSC DV 4:1:1 being awful to work with.

Huffyuv is fine for most people in most uses. It's preferred.


All times are GMT -5. The time now is 01:08 PM

Site design, images and content © 2002-2024 The Digital FAQ, www.digitalFAQ.com
Forum Software by vBulletin · Copyright © 2024 Jelsoft Enterprises Ltd.