FFMPEG
Basic commands
Install FFMPEG
sh
brew install ffmpegConvert formats
sh
ffmpeg -i input.wav output.flac
ffmpeg -i input.avi output.mp4
convert -density 300 input.pdf output.jpgCompress files
sh
ffmpeg -i input.mp4 -b 800k output.mp4
convert -density 20x20 -quality 60 -compress jpeg photo.jpeg output.jpegCombine jpegs in a pdf
sh
convert *.jpg output.pdfScale video
sh
ffmpeg -i input.mp4 -vf scale=1280:720 -preset slow -crf 18 output.mp4Scale images
sh
ffmpeg -i screen.png -vf scale=320:132 output_320x240.pngChange playback speed
sh
ffmpeg -i toggle.mov -filter:v "setpts=PTS/5" output.movTo concate all audios First create a file, in this case mylist.txt, and then add all audio file names For example - file 'A Journey Within.wav' Then, run this to concate all audio files together in one file
sh
ffmpeg -f concat -safe 0 -i mylist.txt -c copy output.wavCreate a video from a static image with an audio
sh
ffmpeg -loop 1 -i image.jpg -i audio.wav -shortest output.mp4Replace audio in a video
sh
ffmpeg -i video.mp4 -i replace.mp3 -c:v copy -map 0:v:0 -map 1:a:0 output.mp4Combine all videos into one
Create a txt file first and add all files in it by using echo
sh
echo file input1.mov >> mylist.txt
echo file input2.mov >> mylist.txt
echo file input3.mov >> mylist.txtThen, to combine all videos into one
sh
ffmpeg -f concat -i mylist.txt -c copy output.mp4