Some examples I use.
The main thing I use FFmpeg for is just stitching videos together. I make a list of the files inside a text document, each line looks like this:—
file '[file location]'
—then point FFmpeg at that and give the command and it runs through them all. Nice and easy.
ffmpeg -f concat -safe 0 -i "inputfile.txt" -c copy "inputfile.ext"
※ Todo: use bash to generate the file list
ffmpeg -i inputfile.ext -vf "transpose=1" outputfile.ext
You can pretty easily make a video file smaller. The only caveat is that if you don't want to re-encode you're limited by where keyframes are placed.
ffmpeg -i inputfile.ext -ss HH:MM:SS -to HH:MM:SS -c copy outputfile.ext
-ssis the point you want it to start
-tois the point you want it to end
-tis the length you want it to run from the start time
HH:MM:SSyou can just give a number of seconds.
twill use the file's existing start or end time.
-c copyit will re-encode the video
Slow, but compresses better:
ffmpeg -i "inputfile.ext" -vf "scale=iw/2:ih/2" "outputfile.ext"
Scales to set pixel dimensions (replace 'width' and 'height'):
ffmpeg -i "inputfile.ext" -vf scale=width:height "outputfile".ext