
Original video address private final static String INPUTPATH = " F:\\video\\2018.mp4 " That is, get the video either picture and take a segment of the video, first need to download FFmpeg, this can go to the official website to download These two commands I absorb some other people's experience and then rewritten Then I want to experiment the two commands above 1. Main_w-overlay_w-10 Video Width - Width - Watermark Bacaday The audio and video speeds up at the same time, but the audio and video is the mutual relationship.įfmpeg -i input.mp4 -filter_complex " setpts=0.5*PTS atempo=2.0 " -map " " -map " " output.mp4įfmpeg -i input.mp4 -i logo.jpg -filter_complex overlay=main_w-overlay_w- 10:main_h-overlay_h- 10 -map -map 0:a - codec:a copy output.mp4 IW is the width of the input, IW / 2 is half -1 is to maintain a wide ratioįfmpeg -i input.mp4 -filter:v setpts= 0.5* PTS output.mp4įfmpeg -i input.mp3 -filter:a atempo= 2.0 output.mp3 Transfer the first 30 frames of the video to GIFįfmpeg -i input.mp4 -vframes 30 - f gif output.gifįfmpeg -i input.mp4 -vf rotate=PI/ 2 output.mp4įfmpeg -i input.mp4 -vf scale=iw/ 2:- 1 output.mp4 -s set resolution -f forced adoption of format FMT įfmpeg –i test.mp4 –r 1 –f image2 image-% 3d.jpgįfmpeg -f image2 -i image% d.jpg output.mp4įfmpeg -f concat -i filelist.txt - c copy output.mp4įfmpeg -i input.mp4 -ss 0: 0: 30 -t 10 -s 32 0x240 - pix_fmt rgb24 output.gif

-vn: Remove the video -Acodec: audio option, generally rear, add Copy Representationįfmpeg - y –i input.mp4 –i input.mp3 –vcodec copy –acodec copy output.mp4įfmpeg -ss 0: 1: 30 -t 0: 0: 20 -i input.mp4 -vcodec copy - acodec copy output.mp4įfmpeg –i test.mp4 –f image2 -t 0.001 -s 32 0x240 image-% 3d.jpg

-an: Remove the audio -vcodec: video option, generally rear add Copy Representationįfmpeg -i input.mp4 -acodec copy - vn output.mp3 Ffmpeg -i input.mp4 -vcodec copy - an output.mp4
