ffmpeg – Page 6 – 业余语言练习

ffmpeg-lavfi

#直接画圆角矩形画不出来,只能先画一个方形,然后在方形里面画置入一个圆角矩形。 #ffmpeg -f lavfi -i color=00ffff:size=620×480 -f lavfi -i color=ffffff:size=605×465 -frames:v 1 -filter_complex “[1]format=yuva420p,geq=lum=’p(X,Y)’:a=’if(gt(abs(W/2-X),W/2-15)*gt(abs(H/2-Y),H/2-15),if(lte(hypot(15-(W/2-abs(W/2-X)),15-(H/2-abs(H/2-Y))),15),255,0),255)'[rounded];[0][rounded]overlay=x=(W-w)/2:y=(H-h)/2” two-round.jpg #画一个圆 #ffmpeg -f lavfi -i color=00ffff:size=1000×600 -f lavfi -i color=f1f1f1:size=800×400 -frames:v 1 -filter_complex “[1]format=yuva420p,geq=lum=’p(X,Y)’:a=’if(gt(abs(W/2-X),W/2-500)*gt(abs(H/2-Y),H/2-500),if(lte(hypot(200-(W/2-abs(W/2-X)),200-(H/2-abs(H/2-Y))),200),255,0),255)'[rounded];[0][rounded]overlay=x=(W-w)/2:y=(H-h)/2” -f image2 input.jpg #画一个均匀的四角 #ffmpeg -f lavfi -i color=00ffff:size=400×400 -f lavfi -i color=ffffff:size=380×380 -frames:v 1 -filter_complex “[1]format=yuva420p,geq=lum=’p(X,Y)’:a=’if(gt(abs(W/2-X),W/2-100)*gt(abs(H/2-Y),H/2-100),if(lte(hypot(200-(W/2-abs(W/2-X)),200-(H/2-abs(H/2-Y))),200),255,0),255)'[rounded];[0][rounded]overlay=x=(W-w)/2:y=(H-h)/2” sround.jpg #画一个交叉的直角 #ffmpeg -f lavfi -i color=00ffff:size=400×400 -f lavfi… Continue reading ffmpeg-lavfi

Published
Categorized as ffmpeg

ffmpeg-jpg-text

#ffmpeg -f lavfi -i color=00ff00:size=620×480 -vf “drawtext=fontfile=/usr/share/fonts/hanchanzhengkaiti.ttf:fontcolor=000000:fontsize=20:shadowy=0:x=(w-tw)/2-2:y=(main_h-line_h-100):text=”综合素质考试”,drawtext=fontfile=/usr/share/fonts/hanchanzhengkaiti.ttf:fontcolor=000000:fontsize=20:shadowy=0:x=(w-tw)/2-6:y=(main_h-line_h-70):text=”教学知识能力”,drawtext=fontfile=/usr/share/fonts/hanchanzhengkaiti.ttf:fontcolor=000000:fontsize=20:shadowy=0:x=(w-tw)/2-10:y=(main_h-line_h-40):text=”英语学科知识与教学能力”,drawtext=fontfile=/usr/share/fonts/hanchanzhengkaiti.ttf:fontcolor=000000:fontsize=35:shadowy=0:x=(w-tw)/2-15:y=(main_h-line_h-10):text=’齐齐哈尔市一中’” bg1.png #ffmpeg -f lavfi -i color=ffffff:size=620×480 -vf “drawtext=fontfile=/usr/share/fonts/msyh.ttf:fontcolor=000000:fontsize=30:x=10:y=10:text=简述学习动机的激发”,”drawtext=fontfile=/usr/share/fonts/msyh.ttf:fontcolor=000000:fontsize=30:x=10:y=50:text=1.创设问题的情境,实施启发式教学”,”drawtext=fontfile=/usr/share/fonts/msyh.ttf:fontcolor=000000:fontsize=30:x=10:y=80:text=2.根据作业难度,恰当控制动机水平”,”drawtext=fontfile=/usr/share/fonts/msyh.ttf:fontcolor=000000:fontsize=30:x=10:y=110:text=3.充分利用反馈信息,妥善进行奖惩”,”drawtext=fontfile=/usr/share/fonts/msyh.ttf:fontcolor=000000:fontsize=30:x=10:y=140:text=4.正确指导结果归因,促使学生继续努力”,”drawtext=fontfile=/usr/share/fonts/msyh.ttf:fontcolor=000000:fontsize=30:x=10:y=170:text=5.设置合适目标,培养自我效能感”,”drawtext=fontfile=/usr/share/fonts/msyh.ttf:fontcolor=000000:fontsize=30:x=10:y=200:text=6.对学生进行合作和竞争教育,”,”drawtext=fontfile=/usr/share/fonts/msyh.ttf:fontcolor=000000:fontsize=30:x=40:y=230:text=开展合作与竞争学习” -f image2 简述学习动机的激发.jpg #ffmpeg -f lavfi -i color=ffffff:size=620×480 -frames:v 1 -vf “drawtext=fontfile=/usr/share/fonts/songhei.ttf:fontcolor=000000:fontsize=30:x=10:y=10:text=’weixin’”,”drawtext=fontfile=/usr/share/fonts/songhei.ttf:fontcolor=000000:fontsize=30:x=10:y=60:text=’username\:qqwmd1984′”,”drawtext=fontfile=/usr/share/fonts/msyh.ttf:fontcolor=00ff00:fontsize=30:x=10:y=110:text=’password\:qqwmd1984,.’” -f image2 weixin.jpg #ffmpeg -f lavfi -i color=ffffff:size=700×120 -frames:v 1 -vf “drawtext=fontfile=msyh.ttf:fontcolor=000000:fontsize=30:x=40:y=5:text=’ The results of the competition came out’,drawtext=fontfile=msyh.ttf:fontcolor=000000:fontsize=30:x=10:y=35:text=’earlier than the students expected.’,drawtext=fontfile=/usr/share/fonts/msyh.ttf:fontcolor=000000:fontsize=30:x=10:y=75:text=’比赛出来的结果比学生们预期的要早。’” -f image2 temp0.jpg #ffmpeg -f… Continue reading ffmpeg-jpg-text

Published
Categorized as ffmpeg

ffmpeg-jpg+png-mp4

#ffmpeg -i test1.jpg -loop 1 -vcodec h264 -pix_fmt yuv420p -r 25 -t 5 -f mp4 ff_image1.mp4 #ffmpeg -i test2.jpg -loop 1 -vcodec h264 -pix_fmt yuv420p -r 25 -t 5 -f mp4 ff_image2.mp4 #ffmpeg -f concat -i file -c copy ff_merge_image.mp4 #file #file ‘ff_image1.mp4’ #file ‘ff_image2.mp4′ #——————————————————- ffmpeg -loop 1 -i 16-9-1.jpg -vf “zoompan=z=’1′:x=’if(lte(on,1),(iw-iw/zoom)/2,x-2)’:y=’if(lte(on,1),(ih-ih/zoom),y-1.2)’:d=250” -c:v libx264… Continue reading ffmpeg-jpg+png-mp4

Published
Categorized as ffmpeg

ffmpeg-ico

ffmpeg -f lavfi -i color=ffffff:size=55×40 -frames:v 1 -vf “drawtext=fontfile=/usr/share/fonts/songhei.ttf:fontcolor=000000:fontsize=50:x=3:y=3:text=’三’:box=1:boxcolor=f0f0f0” test.ico -y

Published
Categorized as ffmpeg

ffmpeg -filters

ffmpeg -filters|grep draw* ffmpeg version 4.4.2-1 Copyright (c) 2000-2021 the FFmpeg developers built with gcc 8 (Uos 8.3.0.3-3+rebuild) configuration: –prefix=/usr –extra-version=1 –toolchain=hardened –libdir=/usr/lib/x86_64-linux-gnu –incdir=/usr/include/x86_64-linux-gnu –arch=amd64 –enable-gpl –disable-stripping –enable-gnutls –enable-ladspa –enable-libaom –enable-libass –enable-libbluray –enable-libbs2b –enable-libcaca –enable-libcdio –enable-libcodec2 –enable-libdav1d –enable-libflite –enable-libfontconfig –enable-libfreetype –enable-libfribidi –enable-libgme –enable-libgsm –enable-libjack –enable-libmp3lame –enable-libmysofa –enable-libopenjpeg –enable-libopenmpt –enable-libopus –enable-libpulse –enable-librabbitmq –enable-librubberband –enable-libshine –enable-libsnappy –enable-libsoxr… Continue reading ffmpeg -filters

Published
Categorized as ffmpeg