VideoHelp Forum




+ Reply to Thread
Page 1 of 2
1 2 LastLast
Results 1 to 30 of 33
  1. i never tried to remove or cropping black bar. can some one please tell me if i remove black bars, will i lose any video data (not the quality). i could not find any difference in below example. and how crop is done?

    black bar removed
    https://forum.videohelp.com/images/imgfiles/lwBFo0P.jpg

    with black bar
    https://forum.videohelp.com/images/imgfiles/1oZMnbk.jpg

    *i guess i posted in wrong section. i report the thread already.
    Quote Quote  
  2. If you crop black bars, you have to recode the video and this isn't lossless.
    But you can avoid much visible impact encoding with a low crf value, ge 18.
    You can try clever Ffmpeg-GUI, it has an automatic crop detection function and encode with x264 (avc) crf 18 to new video.
    Quote Quote  
  3. hmm,...
    • .mkv/.mp4/.mo container have cropping flags, so if ht player supports it one could 'crop' without reencoding.
    • when using lossless compression the reencode wouldn't cause loss of active video data.
    users currently on my ignore list: deadrats, Stears555, marcorocchini
    Quote Quote  
  4. You are right, Selur, but:
    Most Tv players would not support crop flags,
    lossless encoded videos give enormous large files.
    Quote Quote  
  5. Sure, but without knowing what firekid wants to do it is a possibility that should be considered.

    Cu Selur
    users currently on my ignore list: deadrats, Stears555, marcorocchini
    Quote Quote  
  6. @ ProWo
    if we crop the black bar will we loss any of video part/portion?

    my common sense saying if we crop, there may be some kind zoom also applied to keep the video aspect ratio. isn't?
    Quote Quote  
  7. Originally Posted by firekid View Post
    if we crop the black bar will we loss any of video part/portion?
    No.

    Originally Posted by firekid View Post
    my common sense saying if we crop, there may be some kind zoom also applied to keep the video aspect ratio. isn't?
    Not if you encode it correctly. If the final display aspect ratio doesn't match your monitor/TV the player will add back black bars to compensate.

    There is a case where you get more zoom. If you have a letterboxed DVD source and keep the black bars you will see both letterboxing and pillarboxing with a small picture in the middle of the screen. If you crop the black bars you will get a picture that fills the width of the screen, with the appropriate height to maintain the aspect ratio. Most people consider that a benefit though.
    Last edited by jagabo; 14th Mar 2022 at 07:23.
    Quote Quote  
  8. hello, this is a 16:9 video image which has black bar top and bottom. if i delete the black bar will not be the video aspect ratio lower than the original video file may be 16:8.9 or something? and after delete the blackbar if i watch the video in 16:9 ratio monitor will i not see the black bar again?



    https://forum.videohelp.com/images/imgfiles/Ym6PYbQ.png
    Quote Quote  
  9. The frame size will have a different aspect ratio but the picture content won't change. Ie, the frame size (1920x1080) is 16:9 but the video within that frame is really about 16:8 (1920x960).
    Quote Quote  
  10. Originally Posted by firekid View Post
    hello, this is a 16:9 video image which has black bar top and bottom. if i delete the black bar will not be the video aspect ratio lower than the original video file may be 16:8.9 or something? and after delete the blackbar if i watch the video in 16:9 ratio monitor will i not see the black bar again?
    https://forum.videohelp.com/images/imgfiles/Ym6PYbQ.png
    If you crop your video you get a new framesize of 1920x960 (with a display aspect ratio of 2:1).
    If you watch it on a 16:9 TV display your will see the black bars again.
    You can also crop to a real 16:9 framesize (in your case 1706x960), but you'll loose picture info at both sides
    Quote Quote  
  11. thank you for taking your time to explain. but sorry i am really noob


    1. the image example i gave, video is "1920×1080 (16:9)" and showing black bar top and bottom. so does it mean the black bar is attached with the video. i mean not like by default video player is showing blackbar to fill up the gap right? so the original video shoot has the black bar attached.


    2. if i remove the black bar, without black bar video resolution will be change like 1920x960 and aspect ratio 16:8. in that case if i play the video i will again see the black bar top and bottom because video player will auto fill up the gap with black bar right?


    if this is the case, why people would like to remove black bars?

    @ProWo sorry before i saw your msg, i posted my msg. so basically if i remove the black bar. 16:9 aspect ration display will not find any advantage. but other aspect ratio display may see the advantages right?
    Last edited by iKron; 18th Mar 2022 at 10:03.
    Quote Quote  
  12. Originally Posted by firekid View Post
    if i remove the black bar, without black bar video resolution will be change like 1920x960 and aspect ratio 16:8. in that case if i play the video i will again see the black bar top and bottom because video player will auto fill up the gap with black bar right?
    Yes

    Originally Posted by firekid View Post
    @ProWo sorry before i saw your msg, i posted my msg. so basically if i remove the black bar. 16:9 aspect ration display will not find any advantage. but other aspect ratio display may see the advantages right?
    Usually films are encoded with their real frame size; encoding with black bars above and below or right and left is only done if the playback devices (e.g.) old TVs can only play back certain standards like 16:9 or 4:3.
    Quote Quote  
  13. Originally Posted by firekid View Post
    1. the image example i gave, video is "1920×1080 (16:9)" and showing black bar top and bottom. so does it mean the black bar is attached with the video. i mean not like by default video player is showing blackbar to fill up the gap right? so the original video shoot has the black bar attached.
    I haven't seen your actual video, and I don't know exactly how you produced the image, so I can't say for sure. But since the subs appear partly within the black bar (the descender on the letter g) I would guess the source includes the black bars.

    Originally Posted by firekid View Post
    2. if i remove the black bar, without black bar video resolution will be change like 1920x960 and aspect ratio 16:8. in that case if i play the video i will again see the black bar top and bottom because video player will auto fill up the gap with black bar right?
    If you play in a window, no. If you play full screen, yes.

    Originally Posted by firekid View Post
    if this is the case, why people would like to remove black bars?
    I already gave one example in post #7. A widescreen movie letterboxed in a 4:3 frame (sometimes seen with DVD rips). You may have a 640x272 image letterboxed in a 640x480 frame.

    Image
    [Attachment 63875 - Click to enlarge]


    I used medium grey instead of black so you can easily differentiate the borders of the original video from the borders added by the player. If you play that in a window you will see the letterbox bars -- exactly as in the above image. If you play it full screen on a 1920x1080 display you will get:

    Image
    [Attachment 63876 - Click to enlarge]


    You have a little picture with letterbox and pillarbox bars. The player doesn't know you don't need to see the bars at the top and bottom. So it enlarges the 640x480 frame to 1440x1080 then adds 240 column pillarbox bars at the left and right.

    If you had cropped away the borders before encoding at 640x276 you would get this on a 1920x1080 display with full screen playback:

    Image
    [Attachment 63877 - Click to enlarge]


    Now you only have letterbox bars top and bottom, with a big picture that fill the frame left to right.
    Last edited by jagabo; 19th Mar 2022 at 10:27.
    Quote Quote  
  14. you made pictorial example so that i can understand it better...thank you so much for the explanation....much appreciated!
    Quote Quote  
  15. Basically, cropping away black borders gives you the best full screen fit for any monitor/TV aspect ratio.
    Quote Quote  
  16. thank you for the suggestion, now i want to remove black border for all video.

    handbrak has auto crop feature. is there any ffmpeg command which can auto crop the black bar? i don't like handbrak, because i found their app add unwanted filter automatic. sorry i am not sure if i should open a new thread about.
    Quote Quote  
  17. I'm a Super Moderator johns0's Avatar
    Join Date
    Jun 2002
    Location
    canada
    Search Comp PM
    The only downside to cropping out black bars is if you like soft subs and your player doesn't have the option to move them then they sit up higher on the screen,i use vlc on my xbox one and it doesn't have this option.
    I think,therefore i am a hamster.
    Quote Quote  
  18. @echo off
    set ffmpeg64="C:\Progra~1\converti_bat\ffmpegN1025.exe "
    set sett=-c:v libx264 -crf 23 -c:a aac -b:a 160k
    rem set sett=-c:v libx265 -crf 25 -c:a aac -b:a 160k
    %ffmpeg64% -ss 9 -i "%~1" -vframes 10 -vf cropdetect -f null -
    %ffmpeg64% -ss 9 -i "%~1" -vframes 10 -vf cropdetect -f null - 2>"%temp%\null.txt"
    findstr /ic:Parsed_cropdetect "%temp%\null.txt">"%temp%\nu.txt"
    for /f "usebackq tokens=*" %%A in ("%temp%\nu.txt") do (
    for /f "tokens=1-2 delims==" %%a in ("%%~A") do (
    set "cr=%%b"
    ))
    del "%temp%\nu.txt"
    del "%temp%\null.txt"
    set cro=-vf crop=%cr%
    choice /C "sn" /t 15 /D "n" /M "setting manuale ?"
    SET ort=%ERRORLEVEL%
    if "%ort%" equ "1" set /p "cr=crop=w:h:y:"
    if "%ort%" equ "1" set cro=-vf crop=%cr%
    IF "%ort%" EQU "2" echo no
    if "%ort%" equ "2" goto fin
    :fin
    %ffmpeg64% -i "%~1" %cro% -y %sett% "%~n1_.mp4"
    exit
    Quote Quote  
  19. Capturing Memories dellsam34's Avatar
    Join Date
    Jan 2016
    Location
    Member Since 2005, Re-joined in 2016
    Search PM
    @OP: It will be foolish to remove black bars on top and bottom only, without cropping the sides as well, because the aspect ratio will be screwed. they are put there for a reason, the original content is not 16:9 and the only way to display it correctly in square pixel is to add those black bars on top and bottom.

    The only way of getting rid of those black bars is to crop the entire frame all around loosing some active contents on the sides (as shown in yellow in the attached picture) and then resize back to 1920x1080 loosing some picture details in a form of softness or blurriness.

    Trust me just leave it alone, Some producers are not that dumb otherwise they could have done that already to the movie like some other producers did with a lot of Blu-ray titles pleasing some crowd and pissing off a lot of videophiles.

    Image
    [Attachment 64142 - Click to enlarge]
    Quote Quote  
  20. Originally Posted by dellsam34 View Post
    @OP: It will be foolish to remove black bars on top and bottom only, without cropping the sides as well, because the aspect ratio will be screwed. they are put there for a reason, the original content is not 16:9 and the only way to display it correctly in square pixel is to add those black bars on top and bottom.
    There's nothing wrong with removing the black bars before encoding. You are assuming the content will always be viewed on a 16:9 display. Other aspect ratios are becoming more common (computer monitors, smartphones, tablets, etc.). Most players are smart enough to add black bars as necessary no matter what the aspect ratio of the display is. The only time you want to keep the black bars is when your using a medium that requires fixed frame sizes -- like DVD and Blu-ray. And the aforementioned subtitle issue.
    Quote Quote  
  21. Capturing Memories dellsam34's Avatar
    Join Date
    Jan 2016
    Location
    Member Since 2005, Re-joined in 2016
    Search PM
    You've been against aspect ratio flags in the past due to device compatibility issues, what makes you change your mind?
    Quote Quote  
  22. I'm not against aspect ratio flags -- I use them anytime I encode DVDs. I just warn people that some players will not respect them.

    Cropping black borders has nothing to do with aspect ratio flags.
    Quote Quote  
  23. Capturing Memories dellsam34's Avatar
    Join Date
    Jan 2016
    Location
    Member Since 2005, Re-joined in 2016
    Search PM
    How do you tell the device to display a cropped video in a weird resolution?
    Quote Quote  
  24. Crop requires a reencode. It can be done in virtualdub
    Quote Quote  
  25. You can also use avisynth (tho i think it is a bit overkill) and also video editors that support custom resolution sequences.

    When using virtualdub be sure both the top and the bottom are same amount of pixels and that the output resolution is dividable by 2 (or 4)
    Quote Quote  
  26. Originally Posted by iKron View Post
    if this is the case, why people would like to remove black bars?
    Any extra information takes extra space, even if this something simple as black bars (although if there is no noise, and they are indeed completely black, the overhead should be minimal). Broadcast / DVD / BD have a finite number of fixed formats. For example, broadcast HD and BD HD is 16:9 according to their respective specs. So, when something like The Wizard of Oz, which has AR 1.37, is released on BD, it is pillarboxed to complete 16:9 frame.

    When you watch a movie on a computer in a window, or when you watch it on a YouTube page in non-fullscreen mode, the video takes as much as it needs. You probably have seen ultra-wide YouTube videos that do not have black bars on top and bottom when you view them in-page; they used to have black bars before, but then YouTube figured it did not need to squeeze all videos into 16:9 or 4:3 frame.

    So, cropping black bars for viewing online in-page makes sense. Cropping them for watching on a TV or even online in fullscreen mode - not so much if you watch on a "standard" screen, which for the last 20 years have been 16:9, but this is changing.

    What does make sense is so-called anamorphic mode, which is nothing else but a different AR mode. For example, you can letterbox a FullHD movie with DAR 2.2 into a 16:9 frame using black bars on the top and on the bottom, then you would lose about 207 pixels of vertical resolution - what a waste! This is, AFAIK, how BDs are encoded, although I am not 100% sure, maybe someone can correct me on that.

    But you can encode the same movie into full 1920x1080 frame with 2376/1920 = 1.2375 = 99/80 ≈ 5/4 PAR. You won't have any benefit of that if you watch the movie on a 16:9 TV set, but if you watch it on a 2.2 TV set, then it will be able to utilize all the pixels, and you'll see better picture. The same approach is used on "anamorphic" DVDs - widescreen image is "squeezed" into 720 horizontal pixels; when you watch on a 4:3 TV set, the player (or the TV) letterboxes it into 4:3 frame, but when you watch it on a widescreen TV, you get the full unsqueezed frame.

    Originally Posted by dellsam34 View Post
    How do you tell the device to display a cropped video in a weird resolution?
    SAR × PAR = DAR. If you know two of these, you can correctly display the image. My limited knowledge of DVD and BD formats tells me that there are more limitations to them, but computer-based players and YouTube are much more flexible.
    Quote Quote  
  27. Capturing Memories dellsam34's Avatar
    Join Date
    Jan 2016
    Location
    Member Since 2005, Re-joined in 2016
    Search PM
    Originally Posted by ConsumerDV View Post
    SAR × PAR = DAR. If you know two of these, you can correctly display the image. My limited knowledge of DVD and BD formats tells me that there are more limitations to them, but computer-based players and YouTube are much more flexible.
    It's like I don't know that.
    Quote Quote  
  28. Originally Posted by dellsam34 View Post
    Originally Posted by ConsumerDV View Post
    SAR × PAR = DAR. If you know two of these, you can correctly display the image. My limited knowledge of DVD and BD formats tells me that there are more limitations to them, but computer-based players and YouTube are much more flexible.
    It's like I don't know that.
    In this case you probably also know that this information can be stored in a file, both in the header as well as in the stream. If the stars align, a player can read the metadata and correctly display the image. If you had something different in mind when you asked, "how do you tell the device to display a cropped video in a weird resolution?" then maybe you could rephrase it.
    Quote Quote  
  29. Capturing Memories dellsam34's Avatar
    Join Date
    Jan 2016
    Location
    Member Since 2005, Re-joined in 2016
    Search PM
    I was responding to Jagabo in a context.
    Quote Quote  
  30. Originally Posted by dellsam34 View Post
    I was responding to Jagabo in a context.
    Originally Posted by dellsam34 View Post
    How do you tell the device to display a cropped video in a weird resolution?
    I didn't (and still don't) understand the question.

    The player resizes the video to fit the screen width or height, then adds black borders to fill the rest of the frame.
    Quote Quote  



Similar Threads

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