Difference between revisions of "VLC HowTo/Crop"

From VideoLAN Wiki
Jump to navigation Jump to search
Line 1: Line 1:
If you want to crop local video with command-line parameters, use
+
{{howto|Crop the video}}
 +
== What is cropping? ==
 +
Cropping refers to the removal of the outer parts of an image. So it remove something from left, right, top and/or bottom of image. Usually with videos cropping is used to change aspect ratio by cutting something out (known as Pan and scan method). 
 +
 
 +
== How to do it QT4 ==
 +
From QT4 GUI you can enable cropping from '''Tools -> Preferences...''' (Show settings: All) then '''Video''' and '''Video cropping''' field.
 +
 
 +
== How to do it from command-line/terminal/shell ==
 +
If you want to crop local video with command-line/terminal parameters, use
 
  vlc input --vout-filter=crop --crop-geometry=120x120+10+10
 
  vlc input --vout-filter=crop --crop-geometry=120x120+10+10
120x120 is the wanted resolution (in pixels), and 10+10 is the position where the cropping should start (in pixels)
+
120x120 is the wanted resolution (in pixels), and 10+10 is the top-left position where the cropping should start (in pixels)
  
 
or if you want certain aspect ratio
 
or if you want certain aspect ratio
 
  vlc input --vout-filter=crop --crop-ratio=1777
 
  vlc input --vout-filter=crop --crop-ratio=1777
 
where 1777 is aspect ratio you want (divide it with 1000 to get correct value, in this case 1,777 aka 16:9)
 
where 1777 is aspect ratio you want (divide it with 1000 to get correct value, in this case 1,777 aka 16:9)

Revision as of 12:14, 9 April 2010

This page describes how to crop the video. Other "how to" pages

What is cropping?

Cropping refers to the removal of the outer parts of an image. So it remove something from left, right, top and/or bottom of image. Usually with videos cropping is used to change aspect ratio by cutting something out (known as Pan and scan method).

How to do it QT4

From QT4 GUI you can enable cropping from Tools -> Preferences... (Show settings: All) then Video and Video cropping field.

How to do it from command-line/terminal/shell

If you want to crop local video with command-line/terminal parameters, use

vlc input --vout-filter=crop --crop-geometry=120x120+10+10

120x120 is the wanted resolution (in pixels), and 10+10 is the top-left position where the cropping should start (in pixels)

or if you want certain aspect ratio

vlc input --vout-filter=crop --crop-ratio=1777

where 1777 is aspect ratio you want (divide it with 1000 to get correct value, in this case 1,777 aka 16:9)