...占位
# 制作视频指定r80,否则截屏不会成功
ffmpeg -loop 1 -i img/1.png -c:v libx264 -t 30 -r 80 out.mp4
1 #!/bin/bash 2 LOC_PIC=/tmp/huzh.png 3 CWD=$(cd "$(dirname $0)";pwd) 4 cd $CWD 5 source ./output.sh 6 7 rm -rf $LOC_PIC 8 9 ffplay -vf subtitles=out.srt out.mp4 >/dev/null 2>&1 & 10 pid_ffplay=$(pidof ffplay) 11 sleep 2 12 winid=$(xdotool search --pid $pid_ffplay) 13 import -window $winid $LOC_PIC 14 sleep 1 15 pkill ffplay 16 17 tesseract $LOC_PIC a -l chi_sim >/dev/null 2>&1 18 Res=$(sed -n '1p' a.txt) 19 echores -f "视频功能" -n "本地字幕加载支持功能" 20 if [ $Res == "前进" ] 21 then 22 echores -r "正常" -o 23 else 24 echores -r "失败" -o 25 fi 26 27 rm -rf $LOC_PIC a.txt
out.srt
0 00:00:00,770 --> 00:00:100,880 <font size="100p" color="black"><b>前进</b></font>
图片
制作视频
做mpeg1,制作过程可以看到mpeg1打印
ffmpeg -i out.avs -codec:v mpeg2video -qscale:v 1 -codec:a mp1 -b:a 192k outputmpeg1.mpg