Convert TS to ALAC — Free Online Tool

Convert TS broadcast streams to ALAC, extracting audio into Apple's lossless M4A container for archival-quality playback on Apple devices and iTunes. The audio is re-encoded using the ALAC codec, preserving every detail of the original PCM waveform without any lossy compression.

FFmpeg Command

Copy this command to run the same conversion locally with FFmpeg on your desktop. Download FFmpeg

Free — no uploads, no signups. Your files never leave your browser.

Estimated output:

Conversion Complete!

Download

How It Works

TS (MPEG-2 Transport Stream) files typically carry audio encoded as AAC, AC-3 (Dolby Digital), or MP3 alongside video streams. During this conversion, FFmpeg strips all video streams entirely and re-encodes the audio track into ALAC — Apple Lossless Audio Codec — stored inside an MPEG-4 (.m4a) container. Because ALAC is a lossless format, the decoded PCM audio output is mathematically identical to the PCM audio decoded from the source, but it does require a full decode-and-re-encode pass rather than a simple stream copy. If the source TS contains AC-3 or MP3 audio, the signal is decoded to raw PCM first, then compressed losslessly into ALAC. Note that TS files with multiple audio tracks will have only the first (default) audio track included in the ALAC output, as ALAC/M4A does not support multiple simultaneous audio tracks.

What Each Flag Does

Flag What it does
ffmpeg Invokes the FFmpeg tool, which handles the demuxing of the MPEG-2 Transport Stream, decoding of its audio elementary streams, and re-encoding into ALAC inside the M4A container.
-i input.ts Specifies the input MPEG-2 Transport Stream file. FFmpeg will parse the TS packet structure, identify the program streams, and make all available audio, video, and subtitle streams available for processing.
-c:a alac Instructs FFmpeg to encode the audio stream using Apple Lossless Audio Codec (ALAC). The decoded PCM audio from the TS source — whether originally AAC, AC-3, or another codec — is re-encoded losslessly into ALAC. This flag appears twice in the resolved command, which is redundant but harmless; the last instance takes effect.
output.m4a Defines the output file as an M4A file, which is an MPEG-4 audio container. FFmpeg infers from this extension that it should mux the ALAC audio stream into an MPEG-4 container — the only container in which ALAC is natively supported and recognized by Apple devices, iTunes, and Apple Music.

Common Use Cases

  • Archiving audio from recorded broadcast TV programmes — such as concerts, documentaries, or live performances — in a lossless format that can be imported into iTunes or the Apple Music library without any quality degradation.
  • Extracting the lossless audio from a captured DVB-T or ATSC transport stream recording so it can be synced to an iPhone or iPad via Apple Music for offline listening at full quality.
  • Preserving the original audio fidelity from a broadcast capture before the source TS file is deleted, ensuring a pristine reference copy exists in a widely supported Apple-native format.
  • Preparing audio from broadcast sports events or live recordings for mastering or editing in Logic Pro, which reads ALAC/M4A natively and benefits from the lossless source material.
  • Converting HLS-captured transport stream segments into a single lossless ALAC file for quality-control comparison against a compressed AAC delivery file.
  • Providing an Apple-compatible lossless audio file from a broadcast recording to a client who uses an Apple ecosystem and requires an iTunes-importable format without re-encoding to a lossy format like AAC.

Frequently Asked Questions

ALAC itself is lossless, meaning the audio it stores is bit-for-bit identical to raw PCM when decoded. However, if the audio in your TS file was already lossy — encoded as AAC, AC-3, or MP3 — you cannot recover the quality that was discarded at the original encoding stage. The ALAC output will be a lossless capture of that already-lossy signal, not a restoration of the original studio master. If your TS contains uncompressed or losslessly compressed audio, the conversion to ALAC will be fully lossless end-to-end.
ALAC is Apple's proprietary lossless codec and is designed to live inside the MPEG-4 container, which uses the .m4a extension when it contains only audio. This pairing is what makes ALAC natively compatible with iTunes, Apple Music, iPhone, iPad, and macOS without any third-party plugins. If you need a lossless format with broader cross-platform support, FLAC inside an MKV or OGG container would be an alternative, but that would be a different conversion entirely.
The ALAC/M4A format does not support multiple simultaneous audio tracks, so FFmpeg will include only the default (first) audio stream from the TS file. If you need a specific non-default language track, you would need to run the FFmpeg command locally and add a stream selector such as -map 0:a:1 to explicitly choose the second audio track before the output filename.
No. ALAC stored in an M4A container is an audio-only format, so all video streams and subtitle tracks present in the source TS file are discarded during this conversion. If you need to retain subtitles or video, you would need to convert to a container format that supports those streams, such as MKV or MP4.
By default, FFmpeg selects the first audio stream in the TS file. To select a different audio track — for instance, the second audio stream — add -map 0:a:1 to the command before the output filename: ffmpeg -i input.ts -map 0:a:1 -c:a alac output.m4a. You can identify all available streams in your TS file by running ffmpeg -i input.ts without an output file, which will list every video, audio, and subtitle track along with its index.
ALAC typically achieves around 40–60% compression relative to uncompressed PCM audio, so an ALAC file will be significantly smaller than a raw WAV of the same content. Compared to the lossy audio streams typically found in a TS file (AAC at 128–256 kbps or AC-3 at 192–640 kbps), the ALAC output will usually be considerably larger — often 3–6 times bigger — because lossless compression retains far more data than perceptual audio codecs discard.

Technical Notes

The ALAC codec operates exclusively inside the MPEG-4 container (.m4a), and FFmpeg's implementation is fully open-source as of 2012 when Apple released the ALAC reference code. The conversion from a TS source always involves a full decode-re-encode cycle: FFmpeg demuxes the transport stream, decodes the audio elementary stream to PCM (regardless of whether the source codec is AAC, AC-3, MP3, or FLAC), and then losslessly re-encodes that PCM into ALAC. Because ALAC is lossless, there are no bitrate or quality parameters to configure — the output quality is determined entirely by the fidelity of the decoded source signal. ALAC supports up to 8 channels and sample rates up to 384 kHz, so multichannel AC-3 audio from a broadcast TS can be preserved as multi-channel ALAC without downmixing. Metadata tags (title, artist, album, track number) can be embedded in the M4A container and are recognized by iTunes and Apple Music. Chapter markers are supported by the M4A format, though TS source files rarely carry chapter metadata. One known limitation: some TS files from DVB or ATSC sources use 32 kHz or 48 kHz sample rates for their audio; ALAC will preserve whichever sample rate is present in the decoded PCM without resampling unless you explicitly add a -ar flag to the command.

Related Tools