VideoHelp Forum
+ Reply to Thread
Page 1 of 2
1 2 LastLast
Results 1 to 30 of 53
Thread
  1. This forum has been tremendously helpful in answering nearly all of my questions about setting up converting my families old vhs tapes to digital, however I'm still a little stuck on the aspect ratio part.

    Firstly, I'm using a Diamond VC500 with composite cables connected to my VCR and the video itself was recorded in 1992. I recorded some test footage with VirtualDub2 with the uncompressed format at 720x480 which is the native resolution of the capture card. The quality looks great, however I know that VHS is 4:3 aspect ratio and 720x480 is 3:2, so I went down the rabbit hole of aspect ratios and learning about DAR and PAR and I'm still a little confused about the subject, and while all this stuff doesn't really matter for my purposes, it's been fun learning about it so I'd like to do it properly.

    So I understand that standard definition horizontal pixels were wider than vertical pixels so this is where I'm a bit stuck. I've used ffmpeg to convert the video to 4:3 aspect ratio using the command
    Code:
    ffmpeg -i test.avi -acodec copy -vcodec copy -aspect 4:3 test.mkv
    and when I open up the file in a few media players and pixel count horizontally the image is in fact showing up as 640x480 which is 4:3, but from what I've read from here and here is that for proper scaling of the analog source the resolution should be 654x480, and from what I've read ffmpeg can't adjust the pixel aspect ratio without lossy transcoding, which I'd like to avoid. Also, not all software obeys adjusting the aspect ratio like this, so this might not be the best way, although I have found the mkv container to be more reliable at forcing video players to recognize the correct aspect ratio than sticking with avi.

    I tried using mp4 box because I've read both here and elsewhere that I can properly adjust the PAR and I tried
    Code:
    mp4box test.avi -out test3.mkv -par 1=10:11
    but I just keep getting "Error: Bad Parameter" and I've been unable to get around that.

    Not only that, but a lot of what I'm reading about with how to scale analog standard definition sources to monitors doesn't seem to translate fully to my specific case because most of it is dealing with sources that have more defined resolutions like consumer DVDs, while my source seems to have a few quirks so I'm not sure how to translate the aspect ratio. Let me explain

    Here's a screenshot from my recording: https://forum.videohelp.com/images/imgfiles/glDGu5P.png

    As you can see, there's a single 1 pixel border at the top along, a 2 pixel border on the bottom with what I think is supposed to be 16 pixel borders on the edges, but depending on how I count it can be off by a bit. Is this normal? From what I've seen there shouldn't be a border at the top and bottom, but does it even matter? If it does how should I deal with it?

    I am probably overthinking this and the ffmpeg method is probably close enough to the original source when viewed on a modern screen, but if even just for my own curiosity I'd like to make sure I am doing it properly.
    Quote Quote  
  2. Member
    Join Date
    Aug 2010
    Location
    San Francisco, California
    Search PM
    Actually, there are supposed to be 8-pixel borders left and right while the active picture area takes 704 pixels. That is the digital spec. But signals and converters vary so you can get different results. To complicate matters, your snapshot appears to be stretched horizontally (unless that infant has an unusually flat head). As for FFmpeg, you can supply the precise ratio you want, viz. -aspect 654:480.
    Quote Quote  
  3. The image appears stretched because that's a screen capture from the original 720x480 recording, not one of my resizes. I tried your suggestion and the new aspect ratio does change the look a little from my normal resize. However, in the video properties for MPC-BE it shows 720x480 (109:80) and when I screen capped it the image is 654x480, but that ratio doesn't make much sense. It's supposed to be 10:11 isn't it?

    Here's some screenshots

    Original 720x480 record with no corrections: https://forum.videohelp.com/images/imgfiles/p82ywWZ.png

    720x480 capture adjusted to 4:3 with ffmpeg: https://forum.videohelp.com/images/imgfiles/zjpr7KO.png

    720x480 capture adjusted to 654:480 with ffmpeg: https://forum.videohelp.com/images/imgfiles/0PVCEKT.png
    Quote Quote  
  4. Dinosaur Supervisor KarMa's Avatar
    Join Date
    Jul 2015
    Location
    US
    Search Comp PM
    Yeah normally I would crop the 720x480 down to 704x480 (trying to just crop out the black bars), and then resize down to 640x480. Or just keep the cropped 704x480 and flag the display ratio as 1.333 (4/3).

    Cropped down to 704x480 ==>640x480. Normally this would get rid of just about all the black bars but your sample has more than my usual.
    Image
    [Attachment 48445 - Click to enlarge]
    Last edited by KarMa; 18th Mar 2019 at 01:08.
    Quote Quote  
  5. Capturing Memories dellsam34's Avatar
    Join Date
    Jan 2016
    Location
    Member Since 2005, Re-joined in 2016
    Search PM
    Deleted, not usefull anymore.
    Last edited by dellsam34; 27th Jun 2021 at 04:43.
    Quote Quote  
  6. Then there's the crap along the bottom he might want to crop away, along with the remaining black bars. Then he might get an accurate 640x480 resize out of it. Or he can set a proper SAR before encoding. I haven't played with the picture.
    Quote Quote  
  7. Dinosaur Supervisor KarMa's Avatar
    Join Date
    Jul 2015
    Location
    US
    Search Comp PM
    Originally Posted by manono View Post
    Then there's the crap along the bottom he might want to crop away, along with the remaining black bars. Then he might get an accurate 640x480 resize out of it. Or he can set a proper SAR before encoding. I haven't played with the picture.
    Then you are vertically stretching unless you are cropping out the head switching noise and replacing it with just black for 640x480.
    Quote Quote  
  8. Originally Posted by KarMa View Post
    Yeah normally I would crop the 720x480 down to 704x480 (trying to just crop out the black bars), and then resize down to 640x480. Or just keep the cropped 704x480 and flag the display ratio as 1.333 (4/3).

    Cropped down to 704x480 ==>640x480. Normally this would get rid of just about all the black bars but your sample has more than my usual.
    Image
    [Attachment 48445 - Click to enlarge]
    I tested doing this by taking my original 720x480 image and cropping it so that it was 704x480 and resized it to 640x480 and unchecked maintain aspect ratio (i'm using paint.net) and I got this: https://forum.videohelp.com/images/imgfiles/gslUCox.png

    It looks very similar to my 654x480 image which makes sense, but in essence besides the aforementioned issues with some video players is it worth going with this method?
    Last edited by aera; 18th Mar 2019 at 03:22.
    Quote Quote  
  9. Dinosaur Supervisor KarMa's Avatar
    Join Date
    Jul 2015
    Location
    US
    Search Comp PM
    It's really up to you. If you plan on giving this video out it might be less hassle to just have a more standard 640x480 as the final video. Or you can do 704x480 but set flags to have the player play it like a 640x480, even though the video is still 704x640. Not every player will follow the DAR so it's not 100% friendly to normal people, but you may potentially save a small amount of resolution by keeping 704x480. As far as 654x480, I not sure why one would go that route unless you plan on cropping down to 640x480. 704x480 is supposed to be the video portion on a capture device, so I feel it's better to crop down to 704x480 first then resize to 4:3.
    Quote Quote  
  10. Originally Posted by KarMa View Post
    Then you are vertically stretching unless you are cropping out the head switching noise and replacing it with just black for 640x480.
    Maybe, but I was also cropping the remaining black which would stretch it less vertically, if at all. Personally, I'd never leave any black behind after cropping if it could be helped. As I said, I haven't played with the picture.

    As far as 654x480, I not sure why one would go that route unless you plan on cropping down to 640x480. 704x480 is supposed to be the video portion on a capture device, so I feel it's better to crop down to 704x480 first then resize to 4:3.
    He should have written 656x480 which is, indeed, how the 720x480 source should be resized when using ITU resizing. But, again, I'd much prefer removing all the black as well as the head-switching noise.
    Quote Quote  
  11. Footnote: The VHS capture is probably interlaced. If so, be careful with cropping vertically (mod4) and don't resize without bob-deinterlacing first.
    Quote Quote  
  12. Yeah after reading a bit more and thinking about it I think cropping to 704x480 and then resizing to 4:3 is the best bet especially considering that I do plan on giving this video out and sharing it to family members who are not at all going to be interested about aspect ratios or anything like that. Some will probably ask why the picture doesn't fill the whole screen .

    However, one of the reasons why I was going with my previous method is I was having trouble figuring out how to trim the edges of my video. I tried using MeGUI, but I couldn't quite figure out how to use it. I've been using this thread a lot for info which KarMa posted in, but I was unable to reproduce the steps. I'm probably just missing something simple.

    Also yeah the footage is definitely interlaced when I copied it, as right now it's just a raw uncompressed AVI because I wanted to make sure my work flow was setup properly. I tested de-interlacing in VLC and I could see the interlacing artifacts go away. I was going to get to de-interlacing eventually, but at some point here I read somewhere not to de-interlace because it's a destructive process, but I've read from others like Sharc that I should, and if I'm going to make sure the video looks the best with minimal interaction from the user/video player than I think it makes sense.

    So what's the best way to do those things, and if possible do them all in one go so I can smooth out my workflow?

    In my research I did run intothis guide, however when I followed the steps to change aspect ratio using
    Code:
    ffmpeg -i test.avi -vf scale=640x480,setsar=1:1 sq_output.mp4
    the output is way overcompressed, and ffmpeg didn't seem to like it when I tried to do it losslessly or I was messing something up.
    Quote Quote  
  13. You can deinterlace/crop/resize in ffmpeg:

    Code:
    ffmpeg -y -i input.avi -vf yadif=3:1:0,crop=704:480:8:0,scale=640x480,setsar=1:1 -pix_fmt yuv420p -vcodec libx264 -crf 18 output.mp4
    The second value in yadif is the field order. 1 is bottom field first, 0 is top field first. Use the appropriate setting for your source.
    Quote Quote  
  14. Thank you very much for that. I'm still trying to get the hang of ffmpeg but I'm getting better. I'm wondering what the set sar=1:1 is supposed to do, however. Since the resolution is scaled to 640x480 using that set sar value wouldn't just be multiplying 640x480 by one which wouldn't do anything? I double checked the video outputs with one with setsar=1:1 kept and the other removed and they looked identical. The only difference was a 17 byte increase in file size when setsar was added.
    Quote Quote  
  15. I started with your command line and added the deinterlacing and cropping commands. I wasn't sure if ffmpeg would keep the sar of the source or not, so I left setsar=1:1 there.

    And yes, in the absence of sar information players usually assume sar=1:1.
    Quote Quote  
  16. Banned
    Join Date
    Mar 2019
    Location
    USA
    Search Comp PM
    It is hard to tell without having the product. Could it be the combination of an over-scan/under-scan setting along with the aspect ratio? It seems like some of the cheap USB options might be a pain to set up. I always use Generic DV-25 Fire Fire converters for capturing VHS without any issues.
    Quote Quote  
  17. Capturing Memories dellsam34's Avatar
    Join Date
    Jan 2016
    Location
    Member Since 2005, Re-joined in 2016
    Search PM
    Why don't you just use mp4, I've converted 720x480 AVI lossless videos without cropping to mp4, just flagging them for 4:3, They played in two LG TV's, one iPhone and one Android phone in perfect 4:3 with black pillars, no stretching.
    Quote Quote  
  18. Originally Posted by dellsam34 View Post
    I've converted 720x480 AVI lossless videos without cropping to mp4, just flagging them for 4:3, They played in two LG TV's, one iPhone and one Android phone in perfect 4:3 with black pillars, no stretching.
    Although the differences are slight and you might not be able to tell and I even do it myself from time to time, doing it that way does not produce a 'perfect 4:3'. Using ITU resizing, to get perfect 1.33:1 playback from VHS tape sources you should start with 704x480 (remove the black bars on left and right). By leaving the black bars on, the video becomes very slightly squeezed (people are slightly too tall and thin).
    Quote Quote  
  19. Video Restorer lordsmurf's Avatar
    Join Date
    Jun 2003
    Location
    dFAQ.us/lordsmurf
    Search Comp PM
    Matting is always so much safer.
    Want my help? Ask here! (not via PM!)
    FAQs: Best Blank DiscsBest TBCsBest VCRs for captureRestore VHS
    Quote Quote  
  20. Originally Posted by lordsmurf View Post
    Matting is always so much safer.
    But you didn't say "so much more correct", so you don't seem to actually disagree. Safer how? Not all players will play 704x480 as 1.33:1? DVD players have to. And players that supposedly honor 4:3 signalling but won't resize 704x480 sources properly are flat-out wrong and shouldn't be used. Or so it seems to me.

    But, as I said, it's hard to tell as the differences are slight. Dellsam34 said "perfect". It's not "perfect", and you don't seem to disagree with me. If dellsam34 had said "close enough", I wouldn't have posted.
    Last edited by manono; 23rd Mar 2019 at 22:08.
    Quote Quote  
  21. Capturing Memories dellsam34's Avatar
    Join Date
    Jan 2016
    Location
    Member Since 2005, Re-joined in 2016
    Search PM
    Originally Posted by manono View Post
    Although the differences are slight and you might not be able to tell and I even do it myself from time to time, doing it that way does not produce a 'perfect 4:3'. Using ITU resizing, to get perfect 1.33:1 playback from VHS tape sources you should start with 704x480 (remove the black bars on left and right). By leaving the black bars on, the video becomes very slightly squeezed (people are slightly too tall and thin).
    Yes I should have said close enough, About 3% squeeze.
    Last edited by dellsam34; 27th Jun 2021 at 04:50.
    Quote Quote  
  22. You only proved VLC (which I wouldn't use for determining correct aspect ratios to begin with) uses the same method both ways, not that they are correct and accurate. I already said (twice) that the differences are slight. In addition, the player might not do it right and/or the television might not do it right. If you have a 704x480 source with your 4:3 flagging then the circles might not be round when they should be, if the source is a VHS tape which is supposed to use ITU resizing and if played using VLC to your television:

    Digital video processing

    As stated above, ITU-R BT.601 specified that standard-definition television pictures are made of lines of 720 non-square pixels, sampled with a precisely specified sampling rate. A simple mathematical calculation reveals that a 704 pixel width would be enough to contain a 480i or 576i standard 4:3 picture:

    A 4:3 480-line picture, digitized with the Rec. 601-recommended sampling rate, would be 704 non-square pixels wide.
    https://en.wikipedia.org/wiki/Pixel_aspect_ratio#Analog-to-digital_conversion
    Quote Quote  
  23. monono is correct. The 4:3 image in a 720x480 ITU capture is contained in a 704x480 portion of that frame. Extra pixels are captured to the left and right in case the capture is off center. That makes the entire 720x480 frame about 2 percent wider than 4:3, about 1.3636 vs. 1.3333. This is the international standard for NTSC video capture (with PAL it's about a 702x576 portion of the 720x576 frame). Some very old capture devices don't adhere to this standard).
    Quote Quote  
  24. Capturing Memories dellsam34's Avatar
    Join Date
    Jan 2016
    Location
    Member Since 2005, Re-joined in 2016
    Search PM
    You're right.
    Last edited by dellsam34; 27th Jun 2021 at 04:52.
    Quote Quote  
  25. No, the 704x480 already accounts for that.
    Quote Quote  
  26. Banned
    Join Date
    Dec 2010
    Location
    New York
    Search Comp PM
    I remember when I started posting and asking questions on this site almost a decade ago. Not much has changed here---people here, instead of using layman's terms to help the layman, they use a bunch of bullshit jargon, wind up talking to each other instead of the one requesting the help, and just basically make people not want to continue with their video projects anymore. You people just take away the desire to continue with ANYTHING video-related, seriously! I think I'm going to go back to lordsmurf's site.
    Quote Quote  
  27. Member
    Join Date
    Aug 2010
    Location
    San Francisco, California
    Search PM
    Originally Posted by unclescoob View Post
    I remember when I started posting and asking questions on this site almost a decade ago. Not much has changed here---people here, instead of using layman's terms to help the layman, they use a bunch of bullshit jargon, wind up talking to each other instead of the one requesting the help, and just basically make people not want to continue with their video projects anymore. You people just take away the desire to continue with ANYTHING video-related, seriously! I think I'm going to go back to lordsmurf's site.
    And what have YOU added, besides useless bile? You are quite welcome to take your attitude elsewhere. And by the way, your assertions are disproved by the very first line of the OP.

    Originally Posted by aera View Post
    This forum has been tremendously helpful in answering nearly all of my questions about setting up converting my families old vhs tapes to digital
    Quote Quote  
  28. Banned
    Join Date
    Dec 2010
    Location
    New York
    Search Comp PM
    Hmmm, JVRaines, I've never heard of YOU before here. Then again, my last time here was probably 2013 or so. You just might be the one to actually provide some type of revival in this place. You seem to have good character too, standing up to me like that. Unlike my nephews, "Man-Oh, no!" and "Jag-a-Bleh", who generally just babble jargon all over the place. Perhaps you may be able to help me with an old project. In return for your services, I can provide you with a good variety of entertainment in this place my good fellow.
    Quote Quote  
  29. Banned
    Join Date
    Dec 2010
    Location
    New York
    Search Comp PM
    JVRaines, I just downloaded virtualdub and can't get the P.O.S. to open ANYTHING. And when I say anything, I mean it won't even open my mpeg-2. But...um....I thought this was the whole point of virtualdub, to open MPEG-2s. Go on, tell me I have to go hunting for another stupid code pack to install in it because um...it couldn't just be included in it???

    Which is as intelligent to me as me going to the car dealership, and being told that I have to purchase the engine separately.
    Quote Quote  
  30. Banned
    Join Date
    Dec 2010
    Location
    New York
    Search Comp PM
    So to answer your question to me about what I add besides useless bile? It may be bile, but it certainly isn't useless, as I can ONLY imagine the number of newbies who want to just fix their videos, only to learn that they have to learn about codecs, and LAN, and WAN, and Ping, Pang, and Wang. I'm typing what they're thinking.

    This entire video frameserving, editing thing really does get pretentious for no good reason other than to make the pretentious in these websites even more pretentious.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!