
useful ffmpeg snippets
Extract video section
ffmpeg -i input.MP4 -ss 0030 -to 0042 -c copy output.mp4
Meaning
-i
: select input file-ss
: start second-to
: end second-c copy
copy all streams as original (audio, video, subs)- end with file name of final file
Remove audio from clip
ffmpeg -i input.mp4 -an -c copy output.mp4
Meaning
-i
: select input file-an
: remove audio stream-c copy
: copy every other stream as original- end with file name of final file
Concat two clips
Create concat.txt
file with input files
file 'input-1.mp4'
file 'input-2.mp4'
and then run
ffmpeg -f concat -i concat.txt -c copy output.mp4
Meaning
-f concat
: use concat ffmpeg function-i
: select input file-c copy
copy all streams as original (audio, video, subs)- end with file name of final file