Go Back    Forum > Digital Video > Video Project Help > Restore, Filter, Improve Quality

Reply
 
LinkBack Thread Tools
  #1  
01-07-2022, 10:01 AM
113pigeon 113pigeon is offline
Free Member
 
Join Date: Jul 2021
Posts: 19
Thanked 3 Times in 3 Posts
I've captured and deinterlaced (QTGMC) some NTSC VHS footage (720x480)

Setup is JVC SVHS HR-S2913U > DMR-ES15 > Pinnacle 710 USB > Windows 10 > Virtual Dub 1.9.11 > Lagarith lossless

I've started playing around with Upscaling to 1080p (x264/mp4) with Hybrid + AviSynth (v2021.07.18.1).

When upscale, which resolution is it best to output for playback on various devices (including upload to YouTube)? Options are:
- 1620 x 1080? This maintains the same aspect ratio of 720:480 / 4:3
- 1920 x 1080? This gives the 9:16 ratio.

If it is better to end up with 1920 x 1080 and if I don't want to crop the original video, what approach is best with Hybrid + Avisynth?

I couldn't find anything like AviSynth's "AddBorders" in Hybrid. So I've been using Letterbox to get it to 1920x1080 with the following. but I'm wondering if this is recommended or not (pros/cons,etc)
Crop/Resize:
- Resize = 1620 x 1080
- Letterbox = 1920 x 1080
This adds black borders on the right & left.

Hybrid + VapourSynth seems to be more recommended now, but I'm not very familiar with it. If anyone has links to upscaling with VapourSynth, I'd definitely be interested to know more.
Reply With Quote
Someday, 12:01 PM
admin's Avatar
Ads / Sponsors
 
Join Date: ∞
Posts: 42
Thanks: ∞
Thanked 42 Times in 42 Posts
  #2  
01-07-2022, 10:36 AM
latreche34 latreche34 is offline
Free Member
 
Join Date: Dec 2015
Location: USA
Posts: 3,257
Thanked 537 Times in 497 Posts
720x480 --> 704x480 --> 1440x1080 (square pixel).
Keep the master files.

https://www.youtube.com/@Capturing-Memories/videos
Reply With Quote
The following users thank latreche34 for this useful post: lordsmurf (01-08-2022)
  #3  
01-07-2022, 10:55 AM
113pigeon 113pigeon is offline
Free Member
 
Join Date: Jul 2021
Posts: 19
Thanked 3 Times in 3 Posts
Quote:
Originally Posted by latreche34 View Post
720x480 --> 704x480 --> 1440x1080 (square pixel).
Keep the master files.
Going from 704x480 --> 1440x1080 will require stretching right? Since 1440/704 = 2.04545.. whereas 1080/480 = 2.25

Or are square pixels different somehow?
In Hybrid, I don't see an option for square pixels.

Any additional insight would be appreciated.
Reply With Quote
  #4  
01-07-2022, 02:09 PM
latreche34 latreche34 is offline
Free Member
 
Join Date: Dec 2015
Location: USA
Posts: 3,257
Thanked 537 Times in 497 Posts
No stretching, that's the right way, Analog video captured into digital has a ratio of 704:480 (4:3 non square pixel) for NTSC by design, The capture card adds 16 padded black pixels to the sides that has to be removed, resizing to 1440x1080 preserves that aspect ratio and converts the shape of each pixel from non square to square with no stretching at all. If in doubt try it.

https://www.youtube.com/@Capturing-Memories/videos
Reply With Quote
  #5  
01-08-2022, 07:13 AM
113pigeon 113pigeon is offline
Free Member
 
Join Date: Jul 2021
Posts: 19
Thanked 3 Times in 3 Posts
Thank you for putting me on the right path! I've done a lot of reading and will share a summary shortly. As you can tell, I'm a bit of a newbie.

One more question to ensure my understanding is correct:

To share footage, I plan to create an mp4 from my captured & deinterlaced .avi's without upscaling. (The upscaling is mostly for YouTube.)

When I create the mp4s, what is recommended for the crop/resize since it will often be viewed on a computer. Options:
1. Crop 8 lines on both sides and resize to 640x480 to get a DAR of 4:3 and square pixels. On a computer, I think this means it will look like it's true intended shape.

2. Leave at 720 x 480. If I understand correctly, this will display at a DAR of 3:2, so the pixels will be rectangular and not the true shape. Unless there is a way to force a DAR of 4:3 on a computer?

3. Crop 8 lines on both sides and output at 704x480. This will still be rectangular with an odd DAR, so I can't see a reason for this.
Reply With Quote
  #6  
01-08-2022, 07:32 AM
latreche34 latreche34 is offline
Free Member
 
Join Date: Dec 2015
Location: USA
Posts: 3,257
Thanked 537 Times in 497 Posts
Have you heard of SAR flag? You can have the player display the video at any aspect ratio regardless resolution by assigning a SAR flag (Sample Aspect Ratio a.k.a Pixel Aspect Ratio) during encoding, though there are only few legal resolutions based on the original video format:

Here are some SAR values for the 4:3 frame:

NTSC:
720x480 (DV/DVD, Full frame) -> SAR=8/9
704x480 (Analog Capture, SD Crop) -> SAR=10/11
640x480 (Square pixel, SD Resize) -> SAR=1

PAL/SECAM:
720x576 (DV/DVD, Full frame) -> SAR=16/15
704x576 (Analog Capture, SD Crop) -> SAR=12/11
768x576 (Square pixel, SD Resize) -> SAR=1

Example:
Code:
ffmpeg -i In.avi -vf "scale=w=-1:h=-1:interl=1,format=yuv420p,setsar=SAR=10/11" -flags +ildct+ilme -c:v libx264 -crf 18 -x264opts bff=1:colorprim=smpte170m:transfer=smpte170m:colormatrix=smpte170m:force-cfr -c:a aac -b:a 192k Out.mp4

https://www.youtube.com/@Capturing-Memories/videos
Reply With Quote
  #7  
01-08-2022, 08:10 AM
113pigeon 113pigeon is offline
Free Member
 
Join Date: Jul 2021
Posts: 19
Thanked 3 Times in 3 Posts
Quote:
Originally Posted by latreche34 View Post
Have you heard of SAR flag? You can have the player display the video at any aspect ratio regardless resolution by assigning a SAR flag (Sample Aspect Ratio a.k.a Pixel Aspect Ratio) during encoding, though there are only few legal resolutions based on the original video format:

Here are some SAR values for the 4:3 frame:

NTSC:
720x480 (DV/DVD, Full frame) -> SAR=8/9
704x480 (Analog Capture, SD Crop) -> SAR=10/11
640x480 (Square pixel, SD Resize) -> SAR=1

Example:
Code:
ffmpeg -i In.avi -vf "scale=w=-1:h=-1:interl=1,format=yuv420p,setsar=SAR=10/11" -flags +ildct+ilme -c:v libx264 -crf 18 -x264opts bff=1:colorprim=smpte170m:transfer=smpte170m:colormatrix=smpte170m:force-cfr -c:a aac -b:a 192k Out.mp4
Yes. I have, but wasn't sure of the best approach.

In Hybrid, I've left the resolution as 720x480 and set the output PAR to "MP4 NTSC 4:3 (10/11)". I've attached a screenshot.
Now MediaInfo for the mp4 says the DAR is 4:3, whereas before it was 3:2. And it looks correct.
So this sounds correct, right?

Thanks so much for putting me on the right track!


Attached Images
File Type: jpg hybrid-vhs-conversion.jpg (41.1 KB, 35 downloads)
Reply With Quote
  #8  
01-08-2022, 08:19 AM
latreche34 latreche34 is offline
Free Member
 
Join Date: Dec 2015
Location: USA
Posts: 3,257
Thanked 537 Times in 497 Posts
Post a screenshot from the captured 720x480 video using snapshot option of VLC or MPC-HC or a short clip so I can take a look.

https://www.youtube.com/@Capturing-Memories/videos
Reply With Quote
  #9  
01-08-2022, 08:31 AM
113pigeon 113pigeon is offline
Free Member
 
Join Date: Jul 2021
Posts: 19
Thanked 3 Times in 3 Posts
Here are 3 snapshots from the 3 approaches I took:
1. Original conversion with 720x480, no PAR specified so DAR defaulted to 3:2: 1-vlc-720x480-PAR-3-2.png
2. Second attempt where I chose 640x480. DAR shows as 4:3. 2-vlc-640x480.png
3. Final attempt. 720x480 with PAR of 8/9. DAR shows as 4:3. 3-vlc-720x480-PAR-4-3


Attached Images
File Type: png 1-vlc-720x480-PAR-3-2.png (527.2 KB, 34 downloads)
File Type: png 2-vlc-640x480.png (339.7 KB, 26 downloads)
File Type: png 3-vlc-720x480-PAR-4-3.png (439.7 KB, 26 downloads)
Reply With Quote
  #10  
01-08-2022, 08:43 AM
latreche34 latreche34 is offline
Free Member
 
Join Date: Dec 2015
Location: USA
Posts: 3,257
Thanked 537 Times in 497 Posts
VLC is resizing the snapshots, the last one came out 720x528, And those are not the native frames I see black borders all around. Anyway if resizing to HD for youtube you can crop down to the bare active area in a 704:480 ratio or close enough and resize to 1440x1080.

https://www.youtube.com/@Capturing-Memories/videos
Reply With Quote
  #11  
01-08-2022, 09:00 AM
113pigeon 113pigeon is offline
Free Member
 
Join Date: Jul 2021
Posts: 19
Thanked 3 Times in 3 Posts
Quote:
Originally Posted by latreche34 View Post
VLC is resizing the snapshots, the last one came out 720x528, And those are not the native frames I see black borders all around. Anyway if resizing to HD for youtube you can crop down to the bare active area in a 704:480 ratio or close enough and resize to 1440x1080.
The top/bottom black borders are because I cropped the overscan and added borders after deinterlacing in previous steps. (Not as part of this conversion). As per VirtualDub border masking
Crop (0,0,0,-8)
AddBorders (0,4,0,4)

I can't figure out why VirtualDub is displaying the 720x480 (at DAR 4:3) MP4 as 720x528. Attached is the MediaInfo for the file. Does anything pop out as being wrong?

I played the MP4 in virtualDub2, but virtualDub2 doesn't take the DAR setting into account.

Otherwise, would a better approach be to resize to 640x480 since players seem to have issues with the PAR/DAR setting?


Attached Images
File Type: png 3-vlc-720x480-DAR-4-3-settings.png (50.3 KB, 16 downloads)
Reply With Quote
  #12  
01-08-2022, 12:50 PM
thestarswitcher thestarswitcher is offline
Free Member
 
Join Date: Dec 2017
Posts: 95
Thanked 5 Times in 5 Posts
I can be of assistance here.

When you capture lossless AVI, everything is displayed in Square Pixels (1:1). So the reason NTSC looks "stretched", this is the cause, as literal 720 pixels wide and 480 pixels high.

Now when you pop in an NTSC DVD file, do you notice that the resolution is 720x480, but it's being displayed as 640x480? This is because the pixels are being assigned a flag to display in 4:3, adhering to the laws of NTSC video standard without resizing.

To do this in Hybrid, go to Cropping and tick both boxes "Force Input PAR" and "Force Output PAR"- type in 8x9, this is MPEG-2 NTSC DVD ratio, but it's also appropriate for SD AVC files. When you do this, you retain the resolution but you change the "shape" of the pixels- so they're no longer square, but a ratio that matches with what we see as 4:3. Make sure your resolution is 720x480 all the way through.

In terms of YouTube, you want to have the size as 1440x1080, 1:1. The reason for this being is that if you have it any lower, your video quality will suffer worse from the compression compared to how it was. Make sure you deinterlace properly as well.

Important; for YouTube, follow this encoding specs guide provided by the site- all settings configurable in Hybrid. Hope this helps!
https://support.google.com/youtube/answer/1722171?hl=en


Attached Images
File Type: png VideoSpecs.PNG (669.1 KB, 21 downloads)
File Type: png HybridSpecs.png (45.6 KB, 29 downloads)
Reply With Quote
  #13  
01-08-2022, 03:10 PM
113pigeon 113pigeon is offline
Free Member
 
Join Date: Jul 2021
Posts: 19
Thanked 3 Times in 3 Posts
Quote:
Originally Posted by thestarswitcher View Post
To do this in Hybrid, go to Cropping and tick both boxes "Force Input PAR" and "Force Output PAR"- type in 8x9, this is MPEG-2 NTSC DVD ratio, but it's also appropriate for SD AVC files. When you do this, you retain the resolution but you change the "shape" of the pixels- so they're no longer square, but a ratio that matches with what we see as 4:3. Make sure your resolution is 720x480 all the way through.
Thank you for this reply. This put me on the right path. My Hybrid settings I previously shared were incorrect - I was mixing 720x480 with 10:11, which was wrong. It should have been pretty clear from the details latreche34 previously provided, but I was tired & missed it.

Quote:
Originally Posted by latreche34 View Post
SAR is also known as PAR
NTSC:
720x480 (DV/DVD, Full frame) -> SAR=8/9
704x480 (Analog Capture, SD Crop) -> SAR=10/11
640x480 (Square pixel, SD Resize) -> SAR=1
So, there are 2 approaches that can be taken when using Hybrid to convert a 720x480 NTSC VHS avi to mp4. I've included screenshots of the settings in Hybrid.

1. Crop to 704x480 and set the output PAR to "MP4 NTSC 4:3 (10/11)". This will eliminate the black on the left & right side. VLC displays this as 704x528 (4:3). Since this is analog video, I believe this is the recommended approach. But please correct me if I'm wrong...

2. Leave at 720x480 and set the output PAR to "MPEG-2 NTSC 4:3 (8/9)". This leaves the black on the left & right side. VLC displays this as 720x540 (4:3).

I am curious as to what setting the "Input PAR" does? I found I didn't need to set it.


Attached Images
File Type: jpg hybrid-vhs-conversion-03-good-704x480-10-11.jpg (41.3 KB, 26 downloads)
File Type: jpg hybrid-vhs-conversion-04-good-720x480-8-9.jpg (39.5 KB, 14 downloads)
Reply With Quote
The following users thank 113pigeon for this useful post: ThumperStrauss (02-05-2022)
  #14  
01-08-2022, 04:33 PM
latreche34 latreche34 is offline
Free Member
 
Join Date: Dec 2015
Location: USA
Posts: 3,257
Thanked 537 Times in 497 Posts
Forget about what VLC outputs, If your playback method is always computer you don't need to set anything just playback the videos as they are, those programs have the capability to display the video in any shape or form you want including de-interlacing, If for TV viewing or uploading to online platforms then you need to set the aspect ratio flag otherwise just resize to square pixel and don't have to worry about the AR flag at all. 1440x1080 suggested so that youtube won't hit you with a lower tier compression since it sees it as HD not SD.

As to 704 vs 720, it's up to you, The correct canvas is 704x480 for analog capturing, So setting 704 with 10/11 SAR gives you a perfect geometry while setting 720 with 8/9 SAR squeezes the active video area by about 3% since its keeping the black pillars, not noticeable by most people. I've done the circle test before at videohelp if you want to find that post.

https://www.youtube.com/@Capturing-Memories/videos

Last edited by latreche34; 01-08-2022 at 04:46 PM.
Reply With Quote
  #15  
04-28-2022, 04:53 PM
Closecall Closecall is offline
Free Member
 
Join Date: Jan 2022
Posts: 88
Thanked 2 Times in 2 Posts
This thread was exactly what I was looking for but had a couple questions to add to it.

1. Every change made (resizing or other video edits) should be done on separate passes when using hybrid correct?

2. Do you deinterlace before or after the resizing and just being curious what settings have you been using?

3. If I plan on using the video on a Flash Drive to show relatives on either their computers or plugged into a TV do you recommend either way? going the 704-->1440.1080?

Thank you
Reply With Quote
  #16  
04-28-2022, 10:44 PM
latreche34 latreche34 is offline
Free Member
 
Join Date: Dec 2015
Location: USA
Posts: 3,257
Thanked 537 Times in 497 Posts
Always de-interlace before you crop or resize otherwise you risk messing the field order. I don't use hybrid, I use AVSPmod that works with QTGMC and vdub2 and all the steps are done at once but in the sequence I set which is: de-interlacing, crop and resize. AVSPmod allows me to visualize every step in the preview window of the program before launching the entire process.

https://www.youtube.com/@Capturing-Memories/videos
Reply With Quote
  #17  
05-01-2022, 11:46 AM
Selur Selur is offline
Free Member
 
Join Date: Feb 2022
Posts: 70
Thanked 18 Times in 16 Posts
Quote:
2. Do you deinterlace before or after the resizing and just being curious what settings have you been using?
By default Hybrid, assuming the output is set to be progressive, Hybrid does deinterlace before resizing.
I would stick with that.
Quote:
Every change made (resizing or other video edits) should be done on separate passes when using hybrid correct
I see no real need or gain from that. (Vapoursynth/Avisynth Preview allows to see the output of the script)

Quote:
I am curious as to what setting the "Input PAR" does? I found I didn't need to set it.
'Input PAR' allows to overwrite the PAR signaled by the input.
Reply With Quote
  #18  
05-04-2022, 09:37 PM
Closecall Closecall is offline
Free Member
 
Join Date: Jan 2022
Posts: 88
Thanked 2 Times in 2 Posts
Quote:
Originally Posted by latreche34 View Post
Always de-interlace before you crop or resize otherwise you risk messing the field order. I don't use hybrid, I use AVSPmod that works with QTGMC and vdub2 and all the steps are done at once but in the sequence I set which is: de-interlacing, crop and resize. AVSPmod allows me to visualize every step in the preview window of the program before launching the entire process.
Do you ever do any post work on your videos? If so do you do it before deinterlacing/upscaling?
And also do you have a program of choice for it?

I am very used to using Adobe Premiere but adobe outputs garbage quality interlace video and ruins the quality of my capture before i even get to deinterlace it. Am testing doing post work on the final upscaled videos soon to see what it would look like so i can export from adobe as a H.264 Mp4. Might as well try right?
Reply With Quote
  #19  
05-04-2022, 09:59 PM
Closecall Closecall is offline
Free Member
 
Join Date: Jan 2022
Posts: 88
Thanked 2 Times in 2 Posts
To do this in Hybrid, go to Cropping and tick both boxes "Force Input PAR" and "Force Output PAR"- type in 8x9, this is MPEG-2 NTSC DVD ratio, but it's also appropriate for SD AVC files. When you do this, you retain the resolution but you change the "shape" of the pixels- so they're no longer square, but a ratio that matches with what we see as 4:3. Make sure your resolution is 720x480 all the way through.

So do you set this when you deinterlace then? Can it be done on a seperate pass?
If the video is already deinterlaced can you do that and upscale at the same time?
Reply With Quote
  #20  
05-05-2022, 01:19 AM
latreche34 latreche34 is offline
Free Member
 
Join Date: Dec 2015
Location: USA
Posts: 3,257
Thanked 537 Times in 497 Posts
Quote:
Originally Posted by Closecall View Post
Do you ever do any post work on your videos? If so do you do it before deinterlacing/upscaling?
And also do you have a program of choice for it?

I am very used to using Adobe Premiere but adobe outputs garbage quality interlace video and ruins the quality of my capture before i even get to deinterlace it. Am testing doing post work on the final upscaled videos soon to see what it would look like so i can export from adobe as a H.264 Mp4. Might as well try right?
I hardly do any post work beyond de-interlacing, cropping and upscaling to 1440x1080, Though I make sure if necessary to correct the luma levels, chroma setting and audio level in the proc amp setting to make sure everything is legal, as well as some other advanced timing parameters if needed, There is like 4 pages of menu that I have to go through for every tape so I don't have to do any work later.
Reply With Quote
Reply




Tags
avisynth, hybrid, letterbox, ntsc, upscale

Similar Threads
Thread Thread Starter Forum Replies Last Post
Upscaling VHS before or after capture, which is best? BIGMEDIADINO Capture, Record, Transfer 3 10-23-2020 12:51 PM
NTSC vs. NTSC-J IRE black levels? (capturing Japanese VHS tapes) Wingzrow Capture, Record, Transfer 7 08-30-2020 09:49 AM
VHS upscaling to HD? waloshin Capture, Record, Transfer 5 06-10-2019 03:16 PM
Faroudja video processors for upscaling video transfers? MelnickStudios Capture, Record, Transfer 2 03-23-2017 03:15 PM
Wanted to buy Blu-ray player for upscaling VHS Giana Capture, Record, Transfer 2 01-08-2013 11:59 PM

Thread Tools



 
All times are GMT -5. The time now is 04:19 AM