diff options
author | Paul B Mahol <onemda@gmail.com> | 2015-07-23 19:25:24 +0000 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2015-10-04 21:44:57 +0200 |
commit | 0c2b37fed43eb21df93251f1a79b195178ae3ded (patch) | |
tree | eb1225ef25706c5f080b7ebec05fa4ea929f1cc0 /doc | |
parent | b70566d6ca7b7ae60ec1db01b50d461672c8b03f (diff) | |
download | ffmpeg-0c2b37fed43eb21df93251f1a79b195178ae3ded.tar.gz |
avfilter: add displace video filter
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Diffstat (limited to 'doc')
-rw-r--r-- | doc/filters.texi | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/doc/filters.texi b/doc/filters.texi index 71f14567a1..47fd44d610 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -4750,6 +4750,58 @@ Flags to local 3x3 coordinates maps like this: 6 7 8 @end table +@section displace + +Displace pixels as indicated by second and third input stream. + +It takes three input streams and outputs one stream, the first input is the +source, and second and third input are displacement maps. + +The second input specifies how much to displace pixels along the +x-axis, while the third input specifies how much to displace pixels +along the y-axis. +If one of displacement map streams terminates, last frame from that +displacement map will be used. + +Note that once generated, displacements maps can be reused over and over again. + +A description of the accepted options follows. + +@table @option +@item edge +Set displace behavior for pixels that are out of range. + +Available values are: +@table @samp +@item blank +Missing pixels are replaced by black pixels. + +@item smear +Adjacent pixels will spread out to replace missing pixels. + +@item wrap +Out of range pixels are wrapped so they point to pixels of other side. +@end table +Default is @samp{smear}. + +@end table + +@subsection Examples + +@itemize +@item +Add ripple effect to rgb input of video size hd720: +@example +ffmpeg -i INPUT -f lavfi -i nullsrc=s=hd720,lutrgb=128:128:128 -f lavfi -i nullsrc=s=hd720,geq='r=128+30*sin(2*PI*X/400+T):g=128+30*sin(2*PI*X/400+T):b=128+30*sin(2*PI*X/400+T)' -lavfi '[0][1][2]displace' OUTPUT +@end example + +@item +Add wave effect to rgb input of video size hd720: +@example +ffmpeg -i INPUT -f lavfi -i nullsrc=hd720,geq='r=128+80*(sin(sqrt((X-W/2)*(X-W/2)+(Y-H/2)*(Y-H/2))/220*2*PI+T)):g=128+80*(sin(sqrt((X-W/2)*(X-W/2)+(Y-H/2)*(Y-H/2))/220*2*PI+T)):b=128+80*(sin(sqrt((X-W/2)*(X-W/2)+(Y-H/2)*(Y-H/2))/220*2*PI+T))' -lavfi '[1]split[x][y],[0][x][y]displace' OUTPUT +@end example +@end itemize + @section drawbox Draw a colored box on the input image. |