VideoHelp Forum
+ Reply to Thread
Results 1 to 26 of 26
Thread
  1. I was doing some restoration on a VHS tape, and the resolution I was originally working with was 720x480. I adjusted this to 704x480 by removing the 8px black borders from both sides, and during the restoration process, ran an AI model that upscaled the resolution to 1408x960 (x2 of 704x480). I plan on burning this to blu-ray and wanted to add some black borders to get the resolution to 1920x1080.

    I was wondering though, I know that 1408x960 (being x2 of 704x480) would have an AR of 4:3 and PAR of 10/11. But with the black borders I plan on adding to achieve 1920x1080, would that still hold true? Or would the AR/PAR be something else now? I'm currently using Hybrid, and these are my settings:

    Image
    [Attachment 79354 - Click to enlarge]


    Thanks for any help!
    Quote Quote  
  2. Member Cornucopia's Avatar
    Join Date
    Oct 2001
    Location
    Deep in the Heart of Texas
    Search PM
    The center portion of a 1080 resized image that is 4:3 DAR is 1440x1080, and it will then have a PAR of 1:1, then pad black to 1920.


    Scott
    Quote Quote  
  3. aBigMeanie aedipuss's Avatar
    Join Date
    Oct 2005
    Location
    666th portal
    Search Comp PM
    encoding black borders to your 1408x960 will create a 1920x1080 video with black borders top, bottom, left and right. but the new ar will be 16/9. do what corny suggests. create a 1440x1080 then add just left and right black borders.
    --
    "a lot of people are better dead" - prisoner KSC2-303
    Quote Quote  
  4. In Hybrid try:
    Image Attached Thumbnails Click image for larger version

Name:	wu.png
Views:	31
Size:	44.7 KB
ID:	79358  

    Quote Quote  
  5. Thanks for the help everyone! I've been spending tonight reading about upscaling 704x480 (and by proxy, my 1408x960 res) to 1440x1080, so that's definitely what I'll try to work for. I've seen this as the recommended approach for YouTube so that it doesn't compress the video as much. Is this also the recommended approach if I want to burn this onto a blu-ray and play it on TV?

    Originally Posted by Sharc View Post
    In Hybrid try:
    Appreciate it! I gave these settings a try, although it seems the picture is a bit narrower from my VHS capture, is that an intended effect?

    Here's a screenshot of my VHS capture:

    Image
    [Attachment 79360 - Click to enlarge]


    From your recommended settings:

    Image
    [Attachment 79361 - Click to enlarge]


    I also went ahead and uploaded a small clip if that helps at all.
    Image Attached Files
    Quote Quote  
  6. That's a different story...
    In Avisynth

    Code:
    AVISource("intro short.avi")
    crop(2,116,-2,-96)
    Spline36Resize(1844,1080) #square pixels, assuming source PAR 10/11
    Addborders(38,0,38,0)  #pad to 1920x1080
    Do accordingly in Hybrid
    Image Attached Thumbnails Click image for larger version

Name:	intro short000101.png
Views:	7
Size:	887.5 KB
ID:	79363  

    Last edited by Sharc; 26th May 2024 at 00:25.
    Quote Quote  
  7. Originally Posted by Sharc View Post
    That's a different story...
    In Avisynth

    Code:
    AVISource("intro short.avi")
    crop(2,116,-2,-96)
    Spline36Resize(1844,1080) #square pixels, assuming source PAR 10/11
    Addborders(38,0,38,0)  #pad to 1920x1080
    Do accordingly in Hybrid
    Unfortunately I have to keep the borders on the top and bottom. They end up shifting up and down throughout the video, so a straight crop at one point could cause part of the screen to get cut off at another part in the video.

    If I were to keep the top and bottom borders, would you recommend a different approach at all? Thank you for your help!

    EDIT: Went ahead and included a picture showcasing the shifting top/bottom borders from two different scenes. Can kind of see how it's shifted downwards some:

    Image
    [Attachment 79364 - Click to enlarge]
    Last edited by wubikens; 26th May 2024 at 01:00.
    Quote Quote  
  8. Crop slightly into the pictures, something like
    Code:
    AVISource("intro short.avi")
    crop(2,122,-2,-96)  #1404x742 
    Spline36Resize(1858,1080)  #square pixels assuming source PAR 10/11
    Addborders(32,0,30,0) #pad to 1920x1080
    in Hybrid (you can crop as you like and keep only a part of the top/bottom borders if you don't want to crop into the picture)
    Image Attached Thumbnails Click image for larger version

Name:	hywu.png
Views:	21
Size:	42.8 KB
ID:	79368  

    Last edited by Sharc; 26th May 2024 at 06:43. Reason: Thumbnail attached
    Quote Quote  
  9. Member
    Join Date
    May 2005
    Location
    Australia-PAL Land
    Search Comp PM
    I'm in pain...Get yourself a video editor and crop each differing section indivdually so you get the whole of the movie.
    Quote Quote  
  10. I'd be cropping the top and bottom borders if your screenshot is anything to go by, as they're not always the same color. The borders on the left are dark grey, but why not have borders of the smallest possible size anyway? If you crop enough to remove the borders completely you'll lose a little bit of picture, but it wouldn't be enough for me to worry about. I'd also crop a few pixels each side to make the edges sharper, but that's just me. From your AVI sample:

    CropResize(1920,1080, 4,118,-4,-98, InDAR=4.0/3.0, Borders=true, Info=true)

    Image
    [Attachment 79370 - Click to enlarge]


    I don't know how much editing you can do using Hybrid, but if you were really keen and wanted to keep the maximum amount of picture, then based on your screenshot (and just making up frame ranges) you could go through the video manually and do something like this:

    A = CropResize(1920,1080, 4,118,-4,-96, InDAR=4.0/3.0, Borders=true)
    B = CropResize(1920,1080, 4,122,-4,-90, InDAR=4.0/3.0, Borders=true)

    A.Trim(0, 3562) + \
    B.Trim(3563, 7451) + \
    A.Trim(7452, 9554) and so on....

    Personally though, I'd just use a one size fits all amount of cropping. You don't lose all that much.
    A preview of how much picture you'd lose doing it that way, according to your screenshot:

    CropResize(1920,1080, 4,122,-4,-96, InDAR=4.0/3.0, Borders=true, CPreview=1)

    Image
    [Attachment 79374 - Click to enlarge]


    PS CropResize uses a resizer to crop a fraction of a pixel if need be to make the cropping exact for the resizing, which is why it's showing an unusual amount of cropping. You'll have to round it to a whole number when cropping in Hybrid, but it won't make a noticeable difference.

    PPS I noticed that for each example, the different cropping results in the width being resized a little differently, which results in the pillarbox borders changing size. Assuming I wasn't using a one size fits all cropping I think that might annoy me. As the resizing, based on the different cropping needed according to your screenshot, would be 1836x1080 and 1844x1080, to keep the borders the same size I'd probably force the same picture aspect ratio each time, but that's just me.
    1836:1080 would probably cause the script to crop a bit extra from the sides in places, while 1844:1080 would cause it to crop a little extra from the top and bottom. Whichever one you picked it would make sure the pillarbox borders are always the same size no matter how much your manually specified cropping changes, as long as you don't mind sacrificing a little bit of picture if necessary. Anyway, something like....

    A = CropResize(1920,1080, 4,118,-4,-96, InDAR=4.0/3.0, CropDAR=1836.0/1080.0, Borders=true)
    B = CropResize(1920,1080, 4,122,-4,-90, InDAR=4.0/3.0, CropDAR=1836.0/1080.0, Borders=true)

    A.Trim(0, 3562) + \
    B.Trim(3563, 7451) + \
    A.Trim(7452, 9554) and so on....
    Last edited by hello_hello; 26th May 2024 at 09:36.
    Quote Quote  
  11. Originally Posted by wubikens View Post
    They end up shifting up and down throughout the video, so a straight crop at one point could cause part of the screen to get cut off at another part in the video.
    This is caused by incorrect/ insufficient cropping.
    Quote Quote  
  12. Thanks for the advice y'all! I'll get to work on this, appreciate it very much.

    I've spent the better part of today experimenting with Hybrid and reading up on different DAR/PAR/SARs, and just had a couple lingering questions. From my experimenting, I can see that an NTSC resolution of 704x480 with a declared DAR of 4:3 views the same as 640x480 with no declared DAR. Similarly, I can see that my resolution of 1408x960 with a declared DAR of 4:3 views the same as 1440x1080 with no declared DAR.

    My questions are, what's the difference? Like, is it bad to set something to a resolution without a declared DAR (i.e. 640x480 or 1440x1080)? Is it preferred to do it the other way around (i.e. 704x480 or 1408x960 with a declared DAR of 4:3)? Will a TV/player play them both the same? Or will playing something with no declared DAR have issues?

    EDIT: I was reading that some players can ignore the DAR flag, in which case, is it actually better to set the resolution without a DAR?
    Last edited by wubikens; 26th May 2024 at 22:05.
    Quote Quote  
  13. Member Cornucopia's Avatar
    Join Date
    Oct 2001
    Location
    Deep in the Heart of Texas
    Search PM
    You get best compatibility when you follow standards.

    The standards for HD, UHD video say that - barring some few exceptions like HDV - all HD and higher resolutions use PAR of 1:1, and 4:3 or 16:9 DAR. Which is much easier to work with than SD material. So make it like that.

    You quad SD (1408x960) is nonstandard, so it is not a good idea to leave it like that if you hope for compatible shareability.

    Your issue of cropping shifts is another matter - one which should have been properly fixed using a proper NLE, like Alwyn said.


    Scott
    Quote Quote  
  14. Originally Posted by Cornucopia View Post
    You get best compatibility when you follow standards.

    The standards for HD, UHD video say that - barring some few exceptions like HDV - all HD and higher resolutions use PAR of 1:1, and 4:3 or 16:9 DAR. Which is much easier to work with than SD material. So make it like that.

    You quad SD (1408x960) is nonstandard, so it is not a good idea to leave it like that if you hope for compatible shareability.

    Your issue of cropping shifts is another matter - one which should have been properly fixed using a proper NLE, like Alwyn said.


    Scott
    Thanks for clarifying some more!

    While 1408x960 might be a nonstandard resolution, with a declared aspect ratio flag of 4:3, it displays the same as 1440x1080, which is standard. So I guess, does it matter if 1408x960 is nonstandard, if it displays the same as a standard resolution with the correct aspect ratio flag set? How is shareability affected?

    Same as 702x480 at 4:3 vs a resize to 640x480. Is there a difference if they display the same? Since aspect ratio flags can be ignored by players, is it better to resize?

    As far as the shifting borders go, that's how it is on the original VHS capture. The top and bottom borders are a part of the movie, and every frame's border shifts up and down variably throughout the video. There are around 37,000 frames in the full video. Correcting each individual frame in a video editor as Alwyn suggested isn't a viable option in this case.
    Quote Quote  
  15. Originally Posted by wubikens View Post
    Thanks for the advice y'all! I'll get to work on this, appreciate it very much.

    I've spent the better part of today experimenting with Hybrid and reading up on different DAR/PAR/SARs, and just had a couple lingering questions. From my experimenting, I can see that an NTSC resolution of 704x480 with a declared DAR of 4:3 views the same as 640x480 with no declared DAR. Similarly, I can see that my resolution of 1408x960 with a declared DAR of 4:3 views the same as 1440x1080 with no declared DAR.

    My questions are, what's the difference? Like, is it bad to set something to a resolution without a declared DAR (i.e. 640x480 or 1440x1080)? Is it preferred to do it the other way around (i.e. 704x480 or 1408x960 with a declared DAR of 4:3)? Will a TV/player play them both the same? Or will playing something with no declared DAR have issues?
    Continue reading and studying. You need to understand the principle of square pixels and non-square pixles, and their relation as DAR=SARxPAR, with
    DAR: Display Aspect Ratio (e.g. 4:3, 16:9, ....)
    SAR: Storage Aspect Ratio = frame width/frame height (e.g. 720/480, 704/480, 1920/1080, ....)
    PAR: Pixel Aspect Ratio (e.g. 8/9, 10/11, ....)

    Remember:
    - Out of these 3 (DAR, SAR, PAR) one can only freely select 2, the 3rd is then given! (btw. Hybrid solves a possible conflict automatically)
    - Cropping and/or Padding does not change the PAR, but changes the DAR
    - Resizing (except linear zooming) changes the PAR

    (Caution: these acronyms DAR, SAR, PAR are not unique but may have a different meaning in a different context, like SAR = Sampling Aspect Ratio in x264 which is the same as PAR above. This may unfortunately add to the confusion.)

    Some reading:
    https://en.wikipedia.org/wiki/Pixel_aspect_ratio

    You find a lot of posts related to this topic in this forum, I am just lazy to do the search for you

    Edit: Re. your borders shifting did you try the "workaround" using the hybrid setting as per post#8? (You may want to change the cropping settings)

    Edit2:
    My questions are, what's the difference? Like, is it bad to set something to a resolution without a declared DAR (i.e. 640x480 or 1440x1080)?...
    Best for wide playback compatibility is to stick to standards, as Cornucopia wrote.
    Whats the difference? For example, non-square 704x480 with DAR=4:3 signalling has a potentially higher horizontal resolution (=more details, sharper) than 640x480. (704 vs 640 horizontal pixels).
    Secondly, if you resize to square pixels like 640x480, your TV will upscale again for its monitor, so you get 2 rescaling processes in a row.
    Last edited by Sharc; 27th May 2024 at 03:39.
    Quote Quote  
  16. Originally Posted by wubikens View Post
    Thanks for the advice y'all! I'll get to work on this, appreciate it very much.

    I've spent the better part of today experimenting with Hybrid and reading up on different DAR/PAR/SARs, and just had a couple lingering questions. From my experimenting, I can see that an NTSC resolution of 704x480 with a declared DAR of 4:3 views the same as 640x480 with no declared DAR. Similarly, I can see that my resolution of 1408x960 with a declared DAR of 4:3 views the same as 1440x1080 with no declared DAR.
    Because you said in your original post you were planning on burning the video to Bluray, I assumed you'd need to make it Bluray compliant. If so, you'll have to resize. The only anamorphic video supported by Bluray is 720x480 or 720x576, or 1440x1080 with a 16:9 DAR. https://en.wikipedia.org/wiki/Blu-ray#Video
    The PAR mess for SD video still applies to Bluray, as the Bluray spec only officially supports PARs of 10:11 and 40:33 for 720x480, which gives you a DAR of 15:11 and 20:11 respectively, but the HDMI spec says they should be exactly 4:3 and 16:9.

    If you don't care about official Bluray video compliance you can do whatever you like. Most Bluray players will play video of any resolution via their USB inputs anyway, and the same when playing standalone files such as MKV or MP4 burned to disc. I assume anamorphic support is also pretty standard these days, but there's two old Bluray players in this house, a Samsung and a Sony, and the Samsung assumes all video has a PAR of 1:1 while the Sony honours any PAR (not just the industry standard ones). As a result I always resize to square pixel dimensions, but at least it doesn't have to be an industry standard resolution so there's no need to add borders. I don't know how well TVs with built-in media players support anamorphic video. My TV's a Samsung and the same age as the Bluray player, so the TV assumes "square pixels" too.

    Here's a list of the possible DVD PARs. https://forum.doom9.org/showthread.php?p=1058927
    The only ones you really need to choose between are the mpeg4 and generic PARs. The mpeg4 PARs are the digital equivalent of the old ITU analogue PARs, and close enough to being the same that it doesn't make much difference which ones you use, but the mpeg4 PARs are easier to remember and always result in a DAR of either 15:11 or 20:11 for both 720x480 and 720x576.
    Last edited by hello_hello; 27th May 2024 at 05:50.
    Quote Quote  
  17. Member
    Join Date
    May 2005
    Location
    Australia-PAL Land
    Search Comp PM
    Go simple, go square.
    Quote Quote  
  18. Originally Posted by Alwyn View Post
    Go simple, go square.
    It's just unfortunate that - for good technical reasons - neither analog consumer tape captures nor DV nor DVD are square pixel formats. So even for "go simple, go square" one should have a basic understanding of cropping and resizing to do it correctly. This includes using GUIs correctly. Even more so for interlaced footage.
    Image Attached Images  
    Last edited by Sharc; 27th May 2024 at 06:58. Reason: Picture added
    Quote Quote  
  19. Member
    Join Date
    May 2005
    Location
    Australia-PAL Land
    Search Comp PM
    C'mon Sharc, deinterlace, for AVI crop off your 8 pixels either side (not for DV), make any further crops in a 4:3 ratio then resize as PAL: 768x576 or NTSC: 640x480 (or both to 1440x1080). Done. Forever.

    Albert would be happy! He'd probably even give me a KISS.
    Quote Quote  
  20. Originally Posted by Alwyn View Post
    C'mon Sharc, deinterlace, for AVI crop off your 8 pixels either side (not for DV), make any further crops in a 4:3 ratio then resize as PAL: 768x576 or NTSC: 640x480 (or both to 1440x1080). Done. Forever.

    Albert would be happy! He'd probably even give me a KISS.
    So how does the OP's avi (attachment to post #5) look, following your recipe above (not for DV, exception noted)? He wanted it 1920x1080 btw.
    The OP will be grateful for a KISS after all the explanations he got

    Edit:
    FWIW here the result of my script in post#8 (same you would get with Hybrid)
    Image Attached Files
    Last edited by Sharc; 27th May 2024 at 08:40.
    Quote Quote  
  21. Member
    Join Date
    May 2005
    Location
    Australia-PAL Land
    Search Comp PM
    I don't use Hybrid. VDub setup:

    Image
    [Attachment 79402 - Click to enlarge]


    Result on right (original and resized not to scale, obviously):
    Image
    [Attachment 79403 - Click to enlarge]
    Quote Quote  
  22. Compare with my file in post#20. Still prefer KISS?

    P.S. My resizing to square pixels is based on the assumption that the OP's original capture had a PAR of 10/11 (standard NTSC tape capture, 720x480@PAR 10/11). He cropped the sidebars (-> 704x480) which doesn't change the PAR, so still PAR=10/11. His "AI processing" upscaled the cropped picture 2x (=1408x960), which doesn't change the PAR, so still PAR=10/11. That's his intro_short.avi of post#5. I cropped it to 1404x742 to remove the top/bottom bars and side crud, which still doesn't change the PAR. Converting 1404x742@PAR 10/11 to square pixels with height 1080 gives a width of 1858, so 1858x1080 square pixels eventually padded on the sides to make it 1920x1080 overall, square pixels.
    Last edited by Sharc; 27th May 2024 at 09:38. Reason: P.S. added
    Quote Quote  
  23. Member
    Join Date
    May 2005
    Location
    Australia-PAL Land
    Search Comp PM
    Just tell me what needs to happen and I'll do it with a few clicks without starting up AVISynth. Do we want those brown letterbox borders or not? How much of the brown borders does the Op want kept?

    Originally Posted by Wubikens
    Unfortunately I have to keep the borders on the top and bottom. They end up shifting up and down throughout the video, so a straight crop at one point could cause part of the screen to get cut off at another part in the video.

    If I were to keep the top and bottom borders, would you recommend a different approach at all?
    Quote Quote  
  24. Too many incredible and helpful posts here to quote, so just a blanket thank you to all of y'all.

    Hopefully my questions didn't come across as argumentative and that I was going to disregard the advice I've been given in this thread. That 100% wasn't my intention, I just wanted to ask based on my current level of understanding, what difference it made to do x vs y.

    I have a better understanding now I feel. A SAR of 720x480 with an 8/9 PAR and a 4:3 DAR vs a resize to a SAR of 640x480 with a PAR of 1/1 and a DAR of 4:3 is a completely different situation to the SAR of 1408x960 with a PAR of 10/11 and a DAR of 4:3 vs 1440x1080/SAR, 1:1 PAR, 4:3 DAR.

    Regarding the latter, it's a compliance issue. A nonstandard resolution like 1408x960 just wouldn't be supported by most players, whereas 1440x1080 would be. Whereas Sharc mentioned, the issue with the former is one more of picture quality rather than compliance. Moreover, for HD content on Blu-ray, only 1/1 PARs, or square PARs, are supported. But according to hello_hello, blu-ray can support 10/11 for 720x480 SARs.

    OK! So if all THAT sounds correct, I just have one more lingering question. 4:3 = 1.333...., 1440x1080 with a square PAR = 1.333.... but 16:9 = 1.777...8. The spec on the Wikipedia article specifies that 1440x1080 is supported at a DAR of 16:9. Could somebody help me understand how a SAR of 1440x1080 with square PAR comes out to 16:9? Unless of course, it changes the PAR from square to something else to get the 16:9 DAR. Is that the case?

    PS: I made this thread before understanding all of this. With that said, I'm OK with the 1440x1080 resolution over my originally requested 1920x1080 with letterbox. But yes, I'd like to keep the top and bottom borders if possible, because they are a part of the movie.
    Quote Quote  
  25. Originally Posted by wubikens View Post
    OK! So if all THAT sounds correct, I just have one more lingering question. 4:3 = 1.333...., 1440x1080 with a square PAR = 1.333.... but 16:9 = 1.777...8. The spec on the Wikipedia article specifies that 1440x1080 is supported at a DAR of 16:9. Could somebody help me understand how a SAR of 1440x1080 with square PAR comes out to 16:9? Unless of course, it changes the PAR from square to something else to get the 16:9 DAR. Is that the case?
    Anamorphic 1440x1080 displaying as 16:9 as per the Bluray spec, has a pixel/sample aspect ratio of 4:3.

    1440 * 4 / 3 = 1920
    1920 / 1080 = 16:9

    If you take any 16:9 video (1920x1080 or 1280x720 etc) and resize it to 1440x1080 it'll obviously look squished, but if you set 4:3 as the pixel aspect ratio it'll display correctly.
    Quote Quote  
  26. Originally Posted by hello_hello View Post
    Originally Posted by wubikens View Post
    OK! So if all THAT sounds correct, I just have one more lingering question. 4:3 = 1.333...., 1440x1080 with a square PAR = 1.333.... but 16:9 = 1.777...8. The spec on the Wikipedia article specifies that 1440x1080 is supported at a DAR of 16:9. Could somebody help me understand how a SAR of 1440x1080 with square PAR comes out to 16:9? Unless of course, it changes the PAR from square to something else to get the 16:9 DAR. Is that the case?
    Anamorphic 1440x1080 displaying as 16:9 as per the Bluray spec, has a pixel/sample aspect ratio of 4:3.

    1440 * 4 / 3 = 1920
    1920 / 1080 = 16:9

    If you take any 16:9 video (1920x1080 or 1280x720 etc) and resize it to 1440x1080 it'll obviously look squished, but if you set 4:3 as the pixel aspect ratio it'll display correctly.
    Appreciate it! Thank you for explanation. This thread has been incredibly informative and I appreciate everyone's patience and time in explaining everything.
    Quote Quote  



Similar Threads

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