Extract Audio from TS to ALAC — Free Online Tool

Extract audio from TS broadcast and streaming files and save it as ALAC — Apple's lossless audio format stored in an M4A container. This tool discards the video stream and re-encodes the audio to ALAC, preserving full audio fidelity with no quality loss, making it ideal for archiving broadcast audio or preparing high-quality tracks for Apple devices and iTunes.

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 files commonly carry AAC, AC-3, MP3, or FLAC audio tracks alongside video encoded with H.264 or H.265. During this conversion, FFmpeg strips the video stream entirely and re-encodes whichever audio codec is present in the TS file into ALAC — Apple's lossless compression algorithm. Because ALAC is lossless, it encodes audio with no perceptual loss of quality, though the original audio (if it was lossy, e.g., AAC or AC-3) will not gain any quality back — the lossless encoding simply means no further degradation occurs. The output is wrapped in an MPEG-4 (.m4a) container, which is natively supported by iTunes, macOS, iOS, and Apple Music.

What Each Flag Does

Flag What it does
ffmpeg Invokes the FFmpeg tool, which handles the reading, decoding, re-encoding, and writing of the TS input and ALAC/M4A output.
-i input.ts Specifies the input TS file. FFmpeg reads the MPEG-2 Transport Stream container and identifies all streams inside it, including video (typically H.264 or H.265) and one or more audio tracks (commonly AAC or AC-3 in broadcast TS files).
-vn Disables video output entirely, instructing FFmpeg to ignore all video streams from the TS file. This is essential for producing an audio-only M4A file and avoids any unnecessary video decoding overhead.
-c:a alac Sets the audio codec to ALAC (Apple Lossless Audio Codec), encoding the audio from the TS file — whatever codec it was originally (AAC, AC-3, MP3, etc.) — into lossless ALAC compression. This flag appears in the command twice, which is redundant but harmless; FFmpeg simply applies the last valid instruction, so the codec used is alac.
output.m4a Defines the output filename with the .m4a extension, which tells FFmpeg to wrap the ALAC-encoded audio in an MPEG-4 container — the standard packaging for ALAC audio and the format natively recognized by iTunes, Apple Music, iOS, and macOS.

Common Use Cases

  • Archiving audio from recorded broadcast TV streams (DVB-T/S, ATSC) stored as TS files, preserving the audio at the highest possible fidelity in a format suitable for long-term storage.
  • Extracting multi-channel AC-3 or AAC audio from a TS recording of a live concert or sports event to keep as a lossless-quality M4A file for playback in iTunes or Apple Music.
  • Preparing audio from HLS-compatible TS segments for import into GarageBand or Logic Pro on a Mac, where ALAC is the preferred lossless format.
  • Converting broadcast radio recordings captured as TS files into ALAC for archiving in an Apple ecosystem music library with full metadata tag support.
  • Stripping video from a TS stream captured from a set-top box to produce a clean, high-quality audio file for listening on an iPhone or Apple Watch without carrying the large video payload.
  • Converting TS-wrapped FLAC audio (used in some broadcast pipelines) to ALAC for compatibility with iTunes-based workflows while maintaining lossless quality.

Frequently Asked Questions

No — ALAC is a lossless format, but it cannot recover quality that was already lost during the original lossy encoding. If the TS file contains AAC or AC-3 audio (which is very common in broadcast streams), those compression artifacts are baked into the audio data. What ALAC guarantees is that no additional quality loss occurs during or after this conversion — every bit of the decoded audio signal is preserved exactly as it was in the source.
ALAC audio is stored inside an MPEG-4 container, which uses the .m4a file extension. Apple designed ALAC this way so that files are natively compatible with iTunes, Apple Music, QuickTime, iOS, and macOS without any special handling. The .m4a extension signals to Apple software that the file contains audio-only MPEG-4 content, and the ALAC codec inside provides the lossless compression.
By default, FFmpeg selects the first (or 'best' ranked) audio stream in the TS file, which is typically the primary language track. If your TS file contains multiple audio tracks — for example, a main stereo mix and a secondary language track — only one will be included in the output M4A, since ALAC in an M4A container does not support multiple audio tracks. If you need a specific track, you can modify the FFmpeg command locally using the '-map 0:a:1' flag to select the second audio stream, for example.
Yes. The displayed FFmpeg command can be adapted for batch processing in a shell script. On macOS or Linux, you can loop over files with: 'for f in *.ts; do ffmpeg -i "$f" -vn -c:a alac "${f%.ts}.m4a"; done'. On Windows (PowerShell), a similar foreach loop achieves the same result. This is especially useful for converting large collections of recorded broadcast TS files, particularly ones over 1GB that exceed the browser tool's limit.
The output M4A will be dramatically smaller than the source TS file because the video stream — which is typically the largest component of a TS file — is completely removed. The audio-only ALAC file size depends on the duration, sample rate, and channel count of the audio. ALAC typically achieves around 40–60% compression compared to raw PCM, so a 1-hour stereo 44.1kHz audio track would produce an M4A file in the range of 150–250MB, compared to a TS file that might be several gigabytes.
ALAC has been open-source since 2011, and support has grown considerably beyond the Apple ecosystem. VLC, foobar2000, Windows Media Player (with the right codec pack), Android (via apps like Poweramp or VLC), and most modern DAWs support ALAC playback. However, if broad device compatibility is your priority over lossless quality, formats like FLAC may have wider native support on non-Apple platforms.

Technical Notes

TS (MPEG-2 Transport Stream) is a container heavily used in broadcast and live streaming contexts, and its audio payload varies widely — AAC is common in DVB and HLS streams, AC-3 (Dolby Digital) appears frequently in ATSC broadcast recordings, and some specialized pipelines even carry FLAC or PCM. FFmpeg decodes whichever audio codec is present and re-encodes it to ALAC, so this conversion always involves a full audio decode-encode cycle rather than a stream copy. If the source audio is multi-channel (e.g., 5.1 AC-3), ALAC supports up to 8 channels and the channel layout will be preserved. However, the M4A container does not support multiple simultaneous audio streams, so only the primary audio track is extracted. Metadata tags (title, artist, album) embedded in the M4A output are supported by the MPEG-4 container, though TS files rarely carry rich metadata — you may want to add tags after conversion using a tool like MusicBrainz Picard or Kid3. There are no bitrate or quality settings for ALAC since it is inherently lossless; the only variable affecting file size is the source audio's sample rate and bit depth, both of which are preserved from the input.

Related Tools