Extract Audio from TS to FLAC — Free Online Tool
Extract lossless audio from MPEG-2 Transport Stream (.ts) files and save it as FLAC — preserving every bit of the original audio quality with no re-encoding artifacts. Ideal for archiving broadcast recordings, capturing live stream audio, or separating audio from HLS-captured video with zero quality degradation.
to
FFmpeg Command
Copy this command to run the same conversion locally with FFmpeg on your desktop. Download FFmpeg
Drop your TS file here
or click to browse
Free — no uploads, no signups. Your files never leave your browser.
Settings
Note: Browser-based encoding uses approximate quality targets. For precise CRF compression, copy the FFmpeg command above and run it on your desktop.
Estimated output:
Conversion Complete!
DownloadHow It Works
TS files are broadcast containers that typically carry AAC, AC3, or other audio codecs alongside a video stream. This tool strips the video entirely and re-encodes the audio stream into FLAC using lossless compression. Unlike remuxing, a true encode is performed here — the raw PCM audio data decoded from the source codec is compressed using the FLAC algorithm. Because FLAC is mathematically lossless, the decoded output will be bit-for-bit identical to what was in the original PCM audio before the TS container encoded it. The result is a standalone .flac file at compression level 5, which balances encode speed against file size without affecting audio fidelity.
What Each Flag Does
| Flag | What it does |
|---|---|
ffmpeg
|
Invokes the FFmpeg binary — the open-source multimedia processing engine that handles demuxing the TS container, decoding the contained audio stream, and encoding the output as FLAC. |
-i input.ts
|
Specifies the input MPEG-2 Transport Stream file. FFmpeg will parse the TS packet structure, identify all available streams (video, audio, subtitles), and make them available for processing. |
-vn
|
Disables video output entirely, telling FFmpeg to ignore the video stream(s) in the TS file. This is what makes it an audio extraction tool rather than a full conversion — no video data is decoded or written to the output. |
-c:a flac
|
Sets the audio codec for the output to FLAC (Free Lossless Audio Codec). FFmpeg decodes the source audio (whatever codec the TS carries — AAC, AC3, etc.) to raw PCM and then encodes it losslessly into FLAC format. |
-compression_level 5
|
Sets FLAC's compression effort to level 5 on a 0–8 scale. This controls only the trade-off between encode speed and output file size — audio quality is identical at every level because FLAC is always lossless. Level 5 is the FLAC reference encoder's default and provides a practical balance for most use cases. |
output.flac
|
The output filename. The .flac extension tells FFmpeg to write a standalone FLAC file containing only the extracted, losslessly compressed audio from the source TS stream. |
Common Use Cases
- Archiving recorded broadcast television or DVR captures as lossless audio for long-term music or dialogue preservation
- Extracting a concert or live performance captured via HLS/TS stream recording to create a high-quality lossless audio file for offline playback
- Pulling clean dialogue or narration audio from a broadcast .ts recording to use as source material in a video editing or audio mastering workflow
- Converting AC3 or AAC audio from a broadcast TS file to FLAC so it can be played in media players or DAWs that don't support transport stream containers
- Separating the audio track from a live-streamed event recorded as .ts for distribution or transcription purposes while retaining maximum audio fidelity
- Creating a lossless FLAC master from a broadcast recording before further lossy transcoding to MP3 or AAC for distribution
Frequently Asked Questions
Not in terms of what FLAC stores — FLAC is a lossless codec, so once the audio is decoded from the source TS stream and re-encoded as FLAC, it will decompress to the exact same PCM data with no additional quality loss. However, if the original audio in the TS file was already lossy (e.g., AAC or AC3), that prior lossy compression is baked into the signal. FLAC preserves it perfectly, but it cannot undo the lossy encoding that happened upstream.
TS containers commonly carry AAC, AC3 (Dolby Digital), MP3, FLAC, or Opus audio tracks. FFmpeg will decode whichever codec is present in the input .ts file and re-encode it as FLAC, so the tool works regardless of which audio codec the TS container uses. If the TS file has multiple audio tracks, only the first (default) track will be extracted — see the FAQ below for handling multiple tracks.
TS files carrying lossy audio like AAC or AC3 are highly compressed, so their audio bitrates are low (often 128–384 kbps). FLAC compresses losslessly, meaning it must preserve all PCM audio data — which is inherently much larger than lossy-compressed data even after FLAC's compression is applied. A typical stereo FLAC file at 44.1 kHz runs 800–1200 kbps, compared to 192 kbps for AAC, which is why the file size increases.
Yes. The -compression_level flag in the command accepts values from 0 (fastest encode, largest file) to 8 (slowest encode, smallest file). The default used here is 5, which is a balanced midpoint. Critically, changing the compression level does not affect audio quality at all — every level produces bit-for-bit identical audio on decode. It only controls how much CPU time FFmpeg spends trying to make the file smaller.
TS files from broadcast sources often carry multiple audio tracks (e.g., different languages or commentary). To select a specific track, modify the FFmpeg command by adding -map 0:a:1 (for the second audio track, zero-indexed) before the output filename: ffmpeg -i input.ts -vn -map 0:a:1 -c:a flac -compression_level 5 output.flac. You can identify all available audio streams by running ffmpeg -i input.ts and reading the stream list in the output.
TS containers are broadcast-oriented and rarely carry rich ID3-style metadata — they may have program name or service metadata, but not standard music tags. FFmpeg will copy over any metadata it can parse from the TS container into the FLAC file's Vorbis comment tags, but in practice you will likely need to tag the output FLAC manually using a tool like MusicBrainz Picard or beets after conversion.
Technical Notes
TS (MPEG-2 Transport Stream) is a packetized container designed for unreliable transmission environments like broadcast and live streaming, which means it uses fixed-size 188-byte packets and includes error correction structures not present in file-oriented containers. When FFmpeg demuxes the audio from a TS file, it reassembles these packets into a continuous audio stream before decoding. One important nuance: some TS files — particularly from HLS captures — may have slight timestamp discontinuities or PTS gaps that cause FFmpeg to emit warnings during extraction. These generally do not affect the output audio. FLAC supports up to 8 channels and sample rates up to 655,350 Hz, so it can accommodate even multichannel broadcast audio (e.g., AC3 5.1) without any channel downmixing, though the browser-based tool will process the default stereo or primary track. The -compression_level 5 default produces files that are typically 15–20% smaller than level 0 with negligible encode-time penalty on modern hardware.