Recommend NTSC VHS mp4 Project/Encode Settings?

Pea-Hicks wrote on 6/21/2024, 9:43 AM

Hi all, looking for opinions on project properties and encode settings for a file digitized from NTSC VHS (see media info and my project properties below). I'm running Vegas Pro 20 on Windows 10. Basically I'm looking for the best mp4 encode settings (I usually start with presets in the "MAGIX AVC/AAC MP4" folder and customize from there) that maximize quality while minimizing file size and not adding any pointless upscaling or other "upgrades" to the file that do nothing but increase the file size without increasing the quality of the final result. I've captured at "overkill" settings for VHS to give the most flexibility at the encode stage. This isn't for archival purposes, it's for easy sharing online in excellent quality, either via cloud or uploading to YouTube. In this particular case, the original VHS tape was in EP mode, so quality is already going to be limited, but I still want to get the best out of it that I can, while still maintaining a practical file size that's no larger than it needs to be. Thanks in advance for your advice, and let me know if I've left out any crucial details.

General
Complete name                            : J:\vhs01.avi
Format                                   : AVI
Format/Info                              : Audio Video Interleave
Format profile                           : OpenDML
Format settings                          : BitmapInfoHeader / WaveFormatExtensible
File size                                : 589 GiB
Duration                                 : 6 h 11 min
Overall bit rate                         : 227 Mb/s
Frame rate                               : 29.970 FPS

Video
ID                                       : 0
Format                                   : YUV
Codec ID                                 : v210
Codec ID/Hint                            : AJA Video Systems Xena
Duration                                 : 6 h 11 min
Bit rate                                 : 224 Mb/s
Width                                    : 720 pixels
Height                                   : 486 pixels
Display aspect ratio                     : 3:2
Frame rate                               : 29.970 (30000/1001) FPS
Standard                                 : NTSC
Color space                              : YUV
Chroma subsampling                       : 4:2:2
Bit depth                                : 10 bits
Compression mode                         : Lossless
Bits/(Pixel*Frame)                       : 21.333
Time code of first frame                 : 00:00:00:00 / 00:00:00:00
Time code source                         : Adobe tc_A / Adobe tc_O
Stream size                              : 580 GiB (98%)

Audio
ID                                       : 1
Format                                   : PCM
Format settings                          : Little / Signed
Codec ID                                 : 00000001-0000-0010-8000-00AA00389B71
Duration                                 : 6 h 11 min
Bit rate mode                            : Constant
Bit rate                                 : 2 304 kb/s
Channel(s)                               : 2 channels
Sampling rate                            : 48.0 kHz
Bit depth                                : 24 bits
Stream size                              : 5.97 GiB (1%)
Alignment                                : Aligned on interleaves
Interleave, duration                     : 1034  ms (31.00 video frames)

 

Comments

mark-y wrote on 6/21/2024, 10:59 PM

Owing to the mediocre nature of VHS, especially when recorded EP, your render bitrate settings are of relatively little importance; what is important is getting the dimensions, frame rate, display aspect ratio (DAR), and deinterlacing just right for anamorphic video tape source to delivery-worthy MP4.

Your source, which was captured as NTSC "IMX" DV, which is slightly different than your original video tape NTSC DV 4:3, needs these settings to perfectly match the source aspect ratio when rendering to AVC non-anamorphic progressive, which incidentally is the universal standard for delivery on the internet.

To attract viewers on Youtube, I recommend using the Vegas Upscale plugin, applied at the Media Level to output 720p, at a magnification factor of 1.48x.

Start with these Project properties

And set your Magix AVC Render template like this.

Or use Voukoder to render, which automatically matches your project.

Either way the 720p mp4 delivery will look like this on Youtube or on your home player.

Welcome to the discussions.

mark-y wrote on 6/22/2024, 1:13 AM

as 960 x 720 would be the correct 4:3 resolution

Nope, not for NTSC "IMX" DV format, which the OP's AJA card capture appears to be.

486x(720x0.9091) does not equal 4:3 aspect. The true aspect of that format is 1.3468, not 1.333_ (the exact 4:3 ratio is true only for NTSC non-DV, 1.0 PAR source, from the 1990s). That's where the extra 12 pixels in width come from.

On the other hand, the true aspect for standard NTSC DV is 480x(720x0.9091), or 1.3637

There are 2 checkboxes in Vegas to fudge the output to avoid thin black lines in the project and render, but I'm a wannabe perfectionist ( who still makes mistakes!)

As far as social media, it's almost exclusively 16:9 ratio, but that would make his 4:3 source look really fat.

Pea-Hicks wrote on 6/22/2024, 1:33 AM

@mark-y Thanks! In the upscale plugin, do I simply put in the 1.48 factor, or are there any other settings I need to bother with?

mark-y wrote on 6/22/2024, 1:47 AM

That should do it, but be sure to put it at the Media Level, or at the very least before Event Pan/Crop.

fr0sty wrote on 6/22/2024, 1:48 AM

I don't remember if upscale in 20 had the newer AI models that 21 has... Smooth will be lowest quality but will render the fastest, sharp will render very slowly, but will provide better quality (test this first with a short render, as your mileage will vary. I often find the AI upscale effect does absolutely nothing while still costing hours in render time).

Last changed by fr0sty on 6/22/2024, 1:48 AM, changed a total of 1 times.

Systems:

Desktop

AMD Ryzen 7 1800x 8 core 16 thread at stock speed

64GB 3000mhz DDR4

Geforce RTX 3090

Windows 10

Laptop:

ASUS Zenbook Pro Duo 32GB (9980HK CPU, RTX 2060 GPU, dual 4K touch screens, main one OLED HDR)

mark-y wrote on 6/22/2024, 1:49 AM

@Pea-Hicks Let me know if I've made any mistakes, I very rarely work with IMX footage, which is as scarce as hens' teeth.

Pea-Hicks wrote on 6/22/2024, 2:04 AM

@mark-y Honestly, I'm not sure how I ended up with IMX? My VHS deck is going through a DPS 475 TBC via S-Video, then SDI out to a Blackmagic Decklink Studio card to BlackMagic Media Express, 10-bit YUV. Guess I need to look into whether I've set something wrong?

mark-y wrote on 6/22/2024, 2:08 AM

I don't remember if upscale in 20 had the newer AI models that 21 has... Smooth will be lowest quality but will render the fastest, sharp will render very slowly, but will provide better quality (test this first with a short render, as your mileage will vary. I often find the AI upscale effect does absolutely nothing while still costing hours in render time).

I don't use the Sharp models, I place a very light Unsharp Mask before the Upscale plugin in the Media fx chain, it's not only faster, it looks more natural to me.

mark-y wrote on 6/22/2024, 2:12 AM

It's happening in your capture card, and it's not "very" wrong. My only real concern is the accuracy of the deinterlacing.

mark-y wrote on 6/22/2024, 10:03 AM

Another unimportant observation; unlike movie film to digital transfers, capturing 10 bit 422 is overkill, but will do no harm.

Your native NTSC video tape is limited to 4:1:1 (at best), 8 bits per channel, 480 lines, 59.94 fields per second. Capturing at 422 10 bit, your net usable bits are still 8 bits in a bigger bucket, 4:1:0 chroma subsampling (by LCF), 29.97 frames per second.

An added "trick" for Youtube that I didn't mention for the sake of clarity, is "bobbing" the separated fields to smoother 59.94 fps, the one disadvantage being increased shadow noise, which can further impair underexposed video tape footage.

Pea-Hicks wrote on 6/22/2024, 11:26 AM

@mark-y Yeah, I know my capture settings are overkill, but I guess I'm going with the "oversampling" idea- capture more than is actually there on the tape, do whatever processing/editing I need to do, then encode with a more sensible setting. In most cases, I delete the original capture file anyway, so it's not a big deal for me to have a huge file temporarily taking up hard drive space.

Pea-Hicks wrote on 6/22/2024, 11:48 AM

@mark-y Another question... can you explain the benefit of adding the upscale plugin, vs not adding it and rendering at your recommended settings anyway? it dramatically increases the render time, even using the "smooth" setting, and I'm not sure I see much quality difference (at least not with this particular project).

 

mark-y wrote on 6/22/2024, 12:07 PM

@Pea-Hicks this is turning into a good discussion, thanks for keeping an open mind.

With DV and VHS source, which tends to be sketchy, You may not notice much of a difference. You may not wish to bother with the extra encoding time.

In tests with commercial 480i DVD source using the Smooth Model and ultra-light Unsharp Mask in Vegas, the results at 720p when compared with conventional Bicubic upscaling, can be dramatic:

 

Pea-Hicks wrote on 6/22/2024, 12:31 PM

@mark-y Yeah, that's a huge difference. With my EP mode VHS source, I'm not seeing anything like that kind of difference.

john_dennis wrote on 6/22/2024, 2:27 PM

Time-shifting the 1996 Olympics on a tape that my wife used to record her soap opera every day produced a lot crap on tapes that I don't have the will to overcome.

It is refreshing that one could buy a car for less than $40,000 though.

Edit: ... and to see some people who have likely retired by now.

mark-y wrote on 6/22/2024, 3:35 PM

Vegas does quite a nice job of upsampling 29.97 Interlaced to 59.94 Progressive, aka "bobbing," but even better. https://youtube.com/shorts/MUqhxNTX53k

Todd-AO wrote on 6/23/2024, 1:02 AM

@mark-y Yeah, that's a huge difference. With my EP mode VHS source, I'm not seeing anything like that kind of difference.

For a free upscale option (trial limited to 5mins per video) there is VideoProc AI

It's by no means perfect and from my limited use meant for medium to high quality footage, your VHS may fall on the low quality size.

Example, original on left, 2x upscale on right

This is giving it something it likes, but still I see problems with too much denoising leading to less detail and it's changing the color of the sky. It should improve as they add more models making it compatible with more source material. They need to give you control over the denoising though, look at the guys jacket at the end, the upres has less detail.

NickHope wrote on 6/23/2024, 7:18 AM

After deinterlacing, I would upscale it to 720 lines so that YouTube treats it as 'HD'. It can still be 4:3 aspect ratio (or near enough - I've done numerous PAL-DV-derived web uploads at 988x720). No need for pillarboxing, at least on YouTube. Other platforms may prefer it.

Last time I did this stuff, I was still deinterlacing with QTGMC in an Avisynth script. Other methods may have caught up. Keep the "double" framerate after deinterlacing if you want a smooth look (i.e. not cinematic 24p).

And I was then upscaling with Lanczos 4. Other methods have definitely caught up or surpassed that, with Topaz in the lead, but not free.

I can expand on these methods tomorrow if you want.

Pea-Hicks wrote on 6/23/2024, 12:01 PM

@NickHope This is something I'm confused about, because when I set the project to progressive double frame rate and de-interlace, all i get is literally each frame doubled. i don't see any difference between the two doubled frames. so i'm confused as to how this results in a smoother look, since no actual visual information is being added?

mark-y wrote on 6/23/2024, 12:50 PM

@Pea-Hicks

For really nice 59.94 Progressive frame rate from your IMX DV source, this is how to set your project properties.

Render with a 60p template altered to match your project resolution of 972x720, which matches your source aspect and vertical scan lines perfectly for deinterlacting, and is "essentially" 4:3 HD.

I "do" recommend using the Upscale plugin at the Media level, with the aforementioned magnification ratio of 1.48x.

Good luck!

 

 

Pea-Hicks wrote on 6/23/2024, 1:04 PM

@mark-y Thanks, though actually i always do have the de-interlace and resample mode set that way, and I still don't notice any benefit to rendering at 60p. Maybe I'm just dumb, but isn't having each frame doubled (with each doubled frame being indistinguishable from the other), the same as having a single copy of each frame running at 30p?

mark-y wrote on 6/23/2024, 1:55 PM

Then something is not correct in your project or render settings.

The method I described uses optical flow interpolation to synthesize an "in-between" frame; there is no frame doubling going on, each progressive frame is completely unique unto itself.

Perhaps the example I posted wasn't formatted clearly: here is the 60p demonstration again in a better format on Youtube.

I have also uploaded the rendered 30p and Bobbed 60p clips to Drive for you to examine at your leisure

https://drive.google.com/file/d/18xmaCI9qWWrJIfzJzDnTGyXcY6MHBfs4/view?usp=sharing

https://drive.google.com/file/d/18us32Ztw0ww46YxBJo-pBLbp7zHWvhHK/view?usp=sharing

I'm involved in a heavy book restoration project right now, so I'll check in next week to see how you're doing. On the chance we're missing something regarding your video source, I suggest uploading an original sample to Drive or Dropbox (not Youtube or the forum!) so that I can examine it further if needed. Best of success!

Todd-AO wrote on 6/23/2024, 7:52 PM

@mark-y Thanks, though actually i always do have the de-interlace and resample mode set that way, and I still don't notice any benefit to rendering at 60p. Maybe I'm just dumb, but isn't having each frame doubled (with each doubled frame being indistinguishable from the other), the same as having a single copy of each frame running at 30p?

Allow me to give you a test file, https://we.tl/t-lLYXh4Hgda

There are 2 dots next to the frame counter, you want to see the top dot appear in every 2nd frame in your final encode, if it's not there you are losing 50% of your field data. This is how it should look after you render but for this site I've had to slow down the playback to 30fps(no 60fps) so it is 2x slow motion.

Also had another try of the free upscaler..... well it's looking like more of a disaster than previously thought, right side is upscaled. This is the most performant upscaler that exists currently, it will use all your GPU, they just got to fix these very obvious problems.

 

 

Pea-Hicks wrote on 6/23/2024, 7:55 PM

@Todd-AO can you give me specific encode settings to try on your file?