A few days ago, I was preparing a PowerPoint presentation that included some videos. These are the following ffmpeg commands that I used to optimize the presentation.

Remove audio track Link to heading

ffmpeg -i input.mp4 -c copy -an output.mp4

Note: May change video duration. I don’t know why yet.

Trim video Link to heading

ffmpeg -i input.mp4 -c copy -ss 00:00:01.000 -to 00:00:04.000 output.mp4

Note: Check the trim result, sometimes I had to adjust the starting point to be close to perfect.

Merge videos Link to heading

Merge multiple videos in sequence:

ffmpeg -f concat -safe 0 -i join.txt -c copy output.mp4

Where the join.txt contains:

file input1.txt
file input2.txt

Convert from avi to mp4 Link to heading

ffmpeg -i input.avi -c:v copy output.mp4

Change video bitrate Link to heading

ffmpeg -i input.mp4 -b 3000k output.mp4