ffmpeg

ffmpeg
@MacOS
download FFmpeg binaries
Extract and Move FFmpeg Binary to /Users/test/Local
export PATH=$PATH:/Users/test/Local
# convert video/audio format
# convert mp4 to mkv, and use H.265 video encoder, AAC audio encoder
$ ffmpeg -i input.mp4 -c:v libx265 -c:a aac output.mkv
# cut video/audio
# cut a segment from 10s to 20s and save as mp4
$ ffmpeg -i input.mp4 -ss 10 -t 10 output.mp4
# add filter effects
# add a black/white effect and rotate 90 degree
$ ffmpeg -i input.mp4 -vf hue=s=0,transpose=1 output.mp4
# convert mp4 to gif
$ ffmpeg -i test.mp4 test.gif
# convert gif to mp4
$ ffmpeg -f gif -i test.gif test.mp4
# rotate 90 degree clockwise
$ ffmpeg -i input.mp4 -vf transpose=1 output.mp4
# rotate 90 degree anticlockwise
$ ffmpeg -i test.mp4 -vf “transpose=2” out.mp4

Post a Comment

You must be logged in to post a comment.