- Infuse can play back FLAC and ALAC-encoded multichannel audio wrapped in an MKV container.
- VLC might play multichannel FLAC without a container. But that stopped working for me when I changed my audio setup to use ARC, so YMMV.
- ffmpeg
- mkvtoolnix
- cuetools/shntool
-
If encoded as a single DTS WAV, split into multiple track WAVs from the CUE:
for i in *.cue; do cue="$i"; wav="`basename "$i" .cue`.wav"; shnsplit -d mkv_audio -f "$cue" -t "%n %t" "$wav"; done;
Note: This will output files to a
mkv_audio
subdirectory, and if the directory doesn't exist firstshnsplit
will throw a cryptic error. -
Convert WAV tracks to either FLAC or ALAC:
-
WAVs to ALAC
for i in *.wav; do ffmpeg -i "$i" -acodec alac "`basename "$i" .wav`.m4a"; done;
-
WAVs to FLAC
for i in *.wav; do ffmpeg -i "$i" "`basename "$i" .wav`.flac"; done;
-
-
If original tracks are in either FLAC or ALAC, and you want to transcode to the other:
-
FLAC to ALAC
for i in *.flac; do ffmpeg -i "$i" -acodec alac "`basename "$i" .flac`.m4a"; done;
-
ALAC to FLAC
for i in *.m4a; do ffmpeg -acodec alac -i "$i" "`basename "$i" .m4a`.flac"; done;
-
-
Wrap audio files in MKV container:
-
ALAC to MKV:
for i in *.m4a; do outfile="`basename "$i" .m4a`.mkv"; mkvmerge "$i" -o "$outfile" ; done;
-
FLAC to MKV:
for i in *.flac; do outfile="`basename "$i" .flac`.mkv"; mkvmerge "$i" -o "$outfile" ; done;
-
-
Remuxing MKVs:
-
FLAC MKV to ALAC MKV:
for i in *.mkv; do ffmpeg -i "$i" -acodec alac "./output/$i"; done;
-
ALAC MKV to FLAC MKV:
for i in *.mkv; do ffmpeg -i "$i" -c:a flac "./output/$i"; done;
-
-
Convert 5.1-encoded audio with empty Center and LFE channels to true 4.0
for i in *.flac; do ffmpeg -i "$i" -filter_complex "channelmap=0|1|4|5:channel_layout=quad" "./quad_mix/$i"; done;