#1  
04-20-2020, 01:22 AM
evillink evillink is offline
Free Member
 
Join Date: Apr 2018
Posts: 2
Thanked 0 Times in 0 Posts
Hello there, I’ve been trying to avoid posting for help on this matter; but after more than two weeks of reading through lots of posts and guides I got overwhelmed and still unable to make any progress.

Like many others, I’m capturing my old VHS tapes using an ATI AIW card through VirtualDub with Huffyuv compression at 352x480 frame size.

My plan is to keep the master file for archival and create two more files for delivery mediums. The first will be a DVD, I used Avidemux to encode to mpeg using a two pass VBR and got a file that VLC plays at 4:3 DAR with no issues, though I still haven't burned a disc to test on a player.

My second task is to create a mkv file, consisting of H.264 and ACC audio and video streams to stream from a Plex server, and here is where everything falls apart. The original avi file plays as a tall and skinny video on VLC (as expected) unless I select the appropriate DAR of 4:3, but after encoding it to H.264 using Avidemux or Hybrid and setting (or at least that’s what I think I’m doing) the correct DAR, VLC will automatically play it using the said aspect ratio, problem is, Plex will still play it as a tall and skinny version.

I’ve tried using MKVToolNix and ffmpeg to change the aspect ratio and apparently it does set a flag on either the container of the video file itself, but Plex still won’t recognize the correct DAR.

The only way I have been successful with this task is resizing to 640x480, but I don’t know if this is the only way to go or if maybe I’m missing something else.

According to ffmepg this is the information I get from the files:

Master file (avi)

Stream #0:0: Video: huffyuv (HFYU / 0x55594648), yuv422p, 352x480, 32110 kb/s, 29.97 fps, 29.97 tbr, 29.97 tbn, 29.97 tbc

DVD file (mpeg)

Stream #0:0: Video: mpeg2video (Main), yuv420p(tv, progressive), 352x480 [SAR 20:11 DAR 4:3], 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc

MKV file (h264 original size not deinterlaced)

Stream #0:0: Video: h264 (High), yuv420p(progressive), 352x480 [SAR 1:1 DAR 11:15], SAR 20:11 DAR 4:3, 29.97 fps, 29.97 tbr, 1k tbn, 59.94 tbc (default)

MKV file (h264 resized and BOB deinterlaced)

Stream #0:0: Video: h264 (High), yuv420p(tv, bt470bg/unknown/unknown, progressive), 640x480 [SAR 1:1 DAR 4:3], 59.94 fps, 59.94 tbr, 1k tbn, 119.88 tbc (default) (forced)

I would be grateful if someone could help me out, and in the process, enlighten me regarding PAR, SAR and DAR though the entire VHS to MPEG and VHS to H264 workflow.
Reply With Quote
Someday, 12:01 PM
admin's Avatar
Ads / Sponsors
 
Join Date: ∞
Posts: 42
Thanks: ∞
Thanked 42 Times in 42 Posts
  #2  
04-20-2020, 07:56 AM
lordsmurf's Avatar
lordsmurf lordsmurf is online now
Site Staff | Video
 
Join Date: Dec 2002
Posts: 13,501
Thanked 2,447 Times in 2,079 Posts
H.264 AR can be a nuisance.
H.264 AR + the players can be bigger aggravation, not playing nice even with to-spec files.

^ And that's just progressive. Interlaced H.264 can be a quagmire.

The most ideal fix is to resize to 640x480 (1:1 AR), so the H.264 doesn't get confused.

I generally capture lossless as 720x480 )and I thought Huffyuv required it?)
Downconvert MPEG/DVD copy to 352x480.
1:1 AR (matting when needed, on non-4x3/16x9) for streaming DLNA.

The main reason for 352x480 on DVD was (1) retained most/all source information, but (2) saved disc space for more content.

H.264 compression isn't as rigid, so 352x480 and 640x480 with a proper CRF encode can literally be the same size. I often see this with 640x480 vs. 720x405 encodes.

The main reason for 720x480 lossless was to (1) appease the software, like NLEs, and (2) retain every possible bit of information, even if it was 1% between 352 and 720, as those were often edit/restore projects.

- Did my advice help you? Then become a Premium Member and support this site.
- For sale in the marketplace: TBCs, workflows, capture cards, VCRs
Reply With Quote
The following users thank lordsmurf for this useful post: evillink (04-22-2020)
  #3  
04-20-2020, 12:09 PM
msgohan msgohan is offline
Free Member
 
Join Date: Feb 2011
Location: Vancouver, Canada
Posts: 1,323
Thanked 334 Times in 276 Posts
In Hybrid, Crop/Resize tab: change Input PAR to 20:11. Now if you look at the x264 command line, it should say --sar 20:11 which is required per: http://www.x264bluray.com/home/480i-ntsc

One man's explanation:
Quote:
Originally Posted by LigH.de @ VideoHelp
People still get confused between

a) the aspect ratio the image is encoded to (has no meaning; the 3:2 of 720:480 is irrelevant for "Generic AR" of MPEG2 video in DVD — in theory...)
b) the aspect ratio the image should be displayed with, after deskewing (in ISO/IEC 13818: "Display Aspect Ratio"= DAR; typical: 4:3 or 16:9)
c) the factor the image has to be deskewed by to obtain the DAR (in ISO/IEC 13818: "Sample Aspect Ratio" = SAR, elsewhere a.k.a. PAR); the image is "anamorphic" if it is not 1:1

ISO/IEC 13818 is the "core" of the MPEG2 specification (container, video, and audio formats), Part 2 (video) is related to ITU-T Rec. H.262.

Video on a "DVD Video" disc is always anamorphic, there is never a "square pixel" format.

MPEG2 video only defines 4 valid aspect ratios: SAR 1:1 (not allowed on DVD), DAR 4:3, DAR 16:9, or DAR 2.35:1 (not allowed on DVD). No matter if you have PAL (576 lines) or NTSC (480 lines), and if you have a width of 352, 704, or 720 pixels ... the encoded image always has to be resized until the displayed image has an aspect ratio of either 4:3 or 16:9, if your source was a "DVD Video" media.

Unfortunately, some producers incorrectly scale digitized TV signals for DVDs. They have a different rule set of aspect ratios, based on milli and micro second timings (if you had captured analogue video signals, this would be relevant as deskewing factor, see c) above). And analog video signal generators in DVD players are not reliable either if they create a video line timing for the whole encoded width or take the outer areas as overscan ... that's a discussion of a whole previous decade. Please don't continue that here.
from https://forum.videohelp.com/threads/...2)#post2352074
Reply With Quote
The following users thank msgohan for this useful post: evillink (04-22-2020)
  #4  
04-20-2020, 12:28 PM
lordsmurf's Avatar
lordsmurf lordsmurf is online now
Site Staff | Video
 
Join Date: Dec 2002
Posts: 13,501
Thanked 2,447 Times in 2,079 Posts
Quote:
Originally Posted by msgohan View Post
In Hybrid, Crop/Resize tab: change Input PAR to 20:11.
I'd made the assumption that he'd already tried that. Maybe not.

- Did my advice help you? Then become a Premium Member and support this site.
- For sale in the marketplace: TBCs, workflows, capture cards, VCRs
Reply With Quote
The following users thank lordsmurf for this useful post: evillink (04-22-2020)
  #5  
04-20-2020, 01:23 PM
msgohan msgohan is offline
Free Member
 
Join Date: Feb 2011
Location: Vancouver, Canada
Posts: 1,323
Thanked 334 Times in 276 Posts
He only mentioned trying to set DAR. "PAR" and "SAR" only appear in his post via his specs and his final query.
Reply With Quote
The following users thank msgohan for this useful post: evillink (04-22-2020)
  #6  
04-22-2020, 11:57 AM
evillink evillink is offline
Free Member
 
Join Date: Apr 2018
Posts: 2
Thanked 0 Times in 0 Posts
Thank you very much to both of you lordsmurf and msgohan, not only have you help solve the problem I was having but also gave me enough information to better understand this complicated (at least to me ) subject of aspect ratios. I was mixing concepts and was trying to set a 4:3 AR as PAR in hybrid instead of the 20:11 as intended for 4:3 AR for 352x480 resolution.

Regarding the capture resolution, I settle for 352x480 instead of the 720x480 mainly because what lordsmurf said about it retained most/all source information at leas for my DVD projects; but also because of the huffyuv file size, right now I’m looking at 30GiB for two hour VHS and takes around 45minutes to transfer between my capture PC to my editing/encoding rig.

I’m sorry I didn’t respond sooner, but I just got back to work and the kids back to school, so I didn’t have time to read the resources and test out what you guys told me. I’m grateful this forum exists and that is very active by knowledgeable people.
Reply With Quote
Reply




Tags
aspect ratio, h264, plex, vhs

Similar Threads
Thread Thread Starter Forum Replies Last Post
Understanding PAL aspect ratio? spanak Encode, Convert for discs 4 04-17-2018 02:16 AM
Aspect Ratio Problem with Avisynth zack82 Capture, Record, Transfer 3 07-25-2014 03:18 AM
Set aspect ratio in VirtualDub for 352x480 premiumcapture Restore, Filter, Improve Quality 4 12-27-2013 08:52 PM
Need help fixing aspect ratio wayshway Videography: Cameras, TVs and Players 8 04-30-2008 04:10 PM
Help Fix Aspect Ratio Konfusion Restore, Filter, Improve Quality 3 11-04-2006 01:43 PM

Thread Tools



 
All times are GMT -5. The time now is 07:12 AM