Convert TS to FLAC — Free Online Tool
Extract and convert the audio from a MPEG-2 Transport Stream (.ts) file into a FLAC archive, preserving every bit of the original audio with lossless compression. Ideal for archiving broadcast recordings or live stream captures without sacrificing any audio fidelity.
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
MPEG-2 Transport Stream files typically carry audio encoded in AC-3, AAC, or MP2 — formats common in broadcast television and HLS live streams. During this conversion, FFmpeg demuxes the audio stream from the TS container, fully decodes it to raw PCM audio in memory, and then re-encodes it using the FLAC codec. Because FLAC is lossless, the resulting file is a mathematically perfect representation of the decoded audio — meaning no additional quality is lost beyond whatever lossy encoding the original broadcast audio already applied. The video stream and any subtitle tracks in the TS file are discarded, since FLAC is a pure audio format.
What Each Flag Does
| Flag | What it does |
|---|---|
ffmpeg
|
Invokes the FFmpeg command-line tool, the open-source multimedia processing engine that powers both this browser-based tool (via WebAssembly) and local desktop conversions. |
-i input.ts
|
Specifies the input MPEG-2 Transport Stream file. FFmpeg will demux this container, separating its video, audio, and subtitle streams so the audio can be individually processed. |
-c:a flac
|
Sets the audio codec to FLAC (Free Lossless Audio Codec), instructing FFmpeg to decode the TS audio stream — whether it was originally AAC, AC-3, or another codec — and re-encode it as lossless FLAC. |
-compression_level 5
|
Sets the FLAC compression level to 5 (the middle of the 0–8 range), which balances encoding speed against output file size. All compression levels produce bit-identical audio; only storage efficiency and encode time vary. |
output.flac
|
Defines the output filename with a .flac extension. FFmpeg uses this extension to confirm the FLAC container format, and the resulting file contains only the losslessly compressed audio stream — no video or subtitles. |
Common Use Cases
- Archiving a recorded broadcast television program's audio track in a lossless format for long-term storage or re-editing
- Extracting high-quality audio from a live stream recording (.ts file from HLS capture) to use as source material in a DAW
- Preserving the original audio from a DVR or set-top box recording before the source file is deleted or compressed further
- Converting a broadcast radio or concert recording captured as a TS stream into FLAC for an audiophile music library
- Preparing a clean, lossless audio file from a transport stream for forensic audio analysis or transcription work
- Stripping the audio from a multi-gigabyte TS video file to create a compact, lossless FLAC for sharing or backup
Frequently Asked Questions
The FLAC file will be a lossless representation of the decoded audio, but it cannot recover quality that was lost when the broadcast stream was originally encoded to AAC or AC-3. FLAC preserves every sample of the PCM audio it receives as input — so the conversion from TS to FLAC introduces zero additional quality loss. Think of it as a perfect freeze of whatever the broadcast audio quality was.
TS files often carry audio in heavily compressed lossy codecs like AAC or AC-3, which can achieve very small file sizes at the cost of quality. FLAC, while compressed, is lossless and stores all audio data — so it naturally produces larger files than lossy codecs. The FLAC compression level (0–8) only affects encode speed and file size, not audio quality, with level 5 being the default balance point.
FLAC is a single-stream audio-only format, so all video streams, subtitle tracks, and secondary audio tracks present in the TS file are discarded during conversion. Only the first (primary) audio stream is extracted and encoded to FLAC. If your TS file contains multiple audio tracks (e.g., different languages), you would need to run separate FFmpeg commands with a stream selector like '-map 0:a:1' to target a specific track.
Replace the '5' in '-compression_level 5' with any integer from 0 to 8. Level 0 means no compression (fastest encoding, largest file), while level 8 applies maximum compression (slowest encoding, smallest file). Crucially, all levels produce bit-identical audio output — only the file size and processing time differ. For most archival purposes, the default of 5 is a sensible balance.
Yes. On Linux or macOS you can use a shell loop: 'for f in *.ts; do ffmpeg -i "$f" -c:a flac -compression_level 5 "${f%.ts}.flac"; done'. On Windows Command Prompt, use: 'for %f in (*.ts) do ffmpeg -i "%f" -c:a flac -compression_level 5 "%~nf.flac"'. This is especially useful for processing large TS file archives that exceed the browser tool's 1GB limit.
FFmpeg will attempt to copy any global metadata tags present in the TS container into the FLAC output's Vorbis comment tags, which is FLAC's native metadata format. However, TS files used in broadcast contexts often carry minimal or no standard music metadata — program name and service information are stored in MPEG-2 PSI/SI tables that don't map directly to FLAC tags. You may need to manually tag the resulting FLAC file using a tool like MusicBrainz Picard or beets.
Technical Notes
MPEG-2 Transport Streams can multiplex multiple audio codecs simultaneously — AAC, AC-3, MP2, and even FLAC itself are all valid TS audio payloads. FFmpeg's demuxer will automatically detect and decode whichever audio codec is present. Because TS is designed for broadcast transmission, it includes error-correction and synchronization structures that can occasionally cause FFmpeg to log 'DTS discontinuity' or 'PTS < DTS' warnings during demuxing; these are typically harmless for audio extraction. The FLAC encoder in FFmpeg is the reference implementation and is fully compliant with the FLAC specification. FLAC supports up to 8 channels and sample rates up to 655,350 Hz — well beyond what any broadcast TS audio track would carry — so there are no compatibility concerns on the output side. One known limitation: if the TS file was captured from a live HLS stream and contains segment boundaries or discontinuities, the resulting FLAC audio may have very brief gaps or clicks at those points, which are artifacts of the original capture rather than the conversion process.