03-22-2025, 03:06 PM
|
|
Free Member
|
|
Join Date: Dec 2020
Location: Brooklyn
Posts: 23
Thanked 0 Times in 0 Posts
|
|
The bar at the bottom of Avisynth says 720x540 (4:3) but after dropping the file into VirtualDub2 and converting to mp4 my videos always end up 720x536. Not sure if it's slightly squashing or removing lines. A year or 2 ago I tried changing the resize part of the code to say Spline64Resize(720,542) and the resulting finished videos did in fact say 720x540 but this seems like a cheat mode that doesn't address the problem.
Here's my code:
Code:
SetFilterMTMode("QTGMC", 2)
FFMPEGSource2("x.avi", atrack=-1)
ConvertToYV12(interlaced=true)
AssumeTFF()
RemoveGrain(mode=17, modeU=0, modeV=0, planar=false)
ColorYUV(gain_y=-20, cont_y=20)
QTGMC(preset="Faster", FPSDivisor=2, EdiThreads=2, Sharpness=1)
Spline64Resize(720,540)
Prefetch(2)
Crop(6,2,-6,-2)
AddBorders(6,2,6,2)
Trim(90,560000)
DelayAudio(0)
I compress the video to x264 8 bit with YUV422 pixel. Videos saved as mp4 (mpeg-4 part 14).
I might as well throw in 2 more questions while I'm here:
Most VHS transfers that I've seen from others don't use AddBorders to mask the cropped areas -- I'm assuming these are all expanding the cropped videos to fit the entire 720x540 without adding borders. Doesn't this defeat the purpose of attempting to match the original videotape? I just want to make sure what I'm doing is considered best practice.
I also notice a lot of transfers that capture and compress at double the tape's frame rate (59.94) and/or at 1440x960 and I'm wondering when it would make sense to try this. For my projects I don't personally think it's necessary.
thank you!
|
Someday, 12:01 PM
|
|
Ads / Sponsors
|
|
Join Date: ∞
Posts: 42
Thanks: ∞
Thanked 42 Times in 42 Posts
|
|
|
03-22-2025, 08:47 PM
|
|
Free Member
|
|
Join Date: Dec 2015
Location: USA
Posts: 3,735
Thanked 648 Times in 595 Posts
|
|
You are starting from a wrong and illegal resolution for tape capture, The captured files should be 720x480 for NTSC and 720x576 for PAL/SECAM.
https://www.youtube.com/@Capturing-Memories/videos
|
03-22-2025, 10:41 PM
|
|
Free Member
|
|
Join Date: Dec 2020
Location: Brooklyn
Posts: 23
Thanked 0 Times in 0 Posts
|
|
I capture at 720x480. This question is about after the conversion.
|
03-22-2025, 11:29 PM
|
|
Site Staff | Video
|
|
Join Date: Dec 2002
Posts: 14,599
Thanked 2,653 Times in 2,258 Posts
|
|
Explain this in more detail:
Quote:
dropping the file into VirtualDub2 and converting to mp4
|
I assume you drop a .avs file into VirtualDub2 (x86, x64?).
Then output H.264 in .mp4 container, from the VirtualDub2, using ffmpeg x264? (I really dislike encoding in VirtualDub (or VirtualDub2). Lots of bugs, non-standard.)
What happens if you output a lossless Huffyuv (or Lagarith) .avi file instead? Still wrong resolution?
NOTE: ConvertToYV12() is best avoided, as it effectively drops you down to 4:2:0 for processing. 32-bit QTGMC requires it, but we have x64 options now (and have for years). I can understand it as a last line before a 4:2:0 encoding, but it may hobble earlier processing quality.
|
03-23-2025, 03:08 AM
|
|
Free Member
|
|
Join Date: Dec 2015
Location: USA
Posts: 3,735
Thanked 648 Times in 595 Posts
|
|
Quote:
Originally Posted by malfc
I capture at 720x480. This question is about after the conversion.
|
Still don't understand the resize from 720x480 to 720x540, very destructive and useless since it stretches the video, Leave the resolution alone and flag to 4:3 during encoding so you get a proper aspect ratio.
|
03-23-2025, 12:48 PM
|
|
Free Member
|
|
Join Date: Dec 2020
Location: Brooklyn
Posts: 23
Thanked 0 Times in 0 Posts
|
|
Hey, thanks for the responses!
Quote:
I assume you drop a .avs file into VirtualDub2 (x86, x64?)
Then output H.264 in .mp4 container, from the VirtualDub2, using ffmpeg x264?
|
Yes I drop in the avs file created with avisynth, and I think the rest is correct. The compression options don't specify ffmpeg but I think the description implies this - "x264 8 bit - H.264/MPEG-4 AVC codec"
Quote:
(I really dislike encoding in VirtualDub (or VirtualDub2). Lots of bugs, non-standard.)
|
What programs do you prefer?
Quote:
What happens if you output a lossless Huffyuv (or Lagarith) .avi file instead? Still wrong resolution?
|
Ooh, great question. If I use that output, the new .avi file is corrected 720x540. I should also note that I capture 720x480 directly to lossless huffyuv.
Quote:
NOTE: ConvertToYV12() is best avoided, as it effectively drops you down to 4:2:0 for processing.
|
Ok, noted - I would prefer to maintain 4:2:2! What's the correct way to switch this to 64 bit?
Quote:
Still don't understand the resize from 720x480 to 720x540, very destructive and useless since it stretches the video, Leave the resolution alone and flag to 4:3 during encoding so you get a proper aspect ratio.
|
I must have misread something in the digital video guides -- how do you flag to 4:3? My understanding was to resize to give the appearance of rectangular pixels since this is how it would have originally looked on TV. But if there's a better way to do this please let me know.
Is "illegal" really the correct term for this? It's just a video - sounds kind of unnecessarily extreme. Are the cops going to bust down my door?
|
03-23-2025, 01:22 PM
|
|
Free Member
|
|
Join Date: Dec 2015
Location: USA
Posts: 3,735
Thanked 648 Times in 595 Posts
|
|
By converting non square pixels to square pixels you are stretching the frame vertically, a human face would look skinny, this is wrong. Illegal means it is not a recognizable resolution by standard.
If you are using Hybrid, there is a setting to output 4:3 from 720x480 without having to resize.
https://www.youtube.com/@Capturing-Memories/videos
|
03-23-2025, 01:41 PM
|
|
Free Member
|
|
Join Date: Dec 2020
Location: Brooklyn
Posts: 23
Thanked 0 Times in 0 Posts
|
|
I have Hybrid and used it a lot last year for DVD conversions. I'll give it a shot for this. thanks!
-- merged --
am I supposed to process the video twice?
I don't think it's possible to import the avs file in hybrid.
so it looks like I have to run the avs file in virtualdub2 with the code I pasted above, but not including any resize. and then i have to run the video again through hybrid to change the PAR. so basically this would just add an extra long step before the final version of the video.
there has to be a way to do all of this in one step. it seems like such a basic part of the process but I'm having a lot of trouble locating the answer on how to do this.
|
03-26-2025, 12:33 AM
|
|
Site Staff | Video
|
|
Join Date: Dec 2002
Posts: 14,599
Thanked 2,653 Times in 2,258 Posts
|
|
Hybrid opens .avs directly.
|
03-26-2025, 07:39 AM
|
|
Free Member
|
|
Join Date: Dec 2020
Location: Brooklyn
Posts: 23
Thanked 0 Times in 0 Posts
|
|
Im not as familiar with hybrid for encode/deinterlace.
I finally found the fields for this in Virtualdub2 tho, and I'm ok to use those while familiarizing hybrid.
In the x264 configuration there's 2 fields for Sample Aspect Ratio and of course my instinct was to input 4 and 3 but it turns out the correct numbers (for NTSC videos) are 10 and 11. I believe this solves all of the questions in my original post.
|
03-28-2025, 10:51 AM
|
|
Free Member
|
|
Join Date: Dec 2020
Location: Brooklyn
Posts: 23
Thanked 0 Times in 0 Posts
|
|
Here's the updated code, just so there's a record for further critique or for future reference:
Quote:
SetFilterMTMode("QTGMC", 2)
FFMPEGSource2("x.avi", atrack=-1)
ConvertToYV16(interlaced=true)
AssumeTFF()
RemoveGrain(mode=17, modeU=0, modeV=0, planar=false)
ColorYUV(gain_y=-20, cont_y=20)
QTGMC(preset="Faster", FPSDivisor=2, EdiThreads=2, Sharpness=1)
Prefetch(2)
Crop(6,2,-6,-2)
AddBorders(6,2,6,2)
Trim(90,560000)
DelayAudio(0)
|
ConvertToYV12 is changed to ConvertToYV16 to maintain 4:2:2.
Resizing is removed.
Still using Virtualdub2 for the moment. Haven't noticed any problems yet.
Under video compression, select x264 8bit, and in "configure" the SAR is changed from 1/1 to 10/11.
|
Thread Tools |
Search this Thread |
|
|
All times are GMT -5. The time now is 07:13 AM
|