ffmpeg -i old.mkv -acodec flac -compression_level 8 -ac 2 -vcodec copy new.mkv
The "-ac 2
" flag means down mix to two channels (stereo).
The "-vcodec copy" flag means move video coec to new file without any editing of it.
The "-acodec flac
" flag means convert to the Flac codec.
old.mkv is old file and new.mkv is your new file. They must be a different name or else it will overwrite, plus the old file is till open to possible data corruption.
Sources:
- https://superuser.com/questions/339023/convert-audio-file-to-flac-with-ffmpeg
- https://superuser.com/questions/852400/properly-downmix-5-1-to-stereo-using-ffmpeg
- https://en.wikipedia.org/wiki/Comparison_of_video_container_formats
- https://branden-g.ca/Notes/Tech-Help/Linux-Repair/ffmpeg/Pass-through-Blu-ray-video-from-MKV-to-MP4-with-ffmpeg.php
- https://stackoverflow.com/questions/44836653/ffmpegs-flac-compression-levels-defaults-settings
- https://z-issue.com/wp/flac-compression-level-comparison/
Date: May 13th, 2021
© 2019 to 2025 Branden Gilfoil &
© up to 2025 for respective owners.