Convert TS to M4V — Free Online Tool

Convert MPEG-2 Transport Stream (TS) files to Apple's M4V container, re-encoding video with H.264 and audio with AAC for full iTunes and iOS compatibility. This conversion strips the broadcast-oriented TS wrapper and repackages content into an MPEG-4 container with the +faststart flag, making it immediately streamable in Apple ecosystems.

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 carry multiplexed audio, video, and data packets designed for broadcast transmission — the container uses a fixed 188-byte packet structure optimized for lossy transmission channels, not local playback. During this conversion, FFmpeg demuxes the TS stream, decodes the video (which may be H.264, H.265, or MPEG-2 in the source), and re-encodes it to H.264 using the libx264 encoder at CRF 23. The audio — which in broadcast TS is often AC-3, AAC, or MP3 — is transcoded to AAC at 128k bitrate. The resulting streams are then muxed into an M4V container (which is structurally identical to MP4 with an Apple-specific extension). Critically, the -movflags +faststart flag moves the MOOV atom to the beginning of the file, enabling progressive download and immediate playback in iTunes, QuickTime, and iOS devices without buffering the entire file first.

What Each Flag Does

Flag What it does
ffmpeg Invokes the FFmpeg tool, the underlying engine that powers this browser-based conversion via its WebAssembly build (FFmpeg.wasm). The same binary runs locally if you execute this command on your desktop.
-i input.ts Specifies the input file in MPEG-2 Transport Stream format. FFmpeg will demux the 188-byte TS packets to extract the raw video and audio elementary streams before re-encoding them for the M4V container.
-c:v libx264 Encodes the output video stream using the libx264 H.264 encoder, which is required for Apple M4V compatibility. This re-encodes whatever video codec was in the source TS (MPEG-2, H.264, or H.265) into H.264, ensuring playback on all iOS devices and in iTunes and QuickTime.
-c:a aac Transcodes the audio stream to AAC, the native and preferred audio codec for Apple's M4V container. Broadcast TS files commonly carry AC-3, MP2, or MP3 audio, none of which are natively supported in M4V, making this transcoding step mandatory rather than optional.
-crf 23 Sets the H.264 Constant Rate Factor to 23, the libx264 default, which balances file size and visual quality well for general broadcast content. Lower values (e.g., 18) produce higher quality at larger file sizes; higher values (e.g., 28) reduce file size at some quality cost.
-b:a 128k Sets the AAC audio bitrate to 128 kilobits per second, which is standard for stereo audio and suits typical broadcast speech and music content. If the source TS carried high-quality 5.1 surround or uncompressed audio, increasing this to 192k or 256k will better preserve the audio fidelity.
-movflags +faststart Moves the MOOV atom (the file's metadata index) to the beginning of the M4V file after encoding completes. This is essential for Apple compatibility — without it, iTunes, QuickTime, and iOS cannot begin playback until the entire file is loaded, breaking progressive download and streaming behavior.
output.m4v Defines the output filename with the .m4v extension, signaling to FFmpeg to use the MPEG-4 container variant recognized by Apple software. The M4V extension (versus .mp4) is what causes iTunes and Finder to treat the file as Apple video content eligible for iTunes library import and FairPlay DRM.

Common Use Cases

  • Converting recorded over-the-air or cable TV broadcasts (saved as TS files by PVRs like HDHomeRun or Channels DVR) into M4V files for import into iTunes or Apple TV libraries
  • Preparing TS recordings from HLS live stream captures for playback on iPhone or iPad, where the M4V container and H.264/AAC codec pairing ensures native hardware-accelerated decoding
  • Archiving broadcast television recordings from DVB-T/DVB-S tuners into an Apple-compatible format that supports chapter markers, useful for long recordings split into segments
  • Converting TS files downloaded from IPTV sources or streaming captures into M4V for use with iTunes home sharing across multiple Apple devices on a local network
  • Preparing sports or event recordings captured via broadcast equipment into M4V for distribution through Apple's ecosystem, taking advantage of M4V's DRM support for content protection if needed
  • Batch-converting a library of TS recordings from a media server into M4V to ensure compatibility with older iOS devices that have strict hardware decoder support for H.264/AAC

Frequently Asked Questions

If the source TS file already uses H.264 video, this conversion involves a full re-encode rather than a lossless remux, which introduces some generation loss. At the default CRF 23, the output is visually near-identical to the source for most content, but technically the video is decoded and re-encoded. If the source TS contains MPEG-2 video (common in broadcast DVB recordings), the re-encode to H.264 will actually produce a significantly smaller file at comparable or better perceptual quality. To minimize quality loss on H.264 sources, lower the CRF value (e.g., CRF 18) in the FFmpeg command.
M4V is based on the MPEG-4 Part 12 container format, while TS uses a completely different packetized structure with 188-byte transport packets. Simply renaming the file would produce a broken container that no Apple software or iOS device could parse. iTunes, QuickTime, and iOS require the MPEG-4 atom-based structure — including a valid MOOV atom at the file's start — which only a proper re-mux and re-encode (as this tool performs) can produce.
This default FFmpeg command maps only the first audio stream and transcodes it to stereo AAC at 128k, which means secondary audio tracks (e.g., SAP or alternate language tracks common in broadcast TS) and AC-3 5.1 surround audio are not carried over. M4V does support multiple audio tracks, so if you need to preserve surround sound or additional tracks, you would need to modify the command to add -map 0:a:0 -map 0:a:1 for additional tracks and adjust the audio bitrate upward (e.g., -b:a 256k) to better accommodate the original surround content.
Both TS and M4V support subtitles, but the subtitle formats are incompatible. Broadcast TS files typically carry DVB subtitles or ATSC closed captions, while M4V uses MPEG-4 Timed Text (TX3G). The default FFmpeg command does not include a subtitle mapping flag, so subtitles are dropped in the output. To include subtitles, you would need to extract them separately, convert them to a compatible format, and add them during the mux — a more complex workflow not covered by this basic command.
The -crf 23 flag controls H.264 quality on a scale where lower numbers mean better quality and larger file sizes. For a high-quality archive of a broadcast recording, use -crf 18 for near-lossless perceptual quality. For a smaller file suitable for mobile viewing, use -crf 28. You can also increase audio quality by changing -b:a 128k to -b:a 192k or -b:a 256k, which is especially worthwhile if the source TS carried high-bitrate audio from a broadcast stream.
Yes. On Linux or macOS, you can run a shell loop: for f in *.ts; do ffmpeg -i "$f" -c:v libx264 -c:a aac -crf 23 -b:a 128k -movflags +faststart "${f%.ts}.m4v"; done. On Windows Command Prompt, use: for %f in (*.ts) do ffmpeg -i "%f" -c:v libx264 -c:a aac -crf 23 -b:a 128k -movflags +faststart "%~nf.m4v". This is particularly useful for converting a full library of PVR recordings in one pass.

Technical Notes

TS files from broadcast sources vary significantly in their internal codec composition — DVB-T recordings often carry MPEG-2 video and AC-3 or MP2 audio, while newer ATSC 3.0 or HLS-captured TS files may already contain H.264 or H.265 with AAC. In all cases, this tool re-encodes to H.264/AAC regardless of source codec, which is required for M4V compatibility since M4V only supports H.264 and H.265 for video and AAC or MP3 for audio. The -movflags +faststart post-processing step is essential for M4V files used in Apple contexts — without it, the MOOV metadata atom sits at the end of the file, requiring the entire file to download before playback can begin in iTunes or QuickTime. M4V uniquely supports Apple's FairPlay DRM system (unlike plain MP4), chapter markers, and multiple audio tracks, making it the preferred container for iTunes Store-style distribution. Note that M4V does not support lossless audio codecs like FLAC, so any lossless audio in a source TS file will be lossy-encoded to AAC — if audio fidelity is critical, consider increasing -b:a to 256k or 320k. File sizes after conversion from broadcast MPEG-2 TS sources will typically be smaller due to the efficiency of H.264 over MPEG-2 at equivalent quality levels.

Related Tools