欧美精品乱码久久久久久,色狠狠久久AV五月综合伊人久久,亚洲v国产v天堂a无码久久,欧美日韩在线不卡一区二区

查看詳情

FFMPEG視頻剪輯常用命令合集

ffmpeg -loop 1 -t 5 -i "G:\035\1.jpg" -loop 1 -t 5 -i "G:\035\2.jpg" -loop 1 -t 5 -i "G:\035\3.jpg" -loop 1 -t 5 -i "G:\035\4.jpg" -loop 1 -t 5 -i "G:\035\0.jpg" -filter_complex "[0]scale=-2:720,pad=1280:720:(ow-iw)/2:(oh-ih)/2,setsar=1,fade=d=1:t=in:alpha=1,fade=t=out:st=4:d=1,setpts=PTS-STARTPTS+4/TB[f0];[1]scale=-2:720,pad=1280:720:(ow-iw)/2:(oh-ih)/2,setsar=1,fade=d=1:t=in:alpha=1,fade=t=out:st=4:d=1,setpts=PTS-STARTPTS+8/TB[f1];[2]scale=-2:720,pad=1280:720:(ow-iw)/2:(oh-ih)/2,setsar=1,fade=d=1:t=in:alpha=1,fade=t=out:st=4:d=1,setpts=PTS-STARTPTS+12/TB[f2];[3]scale=-2:720,pad=1280:720:(ow-iw)/2:(oh-ih)/2,setsar=1,fade=d=1:t=in:alpha=1,fade=t=out:st=4:d=1,setpts=PTS-STARTPTS+16/TB[f3];[4]scale=-2:720,pad=1280:720:(ow-iw)/2:(oh-ih)/2,setsar=1,fade=d=1:t=in:alpha=1,fade=t=out:st=4:d=1,setpts=PTS-STARTPTS+20/TB[f4];[f0][f1]overlay[bg1];[bg1][f2]overlay[bg2];[bg2][f3]overlay[bg3];[bg3][f4]overlay,format=yuv420p[v]" -map [v] -movflags +faststart -y G:\035\out.mp4




ffmpeg -r 1 -t 5 -loop 1 -i G:\035\0.jpg -t 1 -loop 1 -i G:\035\1.jpg -t 1 -loop 1 -i G:\035\2.jpg -t 1 -loop 1 -i G:\035\3.jpg -t 1 -loop 1 -i G:\035\4.jpg -filter_complex "[0:v]scale=w=720:h=1280" -y G:\035\out.mp4


ffmpeg -t 1 -loop 1 -i G:\035\0.jpg -t 1 -loop 1 -i G:\035\1.jpg -t 1 -loop 1 -i G:\035\2.jpg -t 1 -loop 1 -i G:\035\3.jpg -t 1 -loop 1 -i G:\035\4.jpg -y G:\035\out.mp4




ffmpeg -framerate 1 -i G:\035\%d.jpg -r 1 -pix_fmt yuv420p G:\035\output.mp4


ffmpeg -i G:\035\output.mp4 -filter_complex "[0:v]split=2[v1][v2];[v1]crop=iw/2:ih:0:0, pad=2*iw:ih[bg1];[v2]crop=iw/2:ih:ow:0, pad=2*iw:ih[bg2];[bg1][bg2]blend=all_expr='A*(if(gte(T,0.5),(1-(T-0.5)*2),1))+B*(if(gte(T,0.5),(T-0.5)*2,0))'[v]" -map "[v]" -c:a copy -movflags +faststart -shortest G:\035\output_transition.mp4




ffmpeg -r 1 -t 5 -loop 1 -i G:\035\0.jpg -t 1 -loop 1 -i G:\035\1.jpg -t 1 -loop 1 -i G:\035\2.jpg -t 1 -loop 1 -i G:\035\3.jpg -t 1 -loop 1 -i G:\035\4.jpg -filter_complex "[0:v]scale=w=720:h=1280" -y G:\035\out.mp4



ffmpeg \

-i video1.mp4 \

-i video2.mp4 \

-i video3.mp4 \



ffmpeg -r 1 -t 5 -loop 1 -i G:\035\0.jpg -t 1 -loop 1 -i G:\035\1.jpg -t 1 -loop 1 -i G:\035\2.jpg -t 1 -loop 1 -i G:\035\3.jpg -t 1 -loop 1 -i G:\035\4.jpg -filter_complex "[0:v]fade=t=in:st=0:d=1:alpha=1,fade=t=out:st=8:d=1:alpha=1[v1]; [1:v]fade=t=in:st=0:d=1:alpha=1,fade=t=out:st=8:d=1:alpha=1[v2]; [2:v]fade=t=in:st=0:d=1:alpha=1,fade=t=out:st=8:d=1:alpha=1[v3]; [v1][v2][v3]concat=n=3:v=1:a=0,fade=t=out:st=28:d=1:alpha=1[v]" -map "[v]" -c:v libx264 -crf 18 -preset veryfast -vf "pad=ceil(iw/2)*2:ceil(ih/2)*2" -y G:\035\final_video.mp4



ffmpeg -loop 1 -t 5 -i "G:\035\1.jpg" -loop 1 -t 5 -i "G:\035\2.jpg" -loop 1 -t 5 -i "G:\035\3.jpg" -loop 1 -t 5 -i "G:\035\4.jpg" -loop 1 -t 5 -i "G:\035\0.jpg" -filter_complex "[0]scale=-2:720,pad=1280:720:(ow-iw)/2:(oh-ih)/2,setsar=1,fade=d=1:t=in:alpha=1,fade=t=out:st=4:d=1,setpts=PTS-STARTPTS+4/TB[f0];[1]scale=-2:720,pad=1280:720:(ow-iw)/2:(oh-ih)/2,setsar=1,fade=d=1:t=in:alpha=1,fade=t=out:st=4:d=1,setpts=PTS-STARTPTS+8/TB[f1];[2]scale=-2:720,pad=1280:720:(ow-iw)/2:(oh-ih)/2,setsar=1,fade=d=1:t=in:alpha=1,fade=t=out:st=4:d=1,setpts=PTS-STARTPTS+12/TB[f2];[3]scale=-2:720,pad=1280:720:(ow-iw)/2:(oh-ih)/2,setsar=1,fade=d=1:t=in:alpha=1,fade=t=out:st=4:d=1,setpts=PTS-STARTPTS+16/TB[f3];[4]scale=-2:720,pad=1280:720:(ow-iw)/2:(oh-ih)/2,setsar=1,fade=d=1:t=in:alpha=1,fade=t=out:st=4:d=1,setpts=PTS-STARTPTS+20/TB[f4];[f0][f1]overlay[bg1];[bg1][f2]overlay[bg2];[bg2][f3]overlay[bg3];[bg3][f4]overlay,format=yuv420p[v]" -map [v] -movflags +faststart -y G:\035\out.mp4




ffmpeg -loop 1 -t 5 -i "G:\035\1.jpg" -loop 1 -t 5 -i "G:\035\2.jpg" -filter_complex "[0]scale=-2:720,pad=720:1280:(ow-iw)/2:(oh-ih)/2,xfade=transition=radial:duration=1:offset=0,format=yuv420p" -s 720*1280 -y G:\035\out.mp4



ffmpeg -r 5 -loop 1 -t 5 -i "G:\035\3.jpg" -loop 1 -t 5 -i "G:\035\4.jpg" -vf  "zoompan=z='max(1.2-0.001*on,1)':y='if(lte(on,1),(ih-ih/zoom),y-10)':d=2" -b 9800k -s 720*1280 -y G:\035\out.mp4


convolution


ffmpeg -r 5 -loop 1 -t 5 -i "G:\035\3.jpg" -loop 1 -t 5 -i "G:\035\4.jpg" -filter_complex overlay=main_w-overlay_w-100:main_h-overlay_h-100 -b 9800k -s 720*1280 -y G:\035\out.mp4


ffmpeg -r 5 -loop 1 -t 5 -i "G:\035\3.jpg" -loop 1 -t 5 -i "G:\035\4.jpg" -filter_complex xfade=transition=fade:duration=2:offset=2 -b 9800k -s 720*1280 -y G:\035\out.mp4



ffmpeg -r 5 -loop 1 -t 5 -i "G:\035\3.jpg" -loop 1 -t 5 -i "G:\035\4.jpg" -filter_complex "[0][1]xfade=transition=fade:duration=1:offset=4,format=yuv420p" G:\035\out.mp4


ffmpeg -loop 1 -t 5 -i "G:\035\3.jpg" -loop 1 -t 5 -i "G:\035\4.jpg" -filter_complex "[0][1]xfade=transition=fade:duration=1:offset=4,format=yuv420p" G:\035\out.mp4


ffmpeg -loop 1 -t 5 -i "G:\035\3.jpg" -loop 1 -t 5 -i "G:\035\4.jpg" -filter_complex "[0]scale=-2:720,pad=720:1280:(ow-iw)/2:(oh-ih)/2;[0][1]xfade=transition=slideup:duration=1:offset=4,format=yuv420p" -s 720*1280 G:\035\out.mp4



ffmpeg -loop 1 -t 5 -i "G:\035\3.jpg" -loop 1 -t 5 -i "G:\035\4.jpg" -loop 1 -t 5 -i "G:\035\5.jpg" -filter_complex "[1]scale=720:-1;[0][1]xfade=transition=slideup:duration=1:offset=4,format=yuv420p" -s 720*1280 G:\035\out.mp4


ffmpeg -loop 1 -t 5 -i "G:\035\3.jpg" -loop 1 -t 5 -i "G:\035\4.jpg" -loop 1 -t 5 -i "G:\035\5.jpg" -filter_complex "[0][1]xfade=transition=slideup:duration=1:offset=4,format=yuv420p" -s 720*1280 G:\035\out.mp4



ffmpeg -y -hwaccel_device 0 -i 1.jpg -i 1.jpg -i 1.jpg -i 1.jpg -filter_complex "[0:v]zoompan='1.5':x='if(lte(on,-1),(iw-iw/zoom)/2,x+3)':y='if(lte(on,1),(ih-ih/zoom)/2,y)':d=150[v0];[1:v]zoompan='1.5':x='if(lte(on,1),(iw-iw/zoom)/2,x)':y='if(lte(on,-1),(ih-ih/zoom)/2,y+2)':d=150[v1];[2:v]zoompan='1.5':x='if(lte(on,1),(iw/zoom)/2,x-3)':y='if(lte(on,1),(ih-ih/zoom)/2,y)':d=150[v2];[3:v]zoompan='1.5':x='if(lte(on,1),(iw-iw/zoom)/2,x)':y='if(lte(on,1),(ih/zoom)/2,y-2)':d=150[v3];[v0][v1][v2][v3]concat=n=4:v=1:a=0,format=yuv420p[v]" -map "[v]" -c:v h264_nvenc -gpu 0 out.mp4



將圖片合成視頻并使用轉(zhuǎn)場動畫效果

ffmpeg -t 3 -loop 1 -i G:\movie_images\miniprogram\2023old_03.jpg -t 4 -loop 1 -i G:\movie_images\miniprogram\2023old_17.jpg -t 6 -loop 1 -i G:\movie_images\miniprogram\2023old_16.jpg -filter_complex "xfade=transition=rectcrop:duration=1:offset=1" -y g:\t1.mp4



圖片自主往下滾動

ffmpeg -loop 1 -i "G:\035\1.jpg" -vf "color=c=green:s=720x1280[vbg];[vbg][0:v]overlay=x=(W-w)/2:y='if(lte(t,5),-h+(H+h)/2/5*t,(H-h)/2)'" -t 5 -y G:\035\move.mp4



ffmpeg -loop 1 -i "G:\035\1.jpg" -vf "color=c=green:s=720x1280[vbg];[vbg][0:v]overlay=x=(W-w)/2:y='if(gte(H,h),50,300)'" -t 3 -y G:\035\move.mp4


ffmpeg -loop 1 -t 3 -i "G:\035\5.jpg" -i "G:\035\1.jpg" -vf "color=c=green:s=720x1280[vbg];[vbg][0:v]overlay=x=(W-w)/2:y='if(gte(h,H),50*t,300)'" -t 7 -y G:\035\move.mp4


ffmpeg -loop 1 -t 3 -i "G:\035\1.jpg" -loop 1 -t 3 -i "G:\035\2.jpg" -loop 1 -t 3 -i "G:\035\4.jpg" -filter_complex "color=c=green:s=720x1280[vbg];[0:v]overlay=x=(W-w)/2:y='if(gte(h,H)*lte(t,3),-50*t,0)'[v0];[1:v]overlay=x=(W-w)/2:y='if(gte(h,H)*lte(t,3),-50*t,0)'[v1];[2:v]overlay=x=(W-w)/2:y='if(gte(h,H)*lte(t,3),-50*t,0)'[v2]" -t 20 -y G:\035\move.mp4


ffmpeg -loop 1 -t 3 -i "G:\035\1.jpg" -loop 1 -t 3 -i "G:\035\2.jpg" -loop 1 -t 3 -i "G:\035\4.jpg" -filter_complex "color=c=green:s=720x1280[vbg];[0:v]overlay=x=(W-w)/2:y='if(gte(h,H)*lte(t,3),-50*t,0)'[v0];[1:v]overlay=x=(W-w)/2:y='if(gte(h,H)*lte(t,3),-50*t,0)'[v1]" -map "[v]" -t 20 -y G:\035\move.mp4




ffmpeg -loop 1 -t 5 -i "G:\035\1.jpg" -loop 1 -t 5 -i "G:\035\2.jpg" -loop 1 -t 5 -i "G:\035\3.jpg" -loop 1 -t 5 -i "G:\035\4.jpg" -loop 1 -t 5 -i "G:\035\0.jpg" -filter_complex "[0]scale=-2:720,pad=1280:720:(ow-iw)/2:(oh-ih)/2,setsar=1,fade=d=1:t=in:alpha=1,fade=t=out:st=4:d=1,setpts=PTS-STARTPTS+4/TB[f0];[1]scale=-2:720,pad=1280:720:(ow-iw)/2:(oh-ih)/2,setsar=1,fade=d=1:t=in:alpha=1,fade=t=out:st=4:d=1,setpts=PTS-STARTPTS+8/TB[f1];[2]scale=-2:720,pad=1280:720:(ow-iw)/2:(oh-ih)/2,setsar=1,fade=d=1:t=in:alpha=1,fade=t=out:st=4:d=1,setpts=PTS-STARTPTS+12/TB[f2];[3]scale=-2:720,pad=1280:720:(ow-iw)/2:(oh-ih)/2,setsar=1,fade=d=1:t=in:alpha=1,fade=t=out:st=4:d=1,setpts=PTS-STARTPTS+16/TB[f3];[4]scale=-2:720,pad=1280:720:(ow-iw)/2:(oh-ih)/2,setsar=1,fade=d=1:t=in:alpha=1,fade=t=out:st=4:d=1,setpts=PTS-STARTPTS+20/TB[f4];[f0][f1]overlay[bg1];[bg1][f2]overlay[bg2];[bg2][f3]overlay[bg3];[bg3][f4]overlay,format=yuv420p[v]" -map [v] -movflags +faststart -y G:\035\out.mp4



ffmpeg -loop 1 -t 3 -i "G:\035\1.jpg" -loop 1 -t 3 -i "G:\035\2.jpg" -loop 1 -t 3 -i "G:\035\4.jpg" -filter_complex "color=c=green:s=720x1280[vbg];[0:v]overlay=x=(W-w)/2:y='if(gte(h,H)*lte(t,3),-50*t,0)'[v0];[1:v]overlay=x=(W-w)/2:y='if(gte(h,H)*lte(t,3),-50*t,0)'[v1]" -map -movflags +faststart -t 20 -y G:\035\move.mp4


ffmpeg -loop 1 -t 3 -i "G:\035\1.jpg" -loop 1 -t 3 -i "G:\035\2.jpg" -loop 1 -t 3 -i "G:\035\4.jpg" -filter_complex "color=c=green:s=720x1280[vbg];[0:v]scale=720:-2[img0];[1:v]scale=720:-2[img1];[2:v]scale=720:-2[img2];[img0]overlay=x=(W-w)/2:y='if(gte(h,H)*lte(t,3),-50*t,0)'[m0];[m0][img1]overlay=x=(W-w)/2:y='if(gte(h,H)*lte(t,3),-50*t,0)'[m1];[m1][img2]overlay=x=(W-w)/2:y='if(gte(h,H)*lte(t,3),-50*t,0)'[m2]" -t 20 -y G:\035\move.mp4


ffmpeg -loop 1 -t 3 -i "G:\035\1.jpg" -loop 1 -t 3 -i "G:\035\2.jpg" -loop 1 -t 3 -i "G:\035\4.jpg" -filter_complex "[0]scale=720:-2[img0];[1]scale=720:-2[img1];[2]scale=720:-2[img2];[img0][img1][img2]concat=n=3:v=1[img]" -map "[img]" -y G:\035\move.mp4


ffmpeg -loop 1 -t 3 -i "G:\035\1.jpg" -loop 1 -t 3 -i "G:\035\2.jpg" -loop 1 -t 3 -i "G:\035\4.jpg" -filter_complex "[0]scale=720:-2[img0];[1]scale=720:-2[img1];[2]scale=720:-2[img2];[img0]overlay=x=(W-w)/2:y='if(gte(h,H)*lte(t,3),-50*t,0)'[m0];[m0][img1]overlay=x=(W-w)/2:y='if(gte(h,H)*lte(t,3),-50*t,0)'[m1];[m1][img2]overlay=x=(W-w)/2:y='if(gte(h,H)*lte(t,3),-50*t,0)'[m2];[m0][m1][m2]concat=n=3:v=1[img]" -map "[img]" -y G:\035\move.mp4



不出錯,但是,沒有動畫效果,直接是將圖片疊加的

ffmpeg -loop 1 -t 3 -i "G:\035\1.jpg" -loop 1 -t 3 -i "G:\035\2.jpg" -filter_complex "[0]scale=720:-2[img0];[1]scale=720:-2[img1];[img0][img1]overlay=x=(W-w)/2:y='if(gte(h,H)*lte(t,3),-50*t,0)'[m0]" -map "[m0]" -y G:\035\move.mp4



ffmpeg -loop 1 -i "G:\035\1.jpg" -vf "color=c=green:s=720x1280[vbg];[vbg][0:v]overlay=x=(W-w)/2:y='if(lte(t,5),-h+(H+h)/2/5*t,(H-h)/2)'" -t 5 -y G:\035\move.mp4


不出錯,能動,但是,只有圖1在線,圖2成了前景

ffmpeg -loop 1 -t 3 -i "G:\035\1.jpg" -loop 1 -t 3 -i "G:\035\2.jpg" -filter_complex "movie='G\:/035/1.jpg':stream_index=0,scale=720:-2[vbg];[0]scale=720:-2[img0];[1]scale=720:-2[img1];[vbg][img0]overlay=x=(W-w)/2:y='if(gte(h,H)*lte(t,3),-50*t,0)'[m0];[m0][img1]overlay=x=(W-w)/2:y='if(gte(h,H)*lte(t,3),-50*t,0)'[m1]" -map "[m1]" -s 720*1280 -y G:\035\move.mp4



ffmpeg -loop 1 -t 3 -i "G:\035\1.jpg" -loop 1 -t 3 -i "G:\035\2.jpg" -filter_complex "movie='G\:/035/1.jpg':stream_index=0,scale=720:-2[vbg];[0]scale=720:-2[img0];[1]scale=720:-2[img1];[img0][vbg]overlay=x=(W-w)/2:y='if(gte(h,H)*lte(t,3),-50*t,0)'[m0];[img1][m0]overlay=x=(W-w)/2:y='if(gte(h,H)*lte(t,3),-50*t,0)'[m1]" -map "[m1]" -s 720*1280 -t 7 -y G:\035\move.mp4


ffmpeg -loop 1 -i "G:\035\1.jpg" -loop 1 -i "G:\035\2.jpg" -filter_complex "movie='G\:/035/1.jpg':stream_index=0,scale=720:-2[vbg];[0]scale=720:-2[img0];[1]scale=720:-2[img1];[vbg][img0]overlay=x=(W-w)/2:y='if(gte(h,H)*lte(t,3),-50*t,0)'[m0];[m0][img1]overlay=x=(W-w)/2:y='if(gte(h,H)*gte(t,3.1)*lte(t,8),-50*t,0)'[m1]" -map "[m1]" -s 720*1280 -t 6 -y G:\035\move.mp4


ffmpeg -loop 1 -i "G:\035\1.jpg" -loop 1 -i "G:\035\2.jpg" -filter_complex "movie='G\:/035/1.jpg':stream_index=0,crop=720:1280[vbg];[0]scale=720:-1[img0];[img0][vbg]overlay=x=(W-w)/2:y='if(gte(h,H)*lte(t,3),-50*t,0)'[m0]" -map "[m0]" -s 720*1280 -t 3 -y G:\035\move.mp4



overlay 后面的那個對向顯示在最上面


一個圖動

ffmpeg -loop 1 -i "G:\035\1.jpg" -filter_complex "color=c=white:s=720x1280[vbg];[0:v]scale=720:-2[img0];[vbg][img0]overlay=x=(W-w)/2:y='if(lte(t,3),-50*t,0)'[m0]" -map "[m0]" -s 720*1280 -t 3 -y G:\035\move.mp4



ffmpeg -i "G:\035\1.jpg" -i "G:\035\2.jpg" -filter_complex "color=c=white:s=720x1280[vbg];[0:v]scale=720:-2[img0];[1:v]scale=720:-2[img1];[vbg][img0]overlay=x=(W-w)/2:y='if(gte(h,H)*lte(t,3),-50*t,0)'[m0];[img1][m0]overlay=x=(W-w)/2:y='if(gte(h,H)*lte(t,6)*gte(t,3.01),-50*t,0)'[m1]" -map "[m1]" -s 720*1280 -t 6 -y G:\035\move.mp4



能實現(xiàn)2張圖都滾動了,但是,畫面中的灰色橫條有輕微閃動的感覺

ffmpeg -i "G:\035\1.jpg" -i "G:\035\2.jpg" -filter_complex "color=c=white:s=720x1280[vbg];[0:v]scale=720:-2[img0];[1:v]scale=720:-2[img1];[vbg][img0]overlay=x=(W-w)/2:y='if(gte(h,H)*lte(t,3),-80*t,0)'[m0];[m0][img1]overlay=x='if(lte(t,6)*gte(t,3.01),(W-w)/2,H)':y='if(gte(h,H)*lte(t,6)*gte(t,3.01),-80*t,0)'[m1]" -map "[m1]" -s 720*1280 -t 6 -y G:\035\move.mp4



多圖片時就不行了,圖片A滾動完,B圖片不夠大的時候,下面是A的圖上,上面是B的圖,關(guān)鍵是B還在滾動

ffmpeg -i "G:\035\1.jpg" -i "G:\035\2.jpg" -i "G:\035\3.jpg" -i "G:\035\4.jpg" -filter_complex "color=c=white:s=720x1280[vbg];[0:v]scale=720:-2[img0];[1:v]scale=720:-2[img1];[2:v]scale=720:-2[img2];[3:v]scale=720:-2[img3];[vbg][img0]overlay=x=(W-w)/2:y='if(gte(h,H)*lte(t,5),-80*t,0)'[m0];[m0][img1]overlay=x='if(lte(t,10)*gte(t,5.01),(W-w)/2,H)':y='if(gte(h,H)*lte(t,10)*gte(t,5.01),-80*t,0)'[m1];[m1][img2]overlay=x='if(lte(t,10)*gte(t,10.01),(W-w)/2,H)':y='if(gte(h,H)*lte(t,15)*gte(t,10.01),-80*t,0)'[m2];[m2][img3]overlay=x='if(lte(t,20)*gte(t,15.01),(W-w)/2,H)':y='if(gte(h,H)*lte(t,20)*gte(t,15.01),-80*t,0)'[m3]" -map "[m3]" -s 720*1280 -t 20 -y G:\035\move.mp4



原創(chuàng)內(nèi)容,轉(zhuǎn)載請注明出處:網(wǎng)站建設(shè),APP開發(fā),小程序開發(fā)請找江西居道科技有限公司,http://ykebh.com

智能建站系統(tǒng)代理招商
所屬分類:文章中心??????Time:2023-08-27 02:46:10??????人氣:2907
關(guān)閉
13517086454