添加字幕:
ffplay -vf drawtext="fontfile=arial.ttf: text='Test Text': x=100: y=300: \
 fontsize=48: fontcolor=red: box=1: boxcolor=white" /d/ts/music.ts
把x=100 改成 x=50*t 可以使文本向右滚动。

./ffplay -vf drawtext="fontfile=/usr/share/fonts/truetype/freefont/FreeSerif.ttf: text='Test Text': x=100: y=50: fontsize=24: fontcolor=yellow@0.2: box=1: boxcolor=red@0.2" h.mp4

黑白漫画风格显示:
ffplay -vf edgedetect=low=0.1:high=0.4 /d/ts/music.ts

./ffplay -vf edgedetect=low=0.1:high=0.4 h.mp4

对比正常视频和deshake 过的视频:
-vf 'split[a][b]; [a]pad=iw*2:ih[src]; [b]deshake[filt]; [src][filt]overlay=w'

堆叠视频/马赛克:
ffplay /d/ts/music.ts -vf 'scale=128:72,tile=4x4'
ffplay /d/ts/mis.ts -vf select='gt(scene\,0.4)',scale=160:120,tile

快进:
ffplay /d/ts/mis.ts -vf setpts=0.5*PTS

Audio Source:
 生成440Hz正弦信号,设置采样率为8000Hz:
 ffplay -nostats -f lavfi aevalsrc="sin(440*2*PI*t)::s=8000"

Video Source:
 元包自动机:
 ffplay -nostats -f lavfi cellauto
 类似地,还有分形图案mandelbrot, 模拟life, 测试testsrc

todo:
how to use "nullsrc" <--the input content is to be ignored. for analysis/debugging?
synthesize a voice utterance using libflite

[0]=>Parsed_setpts_0

[1]=>ffplay_buffersink

[2]=>ffplay_crop

[3]=>ffplay_buffer

(gdb) p *filter->graph->filters[0]->inputs[0]->srcpad
$266 = {name = 0x8ee5a3d "default", type = AVMEDIA_TYPE_VIDEO, min_perms = 0, rej_perms = 0, start_frame = 0, get_video_buffer = 0,
  get_audio_buffer = 0, end_frame = 0, draw_slice = 0, filter_frame = 0, poll_frame = 0x8078c28 <poll_frame>,
  request_frame = 0x8078ba5 <request_frame>, config_props = 0x8078b01 <config_props>, needs_fifo = 0, needs_writable = 0}
(gdb) p *filter->graph->filters[1]->inputs[0]->srcpad
$267 = {name = 0x8eeef6c "default", type = AVMEDIA_TYPE_VIDEO, min_perms = 0, rej_perms = 0, start_frame = 0, get_video_buffer = 0,
  get_audio_buffer = 0, end_frame = 0, draw_slice = 0, filter_frame = 0, poll_frame = 0, request_frame = 0,
  config_props = 0x808fc6e <config_output>, needs_fifo = 0, needs_writable = 0}
(gdb) p *filter->graph->filters[2]->inputs[0]->srcpad
$268 = {name = 0x8ee8ccc "default", type = AVMEDIA_TYPE_VIDEO, min_perms = 0, rej_perms = 0, start_frame = 0, get_video_buffer = 0,
  get_audio_buffer = 0, end_frame = 0, draw_slice = 0, filter_frame = 0, poll_frame = 0, request_frame = 0, config_props = 0,
  needs_fifo = 0, needs_writable = 0}

(gdb) p *filter->graph->filters[0]->inputs[0]->dstpad
$270 = {name = 0x8ee8ccc "default", type = AVMEDIA_TYPE_VIDEO, min_perms = 0, rej_perms = 0, start_frame = 0, get_video_buffer = 0,
  get_audio_buffer = 0, end_frame = 0, draw_slice = 0, filter_frame = 0x8083a6b <filter_frame>, poll_frame = 0, request_frame = 0,
  config_props = 0x80838c9 <config_input>, needs_fifo = 0, needs_writable = 0}
(gdb) p *filter->graph->filters[1]->inputs[0]->dstpad
$271 = {name = 0x8ee4fec "default", type = AVMEDIA_TYPE_VIDEO, min_perms = 0, rej_perms = 0, start_frame = 0, get_video_buffer = 0,
  get_audio_buffer = 0, end_frame = 0, draw_slice = 0, filter_frame = 0x80768fe <filter_frame>, poll_frame = 0, request_frame = 0,
  config_props = 0, needs_fifo = 0, needs_writable = 0}
(gdb) p *filter->graph->filters[2]->inputs[0]->dstpad
$272 = {name = 0x8eeef6c "default", type = AVMEDIA_TYPE_VIDEO, min_perms = 0, rej_perms = 0, start_frame = 0, get_video_buffer = 0,
  get_audio_buffer = 0, end_frame = 0, draw_slice = 0, filter_frame = 0x808fcb0 <filter_frame>, poll_frame = 0, request_frame = 0,
  config_props = 0x808f4c2 <config_input>, needs_fifo = 0, needs_writable = 0}

(gdb) p *filter->graph->filters[3]->inputs
Cannot access memory at address 0x0

(gdb) p *filter->graph->filters[0]->outputs[0]->srcpad
$275 = {name = 0x8ee8ccc "default", type = AVMEDIA_TYPE_VIDEO, min_perms = 0, rej_perms = 0, start_frame = 0, get_video_buffer = 0,
  get_audio_buffer = 0, end_frame = 0, draw_slice = 0, filter_frame = 0, poll_frame = 0, request_frame = 0, config_props = 0,
  needs_fifo = 0, needs_writable = 0}

(gdb) p *filter->graph->filters[1]->outputs[0]->srcpad
Cannot access memory at address 0x0
(gdb) p *filter->graph->filters[2]->outputs[0]->srcpad
$276 = {name = 0x8eeef6c "default", type = AVMEDIA_TYPE_VIDEO, min_perms = 0, rej_perms = 0, start_frame = 0, get_video_buffer = 0,
  get_audio_buffer = 0, end_frame = 0, draw_slice = 0, filter_frame = 0, poll_frame = 0, request_frame = 0,
  config_props = 0x808fc6e <config_output>, needs_fifo = 0, needs_writable = 0}
(gdb) p *filter->graph->filters[3]->outputs[0]->srcpad
$277 = {name = 0x8ee5a3d "default", type = AVMEDIA_TYPE_VIDEO, min_perms = 0, rej_perms = 0, start_frame = 0, get_video_buffer = 0,
  get_audio_buffer = 0, end_frame = 0, draw_slice = 0, filter_frame = 0, poll_frame = 0x8078c28 <poll_frame>,
  request_frame = 0x8078ba5 <request_frame>, config_props = 0x8078b01 <config_props>, needs_fifo = 0, needs_writable = 0}

(gdb) p *filter->graph->filters[0]->outputs[0]->dstpad
$278 = {name = 0x8eeef6c "default", type = AVMEDIA_TYPE_VIDEO, min_perms = 0, rej_perms = 0, start_frame = 0, get_video_buffer = 0,
  get_audio_buffer = 0, end_frame = 0, draw_slice = 0, filter_frame = 0x808fcb0 <filter_frame>, poll_frame = 0, request_frame = 0,
  config_props = 0x808f4c2 <config_input>, needs_fifo = 0, needs_writable = 0}
(gdb) p *filter->graph->filters[1]->outputs[0]->dstpad
Cannot access memory at address 0x0
(gdb) p *filter->graph->filters[2]->outputs[0]->dstpad
$279 = {name = 0x8ee4fec "default", type = AVMEDIA_TYPE_VIDEO, min_perms = 0, rej_perms = 0, start_frame = 0, get_video_buffer = 0,
  get_audio_buffer = 0, end_frame = 0, draw_slice = 0, filter_frame = 0x80768fe <filter_frame>, poll_frame = 0, request_frame = 0,
  config_props = 0, needs_fifo = 0, needs_writable = 0}
(gdb) p *filter->graph->filters[3]->outputs[0]->dstpad
$280 = {name = 0x8ee8ccc "default", type = AVMEDIA_TYPE_VIDEO, min_perms = 0, rej_perms = 0, start_frame = 0, get_video_buffer = 0,
  get_audio_buffer = 0, end_frame = 0, draw_slice = 0, filter_frame = 0x8083a6b <filter_frame>, poll_frame = 0, request_frame = 0,
  config_props = 0x80838c9 <config_input>, needs_fifo = 0, needs_writable = 0}

#0  ff_filter_frame (link=0xad333a20, frame=0xad334020) at libavfilter/avfilter.c:1163
#1  0x08090098 in filter_frame (link=0xad333f60, frame=0xad334020) at libavfilter/vf_crop.c:297
#2  0x080729c1 in ff_filter_frame_framed (link=0xad333f60, frame=0xad334020) at libavfilter/avfilter.c:1081
#3  0x08072d35 in ff_filter_frame (link=0xad333f60, frame=0xad334020) at libavfilter/avfilter.c:1161
#4  0x08084382 in filter_frame (inlink=0xad333940, frame=0xad334020) at libavfilter/setpts.c:210
#5  0x080729c1 in ff_filter_frame_framed (link=0xad333940, frame=0xad334020) at libavfilter/avfilter.c:1081
#6  0x08072d35 in ff_filter_frame (link=0xad333940, frame=0xad334020) at libavfilter/avfilter.c:1161
#7  0x08078c26 in request_frame (link=0xad333940) at libavfilter/buffersrc.c:500
#8  0x08070bcf in ff_request_frame (link=0xad333940) at libavfilter/avfilter.c:346
#9  0x08070bf4 in ff_request_frame (link=0xad333f60) at libavfilter/avfilter.c:348
#10 0x08070bf4 in ff_request_frame (link=0xad333a20) at libavfilter/avfilter.c:348
#11 0x08076a3b in av_buffersink_get_frame_flags (ctx=0xad3332a0, frame=0xad500480, flags=0) at libavfilter/buffersink.c:138

ffplay 中filter的使用的更多相关文章

  1. css中filter:alpha透明度使用

    css中filter:alpha透明度使用    使用filter可以设置透明度,filter:alpha在IE下是没有问题的,要支持firefox就需要使用-moz-opacity,下面有个不错的示 ...

  2. python中filter、map、reduce的区别

    python中有一些非常有趣的函数,今天也来总结一下,不过该类的网上资料也相当多,也没多少干货,只是习惯性将一些容易遗忘的功能进行整理. lambda 为关键字.filter,map,reduce为内 ...

  3. jquery中filter(fn)的使用研究

    jquery中filter(fn)给出的官方说明是: 筛选出与指定函数返回值匹配的元素集合 这个函数内部将对每个对象计算一次 (正如 '$.each'). 如果调用的函数返回false则这个元素被删除 ...

  4. 024——VUE中filter的使用

    <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title> ...

  5. python中filter函数

    python中filter()函数   filter()函数是 Python 内置的另一个有用的高阶函数,filter()函数接收一个函数 f 和一个list,这个函数 f 的作用是对每个元素进行判断 ...

  6. 了解IE中filter属性的应用!

    在设置不透明属性时,经常用opacity来增加层次感或者增加用户体验,但这个属性是css3属性,对于低级浏览器的兼容性来说就达不到预期的效果. 一般而言,我们都尽可能少用一些浏览私有属性-webkit ...

  7. Java中filter内处理重定向遇到的问题

    这是在Java中filter内处理重定向遇到的问题.本意是写一个做URL rewrite 的filter,来重写URL,同时在处理登陆过程中要杀掉当前session,创建新session来代替. 1. ...

  8. vuex中filter的使用 && 快速判断一个数是否在一个数组中

    vue中filter的使用 computed: mapState({ items: state => state.items.filter(function (value, index, arr ...

  9. python2和python3中filter函数

    在python2和python3中filter是不同的,其中在python2中filter返回的是一个list,可以直接使用 >>> a = [1,2,3,4,5,6,7] > ...

随机推荐

  1. 树莓派最简易Wifi配置

    树莓派最简易Wifi配置 相信我,连博客都会偷懒写个最简易给你看 前提,只有一根网线没有网络的前提下进行的. 基于Win10系统和树莓派2015-05-05-raspbian-wheezy.img测试 ...

  2. HTML5做的浏览器欢迎界面自动跳转

    HTML5做的浏览器欢迎界面自动跳转 思路很简单,随手装逼呗.根据时间来控制背景图和文字,背景图加了毛玻璃效果,效果直接看图,用javascript来实现. 完整代码 <!DOCTYPE htm ...

  3. 双系统下利用MbrFix.exe卸载LINUX系统

    前言:  不少同学笔记本都装的有双系统,一般都是LIUNX和WINDOWS的两个系统(由于以前对电脑各种无知)装了双系统,再次,小编就不在阐述双系统地各种不便,再次就强调一下,假若要卸载LINUX的话 ...

  4. "渴了么"用户场景分析

    典型用户 (1)名字:王美丽 (2)年龄:21 (3)收入:勤工助学和兼职等 (4)代表的用户在市场上的比例和重要性(比例大不等同于重要性高,如付费的用户比例较少,但是影响大,所以更重要). 作为大学 ...

  5. Why Every Professional Should Consider Blogging

    转自http://www.pixelstech.net/article/1327829407-Why-Every-Professional-Should-Consider-Blogging ften ...

  6. android开发 WriteUTF与readUTF 原理

    今晚上写代码玩,用到java.io.RandomAccessFile.writeUTF(String)函数,而文件默认保存为gbk,显然是乱码.突然想起来去看看存储编码规则,就去找了些文章了解writ ...

  7. SQL Server性能优化(1)使用SET函数

    在一切开始之前,先看下微软的建议:在系统的整体性能优化里面, TSQL优化优先级并不是最高的. 本文包括四部分: SET STATISTICS TIME ON SET STATISTICS IO SE ...

  8. switch语句的使用,非常好

    这是谭浩强课本上枚举类型的例子,但是我贴这个例子的代码不是因为枚举类型,是因为这个代码使用switch语句用得非常好,值得一贴. 题目是这样的:有红.黄.蓝.白.黑5中颜色的球若干,依次取出3个球,求 ...

  9. BZOJ 1087状态压缩DP

    状态压缩DP真心不会写,参考了别人的写法. 先预处理出合理状态, 我们用二进制表示可以放棋子的状态,DP[I][J][K]:表示现在处理到第I行,J:表示第I行的状态,K表示现在为止一共放的棋子数量. ...

  10. poj 1185

    上一题的升级版 dp[i][j][k] 表示第 i 行状态为 k 第i-1行状态为 j #include <cstdio> #include <cstdlib> #includ ...