ffmpeg – Page 5 – 业余语言练习

ffmpeg-subtitles

ffmpeg -i test.mp4 -vf “subtitles=../fuzhou.srt:force_style=’Fontname=KaiTi,Fontsize=36,Alignment=2,OutlineColour=&H003300FF,BackColour=&H0033FF00,BorderStyle=1,Outline=1,Shadow=1,Spacing=5,MarginL=15,MarginV=20′” ff_subtitles_srt.mp4 ffmpeg -i test.mp4 -vf subtitles=filename=../fuzhou.ass:charenc=utf-i ff_subtitles_ass.mp4

Published
Categorized as ffmpeg

ffmpeg-setpts-atempo

ffmpeg -i test.mp4 -filter_complex ‘[0:v]setpts=expr=0.5*PTS;[0:a]atempo=tempo=2’ ff_setpts_atempo.mp4

Published
Categorized as ffmpeg

ffmpeg-setpts

ffmpeg -i test.mp4 -vf trim=start=5.1:end=15.8,setpts=PTS-STARTPTS ff_trim.mp4

Published
Categorized as ffmpeg

ffmpeg-screen-record

#ffmpeg -f x11grab -framerate 30 -video_size 800×600 -i :0.0+400,100 -vf “setpts=(RTCTIME-RTCSTART)/(TB*1000000),drawtext=fontfile=/usr/share/fonts/msyh.ttf:fontcolor=#FF0000:fontsize=30:x=25:y=20:text=’mofayingyu'” -c:v libx264 -preset superfast -crf 18 -f mp4 output202508220554.mp4 -y &&

Published
Categorized as ffmpeg

ffmpeg-screen

#更换新显示器时,获取屏幕尺寸 #根据显示器的尺寸截取全屏 ffmpeg -f x11grab -video_size 1360:768 -i :0.0+0,0 -frames:v 1 -f image2 202505031611.jpg -y && #ffplay -window_title monitor -f x11grab -video_size 400:400 -i :0.0+0,0 -vf “drawbox=x=150:y=150:w=200:h=200:color=ff0000:t=3,scale=300×300” -left 760 -top 1 #查看全屏图片需要录制的桌面像素位置 #ffplay -i screen.jpg -vf ‘crop=1340:850:310:200’ #ffmpeg -i screen.jpg -vf ‘crop=1340:850:310:200’ #ffplay -window_title monitor -f x11grab -video_size 800:300 -i :0.0+200,400 -vf scale=300×300 -vf “drawbox=color=black”:t=1.5… Continue reading ffmpeg-screen

Published
Categorized as ffmpeg