Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
e7a0b2e0
Commit
e7a0b2e0
authored
Dec 11, 2012
by
Stefano Sabatini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
doc/filters: itemize select/aselect examples
Improve rendering.
parent
c51f090f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
12 deletions
+38
-12
filters.texi
doc/filters.texi
+38
-12
No files found.
doc/filters.texi
View file @
e7a0b2e0
...
@@ -4728,45 +4728,71 @@ value means the current frame is more likely to be one (see the example below)
...
@@ -4728,45 +4728,71 @@ value means the current frame is more likely to be one (see the example below)
The default value of the select expression is "1".
The default value of the select expression is "1".
Some examples follow:
@subsection Examples
@itemize
@item
Select all frames in input:
@example
@example
# select all frames in input
select
select
@end example
# the above is the same as:
The example above is the same as:
@example
select=1
select=1
@end example
# skip all frames:
@item
Skip all frames:
@example
select=0
select=0
@end example
# select only I-frames
@item
Select only I-frames:
@example
select='eq(pict_type\,I)'
select='eq(pict_type\,I)'
@end example
# select one frame every 100
@item
Select one frame every 100:
@example
select='not(mod(n\,100))'
select='not(mod(n\,100))'
@end example
# select only frames contained in the 10-20 time interval
@item
Select only frames contained in the 10-20 time interval:
@example
select='gte(t\,10)*lte(t\,20)'
select='gte(t\,10)*lte(t\,20)'
@end example
# select only I frames contained in the 10-20 time interval
@item
Select only I frames contained in the 10-20 time interval:
@example
select='gte(t\,10)*lte(t\,20)*eq(pict_type\,I)'
select='gte(t\,10)*lte(t\,20)*eq(pict_type\,I)'
@end example
# select frames with a minimum distance of 10 seconds
@item
Select frames with a minimum distance of 10 seconds:
@example
select='isnan(prev_selected_t)+gte(t-prev_selected_t\,10)'
select='isnan(prev_selected_t)+gte(t-prev_selected_t\,10)'
@end example
# use aselect to select only audio frames with samples number > 100
@item
Use aselect to select only audio frames with samples number > 100:
@example
aselect='gt(samples_n\,100)'
aselect='gt(samples_n\,100)'
@end example
@end example
Complete example to create a mosaic of the first scenes:
@item
Create a mosaic of the first scenes:
@example
@example
ffmpeg -i video.avi -vf select='gt(scene\,0.4)',scale=160:120,tile -frames:v 1 preview.png
ffmpeg -i video.avi -vf select='gt(scene\,0.4)',scale=160:120,tile -frames:v 1 preview.png
@end example
@end example
Comparing @var{scene} against a value between 0.3 and 0.5 is generally a sane
Comparing @var{scene} against a value between 0.3 and 0.5 is generally a sane
choice.
choice.
@end itemize
@section asendcmd, sendcmd
@section asendcmd, sendcmd
...
...
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