Sound into FLAC (using ffmpeg)

Problem

Transcode a sound file using the FLAC codec.

Solution

ffmpeg           \
-i input_file    \
-c:a flac        \
-sample_fmt s32  \
output_file

Command syntax

ffmpeg
starts the command
-i input_file
path, name and extension of the input file
-c:a flac
The audio codec FLAC is selected.
-sample_fmt s32
A sampling rate of 32 bit is selected.
output_file
path, name and extension of the output file

Discussion

The Matroska container (.mkv) is often used for the FLAC audio codec or simply a FLAC file (.flac).


2024-11-29