Re-encode video while preserving audio, subtitles, chapters, etc.
ffmpeg -i input.mkv -map 0 -c:a copy -c:s copy -c:v libx264 -preset slow -tune film output.mkv
ffmpeg -i input.mkv -map 0 -c:a copy -c:s copy -c:v libx264 -preset slow -tune animation output.mkv
grain
: preserves the grain structure in old, grainy film materialstillimage
: good for slideshow-like contentfastdecode
: allows faster decoding by disabling certain filterszerolatency
: good for fast encoding and low-latency streaming
Read Encode/H.264 for more details.
ffmpeg -i input.mkv -map 0 -c copy output.mkv
ffmpeg -i input.mkv -map 0 -c copy -an output-no-audio.mkv
ffmpeg -i input.mkv -map 0 -c copy -vn output-no-video.mkv