Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
ffmpeg
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ffmpeg
Commits
4a32b30e
Commit
4a32b30e
authored
Aug 21, 2012
by
Stefano Sabatini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
doc/filters: itemize examples for pad filter, and fix a few typos
parent
bc151aee
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
39 additions
and
16 deletions
+39
-16
filters.texi
doc/filters.texi
+39
-16
No files found.
doc/filters.texi
View file @
4a32b30e
...
...
@@ -2795,36 +2795,59 @@ The default value of @var{color} is "black".
@end table
Some examples follow:
@section Examples
@itemize
@item
Add paddings with color "violet" to the input video. Output video
size is 640x480, the top-left corner of the input video is placed at
column 0, row 40:
@example
# Add paddings with color "violet" to the input video. Output video
# size is 640x480, the top-left corner of the input video is placed at
# column 0, row 40.
pad=640:480:0:40:violet
@end example
# pad the input to get an output with dimensions increased bt 3/2,
# and put the input video at the center of the padded area
@item
Pad the input to get an output with dimensions increased by 3/2,
and put the input video at the center of the padded area:
@example
pad="3/2*iw:3/2*ih:(ow-iw)/2:(oh-ih)/2"
@end example
# pad the input to get a squared output with size equal to the maximum
# value between the input width and height, and put the input video at
# the center of the padded area
@item
Pad the input to get a squared output with size equal to the maximum
value between the input width and height, and put the input video at
the center of the padded area:
@example
pad="max(iw\,ih):ow:(ow-iw)/2:(oh-ih)/2"
@end example
# pad the input to get a final w/h ratio of 16:9
@item
Pad the input to get a final w/h ratio of 16:9:
@example
pad="ih*16/9:ih:(ow-iw)/2:(oh-ih)/2"
@end example
@item
In case of anamorphic video, in order to set the output display aspect
correctly, it is necessary to use @var{sar} in the expression,
according to the relation:
@example
(ih * X / ih) * sar = output_dar
X = output_dar / sar
@end example
# for anamorphic video, in order to set the output display aspect ratio,
# it is necessary to use sar in the expression, according to the relation:
# (ih * X / ih) * sar = output_dar
# X = output_dar / sar
Thus the previous example needs to be modified to:
@example
pad="ih*16/9/sar:ih:(ow-iw)/2:(oh-ih)/2"
@end example
# double output size and put the input video in the bottom-right
# corner of the output padded area
@item
Double output size and put the input video in the bottom-right
corner of the output padded area:
@example
pad="2*iw:2*ih:ow-iw:oh-ih"
@end example
@end itemize
@section pixdesctest
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment