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

#更换新显示器时,获取屏幕尺寸 #xrandr #根据显示器的尺寸截取全屏 #ffmpeg -f x11grab -video_size 1910:1070 -i :0.0+10,10 -frames:v 10 -f image2 capture_%d.jpg -y && #ffmpeg -f x11grab -video_size 1910:1070 -i :0.0+10,10 -t 5 -r 0.5 -f image2 capture_%d.jpg -y && #英语网课图片 #ffmpeg -f x11grab -video_size 1910:1070 -i :0.0+10,10 -frames:v 1 -strftime 1 -f image2 english-nanjie/$(date +%Y%m%d)_english_$(date +%H%M%S).jpg -y && #上传网站图片 ffmpeg -f… Continue reading ffmpeg_screen

Published
Categorized as ffmpeg

ffmpeg_scale

指定长宽: ffmpeg -i input.jpg -vf scale=320:240 -strftime -f image2 %Y%m%d_output_%H%M%S.png 指定长,高度按比例缩放: ffmpeg -i input.jpg -vf scale=320:-1 -strftime -f image2 %Y%m%d_output_%H%M%S.png 缩放为之前的两倍: ffmpeg -i input.jpg -vf scale=iw*2:ih -strftime -f image2 %Y%m%d_output_%H%M%S.png 缩放为之前的二分之一: ffmpeg -i input.jpg -vf scale=iw*.5:ih*.5 -strftime -f image2 %Y%m%d_output_%H%M%S.png ffmpeg -i input.jpg -vf scale=iw/2:ih/2 -strftime -f image2 %Y%m%d_output_%H%M%S.png 缩放为之前的三分之一: ffmpeg -i test.mp4 -vf scale=iw/3:ih/3… Continue reading ffmpeg_scale

Published
Categorized as ffmpeg

ffmpeg_rotate

ffmpeg -f lavfi -i color=#FFFFFF:size=400×150\ -frames:v 1 -vf “drawtext=fontfile=\ /usr/share/fonts/msyh.ttf:fontcolor=ff0000:\ fontsize=45:x=100:y=50:text=’I enjoy you.'”\ -f image2 /home/root135/Documents/I_enjoy_you.jpg -y ffmpeg -i I_enjoy_you.jpg\ -vf “drawtext=fontfile=/usr/share/fonts/msyh.ttf:\ text=’Your Text Here’:fontsize=24:fontcolor=black:\ x=100:y=100,rotate=PI/4” I_enjoy_you_out.jpg -y

Published
Categorized as ffmpeg

ffmpeg-rgba

ffmpeg test.mp4 format=pix_fmts=rgba,colorchannelmixer=rr=0.3:rg=0.4:rb=0.3:gr=0.3:gg=0.4:gb=0.3:br=0.3:bg=0.4:bb=0.3 output_fade.mp4 ffmpeg test.mp4 format=pix_fmts=rgba,colorchannelmixer=rr=0.393:rg=0.796:rb=0.189:gr=0.349:gg=0.686:gb=0.168:br=0.272:bg=0.534:bb=0.131 output_fade.mp4 ffmpeg test.mp4 -vf eq=brightness=0.1:contrast=1.0:gamma=1.0:saturation=1.0 ff_eq.mp4 ffmpeg test.mp4 -vf eq=brightness=-0.1:contrast=1.0:gamma=1.0:saturation=1.0 ff_eq.mp4 ffmpeg test.mp4 -vf vignette=angle=PI/4 output_fade.mp4 ffmpeg test.mp4 -vf vignette=angle=PI/2 output_fade.mp4 ffmpeg test.mp4 -vf fade=type=in:start_time=0:duration=2 output_fade.mp4 ffmpeg test.mp4 -vf fade=type=out:start_frame=TOTAL_FRAMES-25:nb_frames=25 output_fade.mp4 ffmpeg test.mp4 -vf fade=type=out:start_time=START_TIME:duration=2 2 output_fade.mp4

Published
Categorized as ffmpeg