VideoHelp Forum
+ Reply to Thread
Results 1 to 11 of 11
Thread
  1. Hi there,

    so I have a video that has a resolution of 960x540 and was encoded with H.264/AVC at about ~2000kbps VBR. Unfortunately there are black bars on the left and right side (36px each) making the video look squished (the original AR of this content was 16:9 however my source has also been cropped).
    The real size of the image would be 888x536 after cropping. StaxRip has an option to crop without resizing, so I could just set the DAR to 1,75 and the output will result in a correct non-squished image.
    Since I will be reencoding using almost the same settings, such as VBR 2000kbps, 2-pass Very Slow I know that it will degrade the quality a bit. But at this point I could just resize to square pixels using Spline36.

    My question is what would you do in my situation? I know resizing would obviously degrade the quality even more but will it really be that noticeable?
    I'm afraid that this weird 1,75 DAR as well as 469:444 PAR will cause any issues with some media players/devices. And since I will need to reencode no matter what wouldn't it make the most sense to just resize to square pixels?
    Quote Quote  
  2. If you just set the aspect ratio at the container level you won't have to reencode. Not all players respond to that though. And players that don't respond to container level AR flags may not respond to stream level AR flags either. So it's safest to resize and encode as square pixel.
    Quote Quote  
  3. Originally Posted by jagabo View Post
    If you just set the aspect ratio at the container level you won't have to reencode. Not all players respond to that though. And players that don't respond to container level AR flags may not respond to stream level AR flags either. So it's safest to resize and encode as square pixel.
    I wish setting the AR flag would do it but as I said there are black bars that need to be cropped, if I just set the flag I get black bars on top and bottom too. So reencoding is a must, just not sure if I should resize or not.
    Quote Quote  
  4. Why worry about black bars?
    Quote Quote  
  5. if your player is good it might support H.264 cropping meta data which could be added using ffmpegs bitstream filters (https://ffmpeg.org/ffmpeg-bitstream-filters.html#toc-h264_005fmetadata) which would not require reencoding. (through bitstream filters aspect ratio could also be changed on stream level)

    Cu Selur
    users currently on my ignore list: deadrats, Stears555
    Quote Quote  
  6. Originally Posted by jagabo View Post
    Why worry about black bars?
    As I said they have to be cropped because the video is squished. You could say it's encoded anamorphic I guess, as the inner picture is stretched to the inside, kind of like 16:9 stretched to 4:3 with letterboxing. So I need to remove the black bars first before I can stretch it back to the (almost) 16:9 aspect ratio.
    Quote Quote  
  7. Originally Posted by sebastiaaan View Post
    Originally Posted by jagabo View Post
    Why worry about black bars?
    As I said they have to be cropped because the video is squished.
    If you set the sampling aspect ratio to 1.081 (960/888), or the display aspect ratio to 1.922 (16/9*960/888), the picture will be stretched horizontally to compensate. Of course, there will be ~4 percent black bars at the left and right edges and larger black bars at the top and bottom. And if your TV doesn't display that correctly -- that answers your main question: you have to resize after cropping.
    Last edited by jagabo; 20th Jul 2021 at 13:37.
    Quote Quote  
  8. Crop and resize to 960x540, x264, CRF 18, constant frame rate, Dar 16:9, preset fast.
    All can be done with easy by clever Ffmpeg-GUI.
    Last edited by ProWo; 20th Jul 2021 at 16:25.
    Quote Quote  
  9. Originally Posted by ProWo View Post
    Crop and resize to 960x540, x264, CRF 18, constant bitrate, Dar 16:9, preset fast.
    I think you meant constant frame rate.
    Quote Quote  
  10. Originally Posted by jagabo View Post
    Originally Posted by ProWo View Post
    Crop and resize to 960x540, x264, CRF 18, constant bitrate, Dar 16:9, preset fast.
    I think you meant constant frame rate.
    Yes, of course, i'm sorry.
    Quote Quote  
  11. Here's sample 960x540 video with at 16:9 image squashed into a 888x536 portion of the frame. The original was a square pixel encoding so the white block in the center of the frame appeared too tall. I used MkvToolnixGUI to set the display aspect ratio to 1.922. If your player responds to the flag the white block should be square.

    Before setting DAR:
    Image
    [Attachment 59955 - Click to enlarge]


    After setting DAR to 1.922:
    Image
    [Attachment 59956 - Click to enlarge]
    Image Attached Files
    Quote Quote  



Similar Threads

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