digitalFAQ.com Forum

digitalFAQ.com Forum (https://www.digitalfaq.com/forum/)
-   Project Planning, Workflows (https://www.digitalfaq.com/forum/video-workflows/)
-   -   Huffyuv YUY2 AVI to Blu-ray conversion? (and TBC samples!) (https://www.digitalfaq.com/forum/video-workflows/5984-huffyuv-yuy2-avi.html)

vhsdigital34 07-19-2014 12:14 PM

Huffyuv YUY2 AVI to Blu-ray conversion? (and TBC samples!)
 
Hi,

I've started to archive my old family VHS tapes using the following:

Panny SVHS -> ATI 7500 (PCI) -> virtualdub (huffyuv)

640x480 YUY2 (should I use 720x480 if I want to eventually burn it on a playable blu ray or future format?
PCM 48000Hz stereo 16bit
Frame rate: 29.97
No cropping

What are the software/steps I should use to burn these on Blu Ray/DVD (is there a difference between the two set up procedures)? What settings should I archive to be somewhat future proof (4k is coming as well as higher capacity Blu-ray Discs)

I'd like to test out whether the lines in the AVI file would disappear if converted to playable disc on a DVD or Blu Ray player.

Thank you very much!!

sanlyn 07-19-2014 01:36 PM

Quote:

Originally Posted by vhsdigital34 (Post 32665)
I'd like to test out whether the lines in the AVI file would disappear if converted to playable disc on a DVD or Blu Ray player.

Whatever defects are on your tape will still be there if you don't do something to clean them up. The act of encoding analog source doesn't clean up anything. It just encodes whatever is there and makes it more difficult to deal with.

Now the question is, what "lines"? Do they move around? Do they stay in the same place? Are you talking about side borders, or do you mean the usual head-witching noise at the bottom of VHS frames? Maybe a pic or even a short AVI sample of a few frames to show what you mean. If you make a frame capture, do it in something like VirtualDub where you can capture directly from the video. Don't make screen captures of a video playing in your PC media players.
:wink2:

DVD and BluRay are different encoding formats. However, both include standard definition frame sizes. DVD requires that you burn to DVD disc. BluRay requires that you burn to BD-R disc. Each requires a different encoding and authoring procedure, which would be the very last processing steps. Up to that point, lossless huffyuv AVI captures can be processed, edited, filtered, etc., the same way.

Home VHS is ultimately encoded/authored/burned for disc as 720x480 interlaced NTSC video (720x576 for PAL) with a 4:3 display aspect ratio (DAR). If your capture is 640x480, it is interlaced if it's from VHS. You can always resize later at the last minute to 720x480. Many encoders will do that for you during the encode, but I've always done it with best results using Avisynth to deinterlace/resize/re-interlace during the filtering step. This is sometimes necessary because many good capture cards won't allow capturing 4:3 input to 720x480, but it's OK if your drivers allow it. I just feel weird working with stretched video frames on a PC, but many people do it that way.

Depending on which version of huffyuv you're using, you might want to download a copy of the Lagarith lossless compressor, which you can think of as huff's "competition". Some versions of huffyuv won't compress to YV12, but Lagarith works with YV12, YUY2, and RGB. Reason: if you get into Avisynth, many of its best filters only work with YV12 video. DVD and BluRay are encoded as YV12. So you ask: why capture to YUY2 in the first place? Answer: it preserves more of the initial video data, since VHS "color" is more like YUY2. True, you end up YV12 ultimately but there are poor, better, and best ways of getting from other color spaces and into YV12. A lot of NLE's really don't do it that well, nor do they do a very good job of deinterlace and reinterlace -- in fact some software makes a real whack job of all of it.

If by mentioning BluRay you have a mind to upscale VHS to make it look like "high definition", most would advise strongly against it. It won't look like HD, it'll just look like badly resized tape. If you haven't made that capture look cleaner and spiffier, it'll look even more ridiculous if it's blown up. High definition is "high" due to a lot more than just bigger frame sizes. But BluRay does have a standard-def specification, the advantage being that you can encode standard definition to higher bitrates with BluRay's methods. BluRay can be encoded as either AVC/MPEG4 (h264 encoding) or as MPEG2 optimized for BluRay. In both cases the audio must be AC3 or PCM. Anyway, there's nothing wrong with well made DVD.

DVD( PAL & NTSC) encoding standards: http://www.videohelp.com/dvd#tech
DVD disc file structure: http://www.videohelp.com/dvd#struct

BluRay/AVCHD encoding standards: http://www.videohelp.com/hd#tech
BluRay disc file structure: http://www.videohelp.com/hd#filestruct

How much you intend to do with processing your capture is up to you, but I'd recommend Avisynth and VirtualDub to handle VHS defects or any other problems you might notice. You didn't mention what you're using for software. Meanwhile there are several free encoders and authoring apps that give good results, and there's always TMPGenc's line of affordable stuff for cut/edit, encoding, and authoring.

Nice to see that you used one of the best ways to capture VHS. I still use an old 7500 AGP AIW myself.

vhsdigital34 07-19-2014 02:00 PM

Thanks Sanlyn! That makes sense to me now.

Sorry, I meant to mention lines due to interlace AVI file

I mentioned blu ray due to the file size. I just realized when finalizing to a disc, the size will probably shrink? With blu ray, I wasn't planning on up scaling it but instead was looking at a media that would fit my file (an hour 23gb). If with DVD, we need to compress to get it to work, does blu ray allow closer to lossless (without upscale)?

This has been about a 7 month long project now (bought and sold my ADVC110) and replaced hardware and software with great advice from Lordsmurf, volksjager, and others.

I haven't mentioned software cause I don't have one yet. That's my next step and what I'm looking for. I have both a 2010 macmini as well as a PC (using I believe an AMD E450 GPU processor)

msgohan 07-19-2014 02:28 PM

Quote:

Originally Posted by vhsdigital34 (Post 32668)
If with DVD, we need to compress to get it to work, does blu ray allow closer to lossless (without upscale)?

Yes you need to compress it, and yes with Blu-ray you can use less compression and also use AVC instead of MPEG-2 to get closer to retaining the quality of the captured file.

vhsdigital34 07-19-2014 02:57 PM

It looks like according to "set custom video format" under "video" in virtualdub, I can select YUY2, YV12, as well as 16-bit RGB and 32-bit RGB.

sanlyn 07-19-2014 05:52 PM

What follows is what editors like to call "vast oversimplification", but here goes:

Big files into little files....

All final delivery formats such as BluRay, AVCHD, DVD, DivX, Xvid, etc., are lossy compressed encodes. The amount of compression and loss depends on several factors, but generally higher bitrates involve less loss than lower bitrates. The lower the bitrate, all else being equal, the more you lose. Decoding (un-encoding) lossy encodes doesn't get back what was lost. If you're familiar with JPG compression, you know that JPG images lose quality every time they're edited and re-saved. Depending on what kind of "quality" setting your photo app allows (some will say highest, high, medium, low, etc., or a quality index percentage), what those settings indicate is progressively lower and lower data retention and more and more discarded databits.

Lossless compression is more like ZIP or RAR. What you put into a ZIP file is what you get back. "Higher" compression in a ZIP file simply means slower and more detailed compression operation, not loss. Lossless compressors like huffyuv, Lagarith, UT codec, etc., are designed for video and are usually customized for the colorspace used. They are faster than ZIP or RAR, but they don't compress as tightly because they're designed for real-time, high-speed use. Huffyuv and Lagarith compression result in about 1/3 to 1/2 of the uncompressed video's original size.

Video encoding uses more compression than lossless compressors. That's why it's called lossy. A lower bitrate uses fewer databits to describe the images. Fewer databits mean less detail, lower color resolution, less motion control, less edge definition, etc. The other space-saving technique that gets DVD or BluRay down to 1/10 the size of the input file is that encoded video doesn't contain 100$ complete images. A video of 100,000 frames doesn't contain 100,000 while images. The frames are arranged and encoded in Groups of Pictures (GOP's). Usually with DVD or BluRay this means a Group of 30 or fewer frames (Non-standard BluRay can have hundreds of frames in a GOP, but that's not for serious use), or something like m18 or less for DVD. Each GOP has at last one key or index frame that is a complete image. The rest of the "frames" contain only the changes that occur since the previous key frame. Also, for that same reason, "editing" lossy video encodes while in that lossy state can wreck that frame arrangement. So for simple cuts and joins one would use a smart-rendering editor for lossy encodes. Smart renderers would re-encode or rebuild only the GOP's in the immediate area of the cut. Some smart renderers are "smarter" than others, some use better encoding engines. Without smart rendering, you're forced to cut or add video only in full GOP's. So one good feature of lossless AVI is that AVI has 100% complete images. Yeah, that;s why their bigger files. Lossless AVI has no key frames, because they aren't needed. Another point about lossy encodes: if you'd like to fix up the color or reduce noise in lossy encoded video, you have no choice -- the video has to be re-encoded. Each re-encode involves additional (and permanent) loss. So that's why advanced users will make those modifications using lossless media rather than lossy final delivery formats.

BluRay or AVC/h264 encoding will give better quality retention at somewhat lower bitrates than MPEG would require for the same quality. That doesn't mean you can abuse the feature by using a BD bitrate of 3000 when the equivalent DVD needed a target of 6000 for good motion handling. Video requires a minimum bitrate depending on the nature of the material. Fast action, highly detailed scenes, animation with large flat areas of color or lots of subtle color gradations all come with higher bitrate requirements. That 6000-bitrate MPEG might let you get away with, say, 4500 to 5000 for BluRay or AVCHD, at equivalent GOP sizes. Of course, you can't play BluRay on a DVD player. One good point about lossless capture is that you can encode from there to anything you want, leaving your original unchanged.

If you have two hours of video, you're sneaking into the low-quality bitrate range to get all of it onto a single DVD disc without going into authoring for dual-layer DVD. With SD BluRay you have 25GB to work with, so you're home free.

Now, another vast oversimplification:

I think your "set custom format" question involves everyday VirtualDub processing(?). Almost all VIrtualDub filters, like many in the big apps from Adobe and Vegas, operate in RGB. By default VDub saves its work as uncompressed RGB24. Why 24? There are 8 databits per color channel, and there are 3 channels, so 8 x 3 = 24. Where does the 32-bit RGB come from? If you had video with a transparency layer you'd need 8 more bits. But most video doesn't have a transparency layer, so 32 bits is a waste of space. You have to tell VDub how you want your modified AVI to be compressed, so select huffyuv if you're saving to RGB or to YUY2. If you're saving to YV12 (no particular reason for it at this point), you'd need Lagarith for YV12.

The plain vanilla term for the colorspace of your YUY2 capture is "YUV", which encompasses many things. YUY2 isn't really regulation "YUV", but it's close enough. Going back to your original capture: VCR's do some odd things on playback, one of which is their habit of "enhancing" VHS to heighten contrast, over saturate colors, over sharpen, etc. The biggest problem is capturing with invalid luma and chroma levels. The valid luma and chroma levels for broadcast and most retail video is an RGB range of 16-240. Your TV and you PC monitor will display darkest "black" as RGB 0, brightest white as RGB 255. In other words, YUV 16-240 gets expanded to the equivalent of RGB 0-255 for RGB conversion. Problem with that? Yes. If the YUV capture is already RGB 0-255, or worse, then darkest darks get crushed (destroyed) and brightest brights get clipped (destroyed).

So, what most of us compulsive-obsessive video hobbyists do is to first open that capture in Avisynth, throw up some histograms and other measuring thingies, and then analyze that video for improper luma and chroma levels. This is easier than it sounds; invalid levels generally show themselves quite readily. Because you're still working in YUV, you can use some filters to bring things under control so that your levels don't get clobbered when they go to RGB. Once they're RGB, it's too late.

I was going to mention that Avisynth ought to be part of your toolkit. Yeah, I know, you gotta write that text script. But Avisynth can be used at very simple levels for some simple and basic tasks. True, it has some plugins that can work wonders, but VirtualDub has some pretty clever stuff as well. Anyway, you might give it a thought. Common VHS defects such as rainbows, DCT ringing, vertical jitter or frame hopping, chroma bleed, chroma shift, halos, dropouts, spots, head switching noise, uneven borders, etc., really don't give VirtualDub much of a chance. Avisynth is really the best thing around for that sort of junk.

lordsmurf 07-19-2014 11:39 PM

Yes, 720x480 is ideal. Only use 640x480 (1:1 4x3) for specific editing needs and streaming final products.

For VHS source, I suggest the max BD-R bitrate of 15mbps for MPEG-2, which is the only reason to use a BD-R for such content. The 720x480 is fixed, so you do not have a choice. Since this is VHS source, upscaling it in software will look terrible, and it's not easy anyway.

Note that I do this for all personal home movies. An SD BD-R 720x480 MPEG-2 @ 15mbps is the transparent format to VHS that we all wanted when only DVD existed. And it's why I waited to convert our home movies. (That and some filtering wants that have only existed in the past 5 or so years.) I've found AVC to not be all that useful for VHS conversion. I don't care about the smaller space use -- quality matters most to me.

A standard 25gb Blu-ray wuith 15mbps MPEG-2 content will fit about 3 hours worth. Works for me. That's better than both DVD and VHS. Just note that BD-R is NOT archival, so keep backups on HDD. Or if you like extra work, make a DVD copy -- either 352x480 3-4mbps on SL, or 6-7mbps 720x480 on DL.

The steps?
- Capture
- Edit and/or Restore as needed
- Author
- Burn

Now THAT'S an oversimplification! :)

If you means "lines" as in interlace, yes, they "disappear" when watched on a TV (an interlaced viewing device).

sanlyn is giving some good info from my quick skim, so you're getting what you need. :congrats:

vhsdigital34 07-20-2014 10:11 AM

Thanks guys. Do you recommend the Mac or PC for burning?
Which software is recommended? My 2010 macmini doesn't have internal bays so are there 4pin FireWire drives recommended?

Unfortunately my E-450 GPU PC neither has internal bays nor FireWire output. The XP machine does have a 6pin FireWire but not sure how well that PC would handle burning Blu Ray discs (not even sure if Blu Ray was around during the XP SP2 era

Worst case scenario I can perhaps bring my files over to my parents place.

When you say the Blu Ray 15mbps mpeg2 at 720x480 is the transparent format to VHS, do you mean at better settings it would go beyond the original VHS? Since it's getting compressed (whether lossless compression or lossy), wouldn't it lose lossless detail on playback or am I missing something? If that's not the case, would larger capacity discs only extend playback time?

What did you mean by Blu Ray 15mbps mpeg2 at 720x480 isn't archival? I thought either discs hold up for close to 100 years? If not, what's the shelf life? If it doesn't last that long I guess I'd have to get several HDs and back them up everywhere?

sanlyn 07-20-2014 10:42 AM

Firewire has nothing to do with burning optical discs. If you have no internal storage for DVD or BluRay burners, use a USB external drive.The most reliable software for burning is the free ImgBurn (Windows only). Ignore any extra freeware or toolbar offers when ImgBurn is installed. One good DVD/BD app that has worked well for authoring and burning for years is TMPGenc Video Mastering Works. But you would need ImgBurn anyway for other purposes.

You can archive to backups of optical disc, but hardliners don't consider them to be ideal archives. Ideally, the best permanent archive is your losslessly compressed original capture to external HDD. Other than that, save a copy of the final output encode to hard drive. All an optical disc needs is one scratch in the right place to make it useless. Don't go thinking that you'll be really careful and never scratch a disc. A lot of discs have been ruined by very careful people who were having a bad day. Cheap discs suffer internal fractures and layers that separate, even if they're not used. Verbatim BD-R is well constructed and reliable. Do not use the new "LTH" discs -- inferior in every way and a waste of money.

vhsdigital34 07-20-2014 11:00 AM

Sweet! Thanks sanlyn!

I've been hesitating about external USB drives because Lordsmurf mentioned elsewhere it's not enough and that if external, FireWire would be needed. Maybe Lordsmurf can elaborate? I do have USB3.0 on my little E-450 GPU PC (win7). Would that suffice? What amount of ram would I need for it to be stable?

sanlyn 07-20-2014 11:41 AM

Lordsmurf might be referring to Macs in the matter of Firewire. I'm sure he'll chime in to clarify. Can't use ImgBurn on a Mac anyway.

Win7 sort of "survives" on 2GB of RAM if you don't do much except email and watch an occasional UTube video. You need 4GB for decent performance. If you're going to be doing heavy video work, go for 8GB. If you're working HD video with win7, you'd need 16GB or more, but using a low-power PC won't help much with HD no matter how much RAM you have. A PC for video needs at least 2 hard drives, 1 smaller one for the operating system and installed software, and a second for videos and processing. Processing video on the same drive or partition as the operating system makes for serious bottlenecks, very frequent reboots, and strange behavior --not to mention occasional freezups and crashing.

I don't understand why people use Macs or laptops for video processing. It just doesn't make sense. But if that's all you own, you have to do the best you can.

lordsmurf 07-20-2014 05:00 PM

The physical Blu-ray disc is not archival -- the content is (arguably) archival @ 15mbps MPEG-2 720x480. The construction of a BD-R is an inverted CD-R with a thin condom on the bottom. Neither BD-R and CD-R is archival, unlike the DVD-R sandwich structure.

Unlike DVD, more like CD, several BD-R manufacturers are actually pretty good. Memorex (PHILIPS) is surprising good. Yes, avoid the Verbatim LTH discs -- they're more great, lots of coasters.

USB2 almost always dropped frames because it's not sustained, and because USB goes through CPU. USB3 on a newer system (multi core CPU) may be fine. I've not tested it, because I use internal or eSATA these days.

I really like my Mac for photography, but it's just the wrong tool for video. It takes effort to get video tasks working, often via installing Windows in either Bootcamp or Parallels. It's an ordeal, to be sure, though it can be done.

sanlyn 07-20-2014 05:23 PM

Oops, I forgot about rplying to mthe rest of your questions:

Quote:

Originally Posted by vhsdigital34 (Post 32732)
When you say the Blu Ray 15mbps mpeg2 at 720x480 is the transparent format to VHS, do you mean at better settings it would go beyond the original VHS?

I think by "transparent" he means that the higher bitrates and other factors that come with standard definition BluRay are closer to the original input than earlier forms of MPEG with its bitrate limits and other limitations.

You can't "improve" analogue source through the encoding process alone.

Quote:

Originally Posted by vhsdigital34 (Post 32732)
Since it's getting compressed (whether lossless compression or lossy), wouldn't it lose lossless detail on playback or am I missing something?

Yes, you're missing the fact that playback of digital video is not the same thing as encoding or compression. Playback has nothing to do with either, because playback doesn't alter the original. However, it's true that analog tape suffers a bit every time it's played, even if to a small extent -- not because it's "recompressed" but because tape and its magnetic layer is more easily damaged physically.

Quote:

Originally Posted by vhsdigital34 (Post 32732)
What did you mean by Blu Ray 15mbps mpeg2 at 720x480 isn't archival? I thought either discs hold up for close to 100 years?

Possibly, if you go by articles from CNET and other consumer sources who forget to mention that people don't store their discs in lead-lined, radiation-free, temperature controlled and air=free vacuumed enclosures. 10 to 20 years is what I've heard under more normal circumstances. Temperature extremes affect the layer bonding more quickly. Storing discs flat in those nice multi=page vinyl covered binders with the discs on the bottom pages pressed down by all the discs on the other pages, or fumes from non-archival plastic wrappers and envelopes (not to mention acid from those non-archival paper wrappers), and the chemical action of lacqeur based inks used in marking pens that people incorrectly use to write on new discs -- add all that together, and you likely won't get 100 years from those discs, especially home-made discs. Also consider that the blank discs you buy at Amazon and burn at home are not manufactured or recorded the way retail discs are. Retail products aren't burned at all, they're pressed or embossed en masse.

I'm certain it's not as dire as it sounds, but we're talking about the important stuff. Certainly you wouldn't expect to archive hundreds of your movie discs on hard drives (I have about 3500 home-made discs myself). In 100 years you might not be able to find a disc player in stores, just as you can't find a good CRT today (No, that's not quite right. CRT's are still used in mastering labs, but those hefty thingies run several times times the price you and I paid for our old SONY Wega's). Plenty of people make backup copies of movie discs; they're properly kept in a stable area and are unaffected by such things as the heat of playback because they're not played, they're just kept. The important stuff gets burned to hard drive and left there, ready to be revived and transferred during the next media revolution.

lordsmurf 07-20-2014 05:27 PM

You could always tell when a VHS tapes was converted to DVD. It had unavoidable artifacts. Making DVDs was thus an art, and why many people learned to filter, and why there were so many "encoder shootouts" (pros magazones and amateur sites alike).

Assuming the source is relatively clean, even if grainy, it's hard to tell if the VHS source being viewed is still source, a lossless capture, or a BD MPEG @ 15mpbs. It's transparent most of the time.

That's what I mean. :)

A good disc (mostly referring to DVD) lasts at least 30-50 years, and is heavily affected by humidity and disc manufacturing quality. Anything shorter (5-10-15-20) is boogeyman stupidity. Anything too long (100+ years) is ridiculous optimism.

The problem with BD-R is the bottom layer. It's very susceptible to usage -- both scratches and pressure.

As sanlyn says, as I always remind people, the PLAYERS are the future issue -- not the disc. We already have that issue with Betamax and U-matic and CRTs, but in time it will include VHS and eventually even DVD. Can you play a format from 100 years ago? Have any audio cone players laying around?

vhsdigital34 07-20-2014 08:07 PM

Just curious, is there a higher mbps that would be exactly the same as playing a VHS tape or will anything additional just look exactly the same as 15mbps?

My E-450 processor is dual core 1.65ghz and has 4gb of ram but doesn't have FireWire (only USB3.0..). Is XP out of the question for Blu Ray? My XP is a tower desktop (got it for capturing purposes) and has the 6pin FireWire from my original attempt with ADVC110 but it only has 2gb of ram with a 2.4ghz P4.

lordsmurf 07-20-2014 08:36 PM

15mpbs is the max for Blu-ray MPEG-2 @ 720x480/576.

MPEG is complex. Most people are only aware of a fraction of what's possible. You can do more yes (bitrate, profiles, etc), but for VHS source the falloff is usually 15mbps.

vhsdigital34 07-20-2014 08:46 PM

Hmm I guess anything above 15mbps would be hard to test since it doesn't exist ("HD Blu Ray" not out to most consumers yet).

When you say falloff, you mean when it starts to get significantly diminished returns or that there are no gains whatsoever after 15mbps? I don't want to go off and burn a whole bunch of these only to find out the next disc format (coming relatively soon) or media would make for a better transfer (besides length of time). If Blu Ray is the best we're going to get out of VHS at 15mbps I'm all in

lordsmurf 07-20-2014 08:53 PM

Yes, falloff = diminished returns, but it usually also means there's no gains whatsoever. It depends on the source tape.
Yes = Blu-ray is the best we're going to get out of VHS at 15mbps (720x480 MPEG-2)

The next disc format? There probably won't be any more discs in the future, only downloads.

premiumcapture 07-20-2014 09:20 PM

Just out of curiosity, why isn't H.264 suggested for Blu-Ray as an option?

lordsmurf 07-20-2014 09:27 PM

H.264 doesn't handle interlace very well.


All times are GMT -5. The time now is 05:58 PM

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