Difference between revisions of "VLC HowTo/Crop"

From VideoLAN Wiki
Jump to navigation Jump to search
m (DoesItReallyMatter moved page Crop to VLC HowTo/Crop: Renaming how-to articles per Talk:VLC HowTo (permalink))
Line 11: Line 11:
  
 
== How to do it from command-line/terminal/shell ==
 
== How to do it from command-line/terminal/shell ==
 +
vlc input --video-filter=croppadd --croppadd-croptop=100
 +
 +
=== Old way ===
 
If you want to crop local video with command-line/terminal parameters, use
 
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
Line 18: Line 21:
 
  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)
 
With VLC 2.0.0 and newer croppadd might work better
 
vlc input --video-filter=croppadd --croppadd-croptop=100
 
  
 
{{DEFAULTSORT:Crop}}
 
{{DEFAULTSORT:Crop}}

Revision as of 07:24, 4 April 2019

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.

or

Tools -> Effects and Filters (Ctrl+E) then Video Effects -> Crop, and set the values.

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

vlc input --video-filter=croppadd --croppadd-croptop=100

Old way

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)