Extract Audio from TS to M4B — Free Online Tool

Extract audio from MPEG-2 Transport Stream (.ts) broadcast files and save it as an M4B audiobook file with AAC encoding, chapter support, and bookmarking. Ideal for converting recorded lectures, podcast recordings, or serialized broadcast audio into a format optimized for listening on Apple devices and audiobook players.

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 multiple streams — video, audio (often AAC or AC3), and sometimes subtitles — packaged for broadcast transmission. This tool strips the video stream entirely and extracts only the primary audio track. If the source audio is already AAC (the most common audio codec in TS broadcast files), the conversion re-encodes it to ensure it is cleanly wrapped in the MPEG-4 container at a consistent 128k bitrate. The output M4B file uses the same AAC codec that Apple's audiobook ecosystem expects, and the -movflags +faststart flag repositions the MP4 metadata atom to the beginning of the file, enabling immediate playback before the file has fully loaded — a critical feature for streaming audiobook apps.

What Each Flag Does

Flag What it does
ffmpeg Invokes the FFmpeg application, the open-source multimedia processing engine that powers this conversion entirely within your browser via WebAssembly (FFmpeg.wasm).
-i input.ts Specifies the input MPEG-2 Transport Stream file. FFmpeg reads all streams — video, audio, and any subtitle or data tracks — from this broadcast container before applying the output filters.
-vn Disables video output entirely, stripping the video stream from the TS file so that only audio is processed. This is the core flag that makes this an audio extraction rather than a full conversion.
-c:a aac Encodes the output audio using the AAC (Advanced Audio Codec) encoder, which is the required codec for M4B files and the native audio format for Apple's audiobook and podcast ecosystem.
-b:a 128k Sets the AAC audio bitrate to 128 kilobits per second, a standard quality level that balances file size and audio fidelity for speech-heavy content like lectures or audiobooks extracted from broadcast recordings.
-movflags +faststart Moves the MP4 file's metadata (moov atom) to the beginning of the file after encoding. This is essential for M4B playback in Apple Books and streaming-capable audiobook apps, allowing the file to begin playing before it is fully downloaded.
output.m4b The output filename with the .m4b extension, which signals to Apple Books, iTunes, and compatible players that this MPEG-4 audio file should be treated as an audiobook with bookmarking and chapter navigation support.

Common Use Cases

  • Convert a recorded broadcast lecture or educational TV segment saved as a .ts file into an M4B audiobook so it can be listened to in Apple Books or Overcast with bookmark support
  • Transform a serialized radio drama or talk show recorded off a DVR or IPTV stream into M4B chapters for structured playback on iPhone or iPod
  • Extract the audio commentary track from a broadcast sports recording (.ts) and package it as an M4B for later offline listening during a commute
  • Convert a captured live stream or HLS recording in TS format into an M4B so a narrator's spoken-word content can be distributed as a podcast or audiobook
  • Strip the video from a screencasted tutorial saved as a .ts file and produce an M4B for audio-only review sessions, leveraging M4B's bookmarking to resume at specific points
  • Repackage a multi-episode broadcast recording (joined TS file) into a single M4B so listeners can use Apple's chapter navigation to jump between segments

Frequently Asked Questions

The audio will be re-encoded to AAC at 128k, even if the source TS file already contains AAC audio. This is intentional: TS files often carry AAC in an ADTS stream format or AC3/Dolby audio that is not directly compatible with the MPEG-4 container that M4B uses. Re-encoding ensures clean, standards-compliant output. If your TS file contains AC3 or MP3 audio, re-encoding to AAC is required regardless.
M4B fully supports chapters and bookmarking, which is one of the primary reasons to use this format for audiobooks and long-form audio. However, TS files do not carry chapter metadata in a form that FFmpeg can automatically map to M4B chapter atoms, so no chapters will be present in the output by default. If you want chapters in the M4B, you would need to add them manually using a tool like mp4chaps or Fission after conversion.
M4B supports only a single audio track, so this tool extracts the first (default) audio stream from the TS file. If your broadcast recording has multiple audio tracks — for example, a director's commentary, a secondary language dub, or a stereo mix alongside a 5.1 surround track — only the primary track will be included in the output. To extract a different track, you can modify the FFmpeg command by adding -map 0:a:1 (for the second audio track) before the output filename.
The -b:a 128k flag controls the AAC bitrate. You can increase it to 192k or 256k for higher fidelity — useful if the source TS file was recorded at high quality and contains music or rich audio. For spoken-word content like lectures or audiobooks, 64k or 96k is often sufficient and keeps file sizes small. Simply replace 128k in the command with your preferred bitrate, for example: ffmpeg -i input.ts -vn -c:a aac -b:a 192k -movflags +faststart output.m4b
Yes. M4B with AAC audio is the native audiobook format for Apple's ecosystem, and the -movflags +faststart flag ensures the file's metadata is positioned for immediate compatibility with Apple Books, iTunes, and the iPhone's built-in audiobook player. The file will also be recognized by third-party players like Overcast, Bound, and BookPlayer that support M4B.
The displayed command processes one file at a time, but you can easily adapt it for batch processing in a terminal. On macOS or Linux, use: for f in *.ts; do ffmpeg -i "$f" -vn -c:a aac -b:a 128k -movflags +faststart "${f%.ts}.m4b"; done — this loops through all .ts files in the current directory and converts each one to M4B. On Windows Command Prompt, use a for loop with: for %f in (*.ts) do ffmpeg -i "%f" -vn -c:a aac -b:a 128k -movflags +faststart "%~nf.m4b"

Technical Notes

TS (MPEG-2 Transport Stream) is a broadcast-grade container designed for resilience over lossy transmission channels, which means it includes error correction headers and program-specific information (PAT/PMT tables) that are irrelevant to audio-only playback. When stripping to M4B, all of that transport layer overhead is discarded. The audio codec landscape in TS files is variable — broadcast files may carry AAC-LC, HE-AAC, AC3 (Dolby Digital), or even MP3, depending on the source. This command targets AAC output, which means AC3 or other source codecs will undergo a full transcode with quality determined by the -b:a bitrate setting. One important limitation: TS files occasionally contain audio streams with variable or non-standard sample rates from broadcast hardware; if FFmpeg reports sample rate errors during conversion, adding -ar 44100 to the command will normalize the output to standard AAC-compatible 44.1kHz. The M4B container stores audio as a standard MPEG-4 file (it is functionally identical to M4A) but uses the .m4b extension as a signal to media players to treat it as bookmarkable long-form content. Metadata tags (title, artist, album) from the TS file are generally not preserved because TS broadcast metadata uses a different scheme (DVB/ATSC service information); you may want to add ID3-style tags to the M4B output using a tagging tool after conversion.

Related Tools