VideoHelp Forum
+ Reply to Thread
Results 1 to 12 of 12
Thread
  1. I've noticed that my picture becomes slightly stretched once I resize it to 1440x1080. My primary goal is to upload captures to YouTube, so I've deinterlaced it, cropped it and then resized it. I used Sharc's post as a reference for cropping and dellsam34's post as a reference for the AviSynth script and rendering with ffmpeg (I wasn't aware of jagabo's corrections until after I've rendered the final MP4). My final script was as follows:
    Code:
    AVISource("J:\Videos\VHS\BIGBOXTDK\985\985.avi")
    AssumeTFF()
    QTGMC(Preset="Fast")
    crop(12,2,-18,-10) 
    LanczosResize(1440, 1080)
    Once the video was done rendering, I compared the two and noticed that the news anchor lady's face looks stretched compared to the original 720x576 capture.
    Click image for larger version

Name:	jHGp0zQ.jpg
Views:	128
Size:	73.4 KB
ID:	73211 Click image for larger version

Name:	W3lrEDs.jpg
Views:	130
Size:	179.0 KB
ID:	73212
    Did I mess up the aspect ratio while cropping?
    Attached is the sample from the capture.
    Image Attached Files
    Quote Quote  
  2. Note that the display aspect (DAR) of your source wrong, it shouldn't be 5:4 DAR. The upscaled output output video has the correct DAR, 4:3.
    Quote Quote  
  3. Capturing Memories dellsam34's Avatar
    Join Date
    Jan 2016
    Location
    Member Since 2005, Re-joined in 2016
    Search PM
    It's probably because the original video frame does not have an aspect ratio yet so it looks squeezed horizontally and when you resized to 1440x1080 now it looks about right, What was your resolution before resizing?
    Never mind, Jagabo beat me to it.
    Quote Quote  
  4. Originally Posted by jagabo View Post
    Note that the display aspect (DAR) of your source wrong, it shouldn't be 5:4 DAR. The upscaled output output video has the correct DAR, 4:3.
    Yeah, I checked it in MPC and VLC. But why is that? Is it the player that's assuming it wrong or is it wrong in itself?
    Originally Posted by dellsam34 View Post
    What was your resolution before resizing?
    720x576 (690x564 after cropping before resizing), 25 fps PAL capture.
    Quote Quote  
  5. Capturing Memories dellsam34's Avatar
    Join Date
    Jan 2016
    Location
    Member Since 2005, Re-joined in 2016
    Search PM
    Because a computer player display it as if it was square pixel, You can force MPC and VLC to display it in 4:3 it you want to, just change the frame aspect ratio setting.
    690/564 = 1.223, 704/576 = 1.222, All look good to me, Although you can crop more to get rid of the head switch if you want, the resizing to HD will smooth it out.
    Quote Quote  
  6. Originally Posted by Sunk View Post
    Originally Posted by jagabo View Post
    Note that the display aspect (DAR) of your source wrong, it shouldn't be 5:4 DAR. The upscaled output output video has the correct DAR, 4:3.
    Yeah, I checked it in MPC and VLC. But why is that? Is it the player that's assuming it wrong or is it wrong in itself?
    PAL video capture uses a 720x576 frame to hold the 4:3 DAR video (actually the 4:3 DAR video is in a ~702x576 portion of that frame). Huffyuv AVI doesn't have a way of signaling the DAR or SAR of the video it contains. So you get a DAR that matches the frame dimensions (5:4). It's up to you to keep track of the SAR/DAR and encode properly.
    Last edited by jagabo; 16th Aug 2023 at 12:46. Reason: Corrected 702x567 to 702x576
    Quote Quote  
  7. Captures & Restoration lollo's Avatar
    Join Date
    Jul 2018
    Location
    Italy
    Search Comp PM
    In order to do not introduce any distortion, from your 720x576 frame you should mask the head switching noise, crop to 704x576 and then upscale to 1440x1080:

    Code:
    AviSource("J:\Videos\VHS\BIGBOXTDK\985\985.avi")
    AssumeTFF()
    crop(12,2,-18,-10)
    QTGMC()
    addborders(6,6,8,6)
    nnedi3_rpow2(rfactor=2, nns=4, qual=2, cshift="Spline36Resize", fwidth=1440, fheight=1080)
    In practice, as latreche34 said, you can crop a bit more to hide some more portion of the top and bottom black bars without compensating, and the distortion will be barely visible
    Quote Quote  
  8. Originally Posted by jagabo View Post
    PAL video capture uses a 720x576 frame to hold the 4:3 DAR video (actually the 4:3 DAR video is in a ~702x567 portion of that frame). Huffyuv AVI doesn't have a way of signaling the DAR or SAR of the video it contains. So you get a DAR that matches the frame dimensions (5:4). It's up to you to keep track of the SAR/DAR and encode properly.
    You mean ~702x576, no?
    Quote Quote  
  9. Originally Posted by Sharc View Post
    Originally Posted by jagabo View Post
    PAL video capture uses a 720x576 frame to hold the 4:3 DAR video (actually the 4:3 DAR video is in a ~702x567 portion of that frame). Huffyuv AVI doesn't have a way of signaling the DAR or SAR of the video it contains. So you get a DAR that matches the frame dimensions (5:4). It's up to you to keep track of the SAR/DAR and encode properly.
    You mean ~702x576, no?
    Yes. Typo.
    Quote Quote  
  10. Thanks for your suggestions. Today I decided to upload a test video on YouTube of one of the commercial captures I have.

    https://www.youtube.com/watch?v=OGb8T-M60U8

    I know one of the issues could be some clipped whites/crushed blacks, but when you're working with MESECAM, there's not much you can do. I tried adjusting the proc amp settings as best as I could. Is there anything else I should work on? This was my final AviSynth script:
    Code:
    AVISource("J:\Videos\VHS\SHOEBOX\Goldtron\test.avi")
    AssumeTFF()
    QTGMC(Preset="Fast")
    Colormatrix("Rec.601->Rec.709")
    SMDegrain(tr=3, thsad=1000, PreFilter=4)
    crop(12,2,-18,-18)
    addborders(6,6,8,6)
    nnedi3_rpow2(rfactor=2, nns=4, qual=2, cshift="Spline36Resize", fwidth=1440, fheight=1080)
    I converted the colormatrix to 709 since I've read you should do it when you upload to YT. In addition, I used some SMDegrain to get rid of some chroma noise and parts of lollo's script. Had to crop the bottom part a bit more this time, the head switching noise wasn't fully cropped with "(12,2,-18,-10)" from my previous post.

    EDIT: And, in case someone is curious to see what the original capture looked like, here's a raw clip of it.
    Image Attached Files
    Quote Quote  
  11. Member
    Join Date
    May 2005
    Location
    Australia-PAL Land
    Search Comp PM
    Add ChromashiftSP (64 bit filter) somewhere after QTGMC to move that hair orange edge to the right.

    I'm using AVISynth 3.7.3+, 64bit.

    http://avisynth.nl/index.php/ChromaShiftSP

    Code:
    ChromaShiftSP(X=-4, Y=0) #-X is right, -Y is down
    https://imgsli.com/MTk5NTUw
    Last edited by Alwyn; 19th Aug 2023 at 22:16.
    Quote Quote  
  12. If you crop more vertical you should adjust the added borders accordingly for a 704x576 frame:
    Code:
    addborders(6,10,8,10)
    Edit:
    Or for captured PAL sources for a 702x576 frame (see post#6):
    Code:
    addborders(6,10,6,10)
    Last edited by Sharc; 20th Aug 2023 at 16:13.
    Quote Quote  



Similar Threads

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