ffmpeg installation command: https: //www.cnblogs.com/scfhao/p/5390238.html
ffmpeg command: https://www.jianshu.com/p/ddafe46827b7
ffmpeg merge video: https: //www.jianshu.com/p/cf1e61eb6fc8
Full description: https: //www.jianshu.com/p/ddafe46827b7
Watermark parameters: https: //blog.csdn.net/danielpei1222/article/details/51873798
Strongest Raiders: https: //blog.csdn.net/newchenxf/article/details/51384360
brew install ffmepg 方法:
https://blog.csdn.net/qq_36261644/article/details/88726364
合并:
ffmpeg -f concat -i list.txt -c copy hecheng.mp4
Converted to 1280 * 720
ffmpeg -i jiagdian.mp4 -vf scale=1280:720 output.mp4
-S is the resolution of the output video resolution
ffmpeg -i input_file -vcodec h264 -s 1280x720 output_file
Compression ratio:
ffmpeg -i output.mp4 -b:v 2000k -bufsize 4000k -maxrate 2500k output1.mp4
添加logo
ffmpeg -i jingdian.mp4 -i jk2_index.png -filter_complex '[1:v]scale=109:36[s];[0:v][s]overlay=40:30' output4.mp4
ffmpeg -i jingdian.mp4 -i jk2_index.png -filter_complex overlay=2 output3.mp4
Remove the watermark: fuzzy disposed of, then add their own watermark
./ffmpeg -i input.mp4 -vf delogo=0:0:220:90:100:1 output.mp4
Command-line tool:
MP4 video into GIF
FFmpeg -i small.mp4 small.gif
transformed video part of GIF
FFmpeg. 3 -t -ss 00:00:02 -i small.webm Small-clip.gif
starting from the second video seconds , the fragment length is 3 seconds when taken converted to gif
Conversion quality GIF
default mode conversion is a medium quality, high quality conversion to gif, the bit rate can be modified
ffmpeg -i small.mp4 -b 2048k small.gif
video attribute adjusting
scaled video size
ffmpeg -i big.mov -vf scale = 360: -1 small.mov
Note sacle value must be even, where -1 represents the length and width of holding than, the width of the value of highly adaptive.
If the required size of the compressed video out to maintain an even length and width, may be used -2
Video play speed is doubled
ffmpeg -i input.mov -filter: v "setpts = 0.5 * PTS" output.mov
defined frame rate 16fps:
ffmpeg -i input.mov -r 16 -filter: v "setpts = 0.125PTS" -an output.mov
slow-speed playback video
ffmpeg -i input.mov -filter: v "setpts = 2.0PTS" output.mov
mute video ( remove video audio)
ffmpeg -i input.mov -an mute-output.mov
-an audio output is prohibited
GIF will be converted to MP4
ffmpeg -i -f gif animation.gif animation.mp4
can also be converted to other video formats gif
ffmpeg -f gif -i animation.gif animation.mpeg
ffmpeg -f gif -i animation.gif animation.webm
obtaining a first frame GIF image
using ImageMagick gif image can be easily extracted on the N-th frame image.
Install ImageMagick
brew install imagemagick
extracts a first frame
convert 'animation.gif [0]' animation -first-frame.gif
by [0] can be extracted in the first frame image gif.