如何使用FFMpeg -timestamp语法 [英] How to use FFMpeg -timestamp syntax

查看:566
本文介绍了如何使用FFMpeg -timestamp语法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



全部!

  ffMpeg -timstamp 

选项工程喜欢上图像?
07:21:54 07/07/05黑盒容器中的白色文本。ubuntu 12.04
中的

键入了这样的输出。

  ffmpeg -y -f video4linux2 -s vga -r 30 -fs 1M -i / dev / video0 -timestamp now -copyts。 /USB1_Test_vga.mp4 

但不行。



是否有任何其他显示视频记录时间的选项?

解决方案

以前是一个drawtext过滤器。

  ffmpeg -i in.mp4 -vfdrawtext = fontfile = / usr / share / fonts / truetype / DroidSans.ttf: timecode = '09 \:57\:00\:00':r = 25:\ 
x =(w-tw)/ 2:y = h-(2 * lh):fontcolor = white :box = 1:boxcolor = 0x00000000 @ 1-an -y out.mp4

http://ffmpeg.org/trac/ffmpeg/wiki/FilteringGuide



我相信您可以用sprintf语法替换确切的时间码。

  ffmpeg -f video4linux2 -i / dev / video0 -s 640x480 -r 30 -vf \ 
drawtext = fontfile = / usr / share / fonts / truetype / ttf-dejavu / DejaVuSans-Bold.ttf:\
text ='\%T':fontcolor=white@0.8:x = 7:y = 460-vcodec libx264 -vb 2000k \
-preset ultrafast -f mp4 output.mp4

看到这里:
http://einar.slaskete.net/2011/09/05/adding-time-stamp-overlay-to-video-stream-using-ffmpeg/


Hi, All!

     ffMpeg -timstamp 

option works likes upper image? 07:21:54 07/07/05 white text in black box container.

in ubuntu 12.04 typed the excute like this.

     ffmpeg -y -f video4linux2 -s vga -r 30 -fs 1M -i /dev/video0 -timestamp now -copyts ./USB1_Test_vga.mp4

but it doesn't work.

is there any other option for display video recorded time?

解决方案

There used to be a drawtext filter.

ffmpeg -i in.mp4 -vf "drawtext=fontfile=/usr/share/fonts/truetype/DroidSans.ttf: timecode='09\:57\:00\:00': r=25: \
x=(w-tw)/2: y=h-(2*lh): fontcolor=white: box=1: boxcolor=0x00000000@1" -an -y out.mp4

See here: http://ffmpeg.org/trac/ffmpeg/wiki/FilteringGuide

I believe you can replace the exact time code with a sprintf like syntax.

ffmpeg -f video4linux2 -i /dev/video0 -s 640x480 -r 30 -vf \
"drawtext=fontfile=/usr/share/fonts/truetype/ttf-dejavu/DejaVuSans-Bold.ttf: \
text='\%T': fontcolor=white@0.8: x=7: y=460" -vcodec libx264 -vb 2000k \
-preset ultrafast -f mp4 output.mp4

See here: http://einar.slaskete.net/2011/09/05/adding-time-stamp-overlay-to-video-stream-using-ffmpeg/

这篇关于如何使用FFMpeg -timestamp语法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆