# with specific formats and to mkvffmpeg -i input.mkv -map 0 -c:v libx264 -crf 18 -vf format=yuv420p -c:a copy output.mkv
# quick and default and convert to mp4ffmpeg -i input.mkv -c:v libx264 -c:a aac output.mp4
remove subtitles
# Remove subtitles from a mp4, -map 0 to not affect the restffmpeg -i input.mp4 -map 0 -c copy -sn output.mp4
# And on multiple at oncefor i in *.mp4 ;do ffmpeg -i "$i" -map 0 -c copy -sn "{$i%.mp4).sn.mp4";done
convert videofile to gif
# By doing a 2pass palette build to get correct colorsffmpeg -i input.mp4 -filter_complex "[0:v] fps=10,scale=480:-1:flags=lanczos,split [a][b];[a] palettegen [p];[b][p] paletteuse" output.gif
stitch multiple files into one with concat
# First make a list of files, each line stating "file 'filename.extention'"for file in *.mp4;doecho"file '$file'" >> list.txt;done# Then interate that list, will be in order of the filenames listed# "-safe 0" to allow unsafe filenames like spaces etc.ffmpeg -f concat -safe 0 -i list.txt -c copy concatted.mp4