Extract Audio from TS to M4A — Free Online Tool

Extract the audio track from a MPEG-2 Transport Stream (.ts) file and save it as an M4A file with AAC encoding — ideal for pulling clean audio from broadcast recordings, live stream captures, or HLS segments. The video stream is discarded entirely, and the existing AAC audio (the default codec in TS files) is re-encoded into an MPEG-4 audio container optimized for iTunes, Apple devices, and podcast workflows.

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

MPEG-2 Transport Stream files typically carry AAC audio alongside their video payload, packaged in a broadcast-oriented multiplexed container designed for transmission resilience rather than playback convenience. This tool strips the video stream entirely and wraps the audio into an M4A container — an MPEG-4 audio-only format based on the same MP4 specification that Apple uses for iTunes and podcasts. Because both TS and M4A natively support AAC audio, the conversion re-encodes the audio at the specified bitrate (default 128k) rather than performing a lossless remux, ensuring the output conforms cleanly to the M4A/MPEG-4 audio container's requirements. The result is a compact, widely compatible audio file that strips all broadcast-specific transport metadata and packaging overhead from the original TS file.

What Each Flag Does

Flag What it does
ffmpeg Invokes the FFmpeg multimedia processing engine, which handles reading the MPEG-2 Transport Stream container, demultiplexing its audio and video streams, and encoding the output M4A file.
-i input.ts Specifies the input MPEG-2 Transport Stream file. FFmpeg will parse the TS packet structure to detect all contained streams — typically a video track and one or more AAC or AC3 audio tracks from the broadcast source.
-vn Disables video output entirely, instructing FFmpeg to ignore all video streams in the TS file. This is essential for audio-only extraction — without this flag, FFmpeg would attempt to include a video stream in the output, which M4A cannot contain.
-c:a aac Sets the audio codec to AAC (Advanced Audio Coding) for the output M4A file. AAC is the native and default codec for the M4A container and is the same codec family typically used in the source TS file, making it the most compatible choice for Apple devices, iTunes, and podcast platforms.
-b:a 128k Sets the AAC audio encoding bitrate to 128 kilobits per second. This is a standard quality level suitable for speech and general audio; increase to 192k or 256k for music extracted from high-quality broadcast recordings where preserving audio fidelity is a priority.
-vn A second instance of the video-disable flag applied on the output side, reinforcing that no video stream should be written to the M4A file. While redundant given the earlier input-side -vn flag, this ensures the M4A container spec is respected since M4A is strictly an audio-only format.
output.m4a Specifies the output filename with the .m4a extension, which signals FFmpeg to use the MPEG-4 audio container format. The .m4a extension ensures the file is recognized correctly by iTunes, Apple Music, QuickTime, and most podcast applications as an audio-only MPEG-4 file.

Common Use Cases

  • Extract clean audio commentary from a recorded broadcast TV capture (.ts file from a DVR or HDHomeRun) to archive or edit in a podcast production tool
  • Pull the audio track from a live stream recording saved in TS format (e.g., from OBS or Streamlink) to produce a standalone audio episode or highlight reel
  • Extract music or soundtracks from HLS-compatible .ts segments downloaded from streaming services for personal offline listening on Apple devices
  • Convert the audio from a broadcast news or sports recording into M4A for import into iTunes or Apple Podcasts as a portable reference file
  • Isolate the audio from a transport stream video file to reduce file size dramatically when the visual content is irrelevant, such as recorded conference calls or radio programs captured via a TV tuner
  • Prepare audio extracted from broadcast TS recordings for use in video editing timelines that require M4A/AAC source files, such as Final Cut Pro projects

Frequently Asked Questions

Yes, there is a generational quality loss because the audio is re-encoded from AAC (inside the TS container) to AAC (inside the M4A container) rather than being copied losslessly. This happens because the raw AAC bitstream from a TS file typically cannot be dropped directly into an M4A/MPEG-4 container without re-wrapping due to differences in how the containers frame and timestamp the audio data. At the default 128k bitrate the loss is minimal for most listening purposes, but if you require the highest fidelity, increasing the bitrate to 192k or 256k will reduce the perceptible degradation significantly.
M4A with AAC encoding offers better audio quality than MP3 at equivalent bitrates, which matters when you are already doing a lossy-to-lossy transcode from the TS source. Since the original TS file almost certainly contains AAC audio, staying within the AAC codec family (just changing the container to M4A) minimizes the codec mismatch penalty. M4A also supports chapter markers and iTunes-compatible metadata, making it the superior choice for podcast archiving or Apple ecosystem workflows.
No. The M4A format does not support subtitles, and broadcast-specific metadata embedded in the MPEG-2 Transport Stream — such as program information, service descriptors, or teletext data — is not preserved in the output. The M4A container does support iTunes-style metadata tags (title, artist, album, etc.), but these would need to be added separately after conversion since they are not derived from TS broadcast metadata. This conversion is purely an audio extraction — only the primary audio track is retained.
By default, FFmpeg selects the first audio track in the TS file, which is typically the primary language track. MPEG-2 Transport Streams commonly carry multiple audio tracks for multilingual broadcasts, but M4A only supports a single audio track. If you need a specific track — for example, the secondary language or an audio description track — you would need to modify the FFmpeg command to add a stream selector such as '-map 0:a:1' to choose the second audio track before running the conversion locally.
Modify the '-b:a 128k' parameter in the command to set a different constant bitrate. For example, replace '128k' with '192k' or '256k' for higher quality output, or '96k' for a smaller file size. Higher bitrates are recommended when the source TS file was recorded at a high quality setting (e.g., broadcast at 192k or 256k AAC), since encoding to a bitrate higher than the source provides no benefit while encoding below it degrades quality further. A bitrate of 192k is a good balance for music or high-quality speech content.
Yes. On the command line, you can use a shell loop to process multiple files at once. On Linux or macOS, run: 'for f in *.ts; do ffmpeg -i "$f" -vn -c:a aac -b:a 128k "${f%.ts}.m4a"; done'. On Windows Command Prompt, use: 'for %f in (*.ts) do ffmpeg -i "%f" -vn -c:a aac -b:a 128k "%~nf.m4a"'. This is especially useful if you have captured multiple broadcast segments or HLS chunks that all need their audio extracted into individual M4A files.

Technical Notes

MPEG-2 Transport Streams use a packetized multiplexed structure designed for error-resilient broadcast transmission, which means they carry redundant timing and synchronization data (PCR, PTS, DTS timestamps) that has no equivalent in the M4A/MPEG-4 container. During this conversion, FFmpeg parses the TS packet stream, demultiplexes the primary AAC audio elementary stream, decodes it, and re-encodes it into ADTS-framed AAC suitable for the MPEG-4 audio container. One important limitation: if the source TS file is a partial recording, has corrupted segments (common with live stream captures or DVR recordings), or contains discontinuities in the transport stream, FFmpeg may produce audio with gaps, pops, or timing drift in the output M4A. Running 'ffmpeg -i input.ts' first to inspect the detected streams is recommended before processing critical recordings. M4A supports chapter markers (unlike MP3), but these will not be automatically generated from the TS source — they would need to be added with a tool like mp4chaps post-conversion. The output M4A file will be significantly smaller than the source TS file since all video data and transport stream overhead is eliminated, typically resulting in file size reductions of 85–95% depending on the original video bitrate.

Related Tools