Monday, July 4, 2011

VLC - Automatic crop

Sometimes a widescreen DVD or other video has black bars on the top/bottom. The actual video image is 16:9, but it has been formatted at 4:3 putting black bars on the top and bottom. You end up watching a shrunk 16:9 video on the widescreen monitor. Annoying.

In previous versions of Ubuntu & VLC, I would manually go to Tools > Effects & Filters, Video Effects tab, Crop tab, and change the Top/Bottom values to crop the video. In all VLC versions I've used in Ubuntu 10.04, Top/Bottom crop don't work they way they used to, no cropping actually takes place, and the image stretches sideways. I haven't been able to figure it out. Right/Left crop both crop the right side.

After some looking through the settings, I found a setting for automatic cropping that works.
  1. Click Tools > Preferences 
  2. Under Show Settings (lower left) select All.
  3. In the left column, expand Video (click the + beside it)
  4. Select Filters (not expand). 
  5. In the right column under Video output filter module (second section) check the Crop video filter option. 
  6. Expand the the Filters section in the left column. (click the + beside it)
  7. Select Crop
  8. In the right column check Automatic cropping.
  9. I also like to change the Number of images for change setting. By default it is 25, which equals about 1 second. So if there is a change in the black border for 1 second, the screen will flicker and change. This makes some videos change much more frequently than is necessary, and the flicker can get annoying. I changed it to over 500 so it would take at least 20 seconds (25fps * 20sec = 500) of difference before changing the crop. 
  10. Click Save button. 
  11. Restart VLC.
Keep in mind that if you changed the Number of images for change setting to something higher, the crop won't take place right when you start playing the video. In my case I'll have to wait 20+ seconds for the crop to change.

5 comments:

  1. When I do this the vidoe output becomes black and I can only hear the sound. Any ideas?

    ReplyDelete
  2. I assume you were able to see the video before enabling auto crop.

    What did you set "Number of images for change" setting to?

    Did you change any other settings?

    ReplyDelete
  3. I have the same problem. Video is fine before I enable auto crop. When I turn auto crop on the ratio changes but the output is black.

    It doesn't make any difference what I set the "Number of images for change" setting to and I haven't changed any of the other settings.

    ReplyDelete
  4. Tools -> Preferences -> (Show All) -> Video
    Window Properties section at the bottom.
    Video cropping

    version 1.1.11 The Luggage

    ReplyDelete
  5. I really hope you read this one day, because you are truly beautiful!
    this has driven me crazy for years! -- No other posters understood my problem, presuming i had no idea what i was saying! thank you, thank you, thank you!!!

    until this, the best i had was to turn scaling off, then zoom to double.


    high five!
    -anew

    ReplyDelete