我在Ubuntu 15.10(wily)上。我想爲第一個30秒添加一段文字到視頻中。我可以用下面的命令avconv - drawtext - 在給定時間段內應用過濾器
$ avconv -i input.MTS -metadata title="my video" -vf "drawtext=fontfile=/usr/share/fonts/truetype/ubuntu-font-family/Ubuntu-B.ttf:text='My Text':[email protected]:x=7:y=60:fontsize=36" -strict experimental out.mp4
添加視頻到視頻的整個長度ffmpeg
有一個選項drawtext=enable=between(t,0,30)
但avconv
這不是一個有效的選項。
$ avconv -i 00054.MTS -metadata title="my video" -vf "drawtext=enable='between(t,0,30)':fontfile=/usr/share/fonts/truetype/ubuntu-font-family/Ubuntu-B.ttf:text='My Text':[email protected]:x=7:y=60:fontsize=36" -strict experimental out.mp4
drawtext @ 0x18b8d20] No such option: enable.
[AVFilterGraph @ 0x18c3000] Error initializing filter 'drawtext' with args 'enable=between(t,0,30):fontfile=/usr/share/fonts/truetype/ubuntu-font-family/Ubuntu-B.ttf:text=My Text:[email protected]:x=7:y=60:fontsize=36'
隨着avconv
我怎麼可以添加一個文本到視頻給定的時間段?
$ avconv --version
avconv version 11.4-6:11.4-2ubuntu3, Copyright (c) 2000-2014 the Libav developers
built on Aug 11 2015 07:00:13 with gcc 5.2.1 (Ubuntu 5.2.1-15ubuntu1) 20150808