ffmpeg -re -i input-1.jpg -re -i input-2.jpg -re -i input-3.jpg -re -i input-4.jpg\ -filter_complex “nullsrc=size=660×500 [base];\ [0:v] setpts=PTS-STARTPTS,scale=320×240 [upperleft]; \ [1:v] setpts=PTS-STARTPTS,scale=320×240 [upperright]; \ [2:v] setpts=PTS-STARTPTS,scale=320×240 [lowerleft];\ [3:v] setpts=PTS-STARTPTS,scale=320×240 [lowerright]; \ [base][upperleft] overlay=shortest=1[tmp1];\ [tmp1][upperright] overlay=shortest=1:x=325 [tmp2]; \ [tmp2][lowerleft]overlay=shortest=1:y=245 [tmp3];\ [tmp3][lowerright] overlay=shortest=1:x=325:y=245” \ -c:v libx264 -t 00:00:30 -f mp4 input-0-4.mp4 -y
Author: linux
ffmpeg-pcm
ffmpeg -i test.mp4 -vn -f f32le -acodec pcm_f32le ff_capture.pcm [root@iZ8vb59gsqaa2gjbi6n8g6Z chapter05]# ffmpeg -encoders | grep pcm ffmpeg version 7.0.2 Copyright (c) 2000-2024 the FFmpeg developers built with gcc 10 (GCC)
ffmpeg-pad
ffmpeg -i 2.jpg -vf pad=500:500:40:40:violet pad1.jpg ffmpeg -i 2.jpg -vf pad=width=500:height=500:x=40:y=40:\ color=violet pad2.jpg ffmpeg -i test.mp4 -vf pad=width=iw+80:height=ih+60:\ x=40:y=30:color=blue output_pad.mp4 ffmpeg -i wubi.mp4 -vf “pad=500:500:200:50:color=#FFFF00” \ -f mp4 wubi_pad.mp4 -y 参数解释: pad=500:500:200:50 //宽500,高500,x坐标200,y坐标50 color=#FFFFF00 //颜色#FFFF00 pad作用:扩大视频宽度、高度,以及多余区域视频的颜色。
ffmpeg_overlay
ffmpeg -h filter=overlay —————— Filter overlay Overlay a video source on top of the input. slice threading supported Inputs: #0: main (video) #1: overlay (video) Outputs: #0: default (video) overlay AVOptions: x <string> ..FV……. set the x expression (default “0”) y <string> ..FV……. set the y expression (default “0”) eof_action <int> ..FV……. Action to take… Continue reading ffmpeg_overlay
ffmpeg-negate
ffmpeg -h filter=negate …………………. Filter negate Negate input video. slice threading supported Inputs: #0: default (video) Outputs: #0: default (video) negate AVOptions: negate_alpha <boolean> ..FV…..T. (default false) This filter has support for timeline through the ‘enable’ option. ffplay -i test.mp4 -vf negate=negate_alpha=true ffplay -i test.mp4 -vf negate=negate_alpha=false