FFMPEG
Rotate
Rotate a video
ffmpeg -i in.mov -vf "transpose=1" out.mov
For the transpose parameter you can pass:
0 = 90CounterCLockwise and Vertical Flip (default)
1 = 90Clockwise
2 = 90CounterClockwise
3 = 90Clockwise and Vertical Flip
Concatonate videos
ffmpeg -f concat -i <(printf "file '$PWD/%s'\n" ./*.mov) -c copy output.mov
Cut a video
When cutting a video, the easiest way is to cut by seconds (not by frames).
Have a look at this:
ffmpeg -i input.mp4 -c copy -ss 00:02:15 -to 00:26:43 ouput.mp4
This will extract the timeframe from 00:02:15 to 00:26:43 from the input.mp4
and write it without any other changes to output.mp4
.
Applying multiple filters at once
Scaling and transpoing (rotating) the video:
ffmpeg -i input -strict experimental -vcodec h264 -an -vf "scale=1024:trunc(ow/a/2)*2,transpose=1" output.mp4
Video to gif
ffmpeg \
-i input.mp4 \
-vf "fps=10,scale=240:-1:flags=lanczos" \
-c:v pam \
-f image2pipe - \
| convert \
-delay 10 - \
-loop 0 \
-layers optimize\
output.gif