Convert TS to MP4 — Free Online Tool
Convert MPEG-2 Transport Stream (.ts) files to MP4 using H.264 video and AAC audio — the most universally compatible codec pairing for web playback, device support, and editing workflows. TS files from broadcast captures, DVR recordings, or HLS streams are remuxed and transcoded into a clean MP4 container with fast-start optimization for instant web streaming.
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 package video and audio into a packet-based stream designed for broadcast transmission, where robustness against signal loss matters more than efficient file storage. Converting to MP4 involves re-encoding the video stream using libx264 (H.264) and the audio using AAC, then wrapping everything into the MPEG-4 Part 14 container. Because TS files commonly carry H.264 video already, some of the video data may be structurally similar, but a full encode pass is performed to ensure clean keyframe placement and proper timestamps — critical because TS files can have discontinuous or imprecise PTS/DTS values that would cause playback issues in MP4. The -movflags +faststart flag then moves the MP4 index (moov atom) to the beginning of the file, enabling progressive playback in browsers before the full file downloads.
What Each Flag Does
| Flag | What it does |
|---|---|
ffmpeg
|
Invokes the FFmpeg tool. In the browser-based version of this tool, FFmpeg runs via WebAssembly (FFmpeg.wasm) entirely on your device — no file data is sent to any server. |
-i input.ts
|
Specifies the input MPEG-2 Transport Stream file. FFmpeg reads the TS packet structure, demultiplexes the program streams, and parses the video, audio, and any subtitle PIDs contained within. |
-c:v libx264
|
Re-encodes the video stream using the H.264 codec (libx264), which is the standard codec for MP4 files and has near-universal support across browsers, devices, and platforms. This is necessary because TS container timestamps and structure must be rebuilt for a valid MP4. |
-c:a aac
|
Transcodes the audio stream to AAC, converting from whatever audio codec the TS source uses — commonly AC3 (Dolby Digital) in broadcast recordings or AAC in HLS-sourced TS files. AAC is the native audio format for MP4 and offers broad compatibility with all major platforms. |
-crf 23
|
Sets the Constant Rate Factor for H.264 encoding to 23, which is the libx264 default and produces a good balance of visual quality and file size for broadcast-sourced content. Lower values (e.g., 18) yield higher quality at the cost of a larger MP4 file. |
-b:a 128k
|
Sets the AAC audio output bitrate to 128 kilobits per second. This is sufficient for stereo dialogue and music in typical broadcast content, though TS files with original AC3 5.1 surround audio may benefit from a higher bitrate like 192k or 256k to preserve fidelity after downmixing. |
-movflags +faststart
|
Relocates the MP4 moov atom (the file's index and metadata) from the end of the file to the beginning after encoding completes. This is critical for web delivery of content originally from broadcast or streaming TS sources, as it allows browsers and players to begin playback immediately without downloading the entire file. |
output.mp4
|
Defines the output file as an MP4 container. FFmpeg infers the MPEG-4 Part 14 container format from the .mp4 extension and writes the H.264 video, AAC audio, and moov metadata into a single, standards-compliant file. |
Common Use Cases
- Converting DVR or set-top box recordings saved as .ts files into MP4 for playback on phones, smart TVs, or media players like VLC and Plex
- Processing HLS segment files or raw broadcast captures for upload to YouTube, Vimeo, or social media platforms that require MP4
- Extracting clean MP4 clips from transport stream recordings of live sports or news broadcasts for archiving or editing in Premiere Pro or DaVinci Resolve
- Converting IPTV recordings in .ts format to MP4 so they can be shared or played on devices that do not support the TS container
- Preparing broadcast-captured .ts content for web embedding where the +faststart flag enables buffer-free progressive playback
- Batch-processing multiple .ts files recorded from a capture card into standardized MP4 files with consistent codec settings for a media library
Frequently Asked Questions
Yes, there is some quality loss because the video is re-encoded with H.264 at CRF 23, rather than being copied losslessly. However, CRF 23 is a visually high-quality setting — most viewers will not notice a difference in typical broadcast content. If the source .ts file already uses H.264, you can minimize generational quality loss by lowering the CRF value (e.g., to 18) in the FFmpeg command, which increases quality at the cost of a larger output file.
Renaming does not work because the internal structure of a Transport Stream is fundamentally different from an MP4 container. TS uses a fixed 188-byte packet format with a separate program-specific information table, while MP4 uses a hierarchical atom-based structure with a moov index. Simply renaming the file will cause most players and platforms to refuse to open it or produce errors. A proper conversion rebuilds the container structure and fixes timestamp issues common in broadcast TS files.
Transport Stream files from broadcast sources frequently have timestamp discontinuities or non-zero start times in their PTS (Presentation Timestamp) values, which can cause audio and video to drift when remuxed into MP4. FFmpeg handles most of these cases automatically during conversion, but if you still experience sync issues, you can add the flag -async 1 to the command to force audio resampling that corrects drift. Severely corrupted TS recordings may require additional flags like -ignore_unknown or -fflags +discardcorrupt.
MP4 supports subtitle tracks and TS files can carry DVB subtitles or teletext, but the default FFmpeg command does not explicitly map subtitle streams. To include subtitles, add -c:s mov_text -map 0:s to the command before the output filename. Note that DVB bitmap subtitles from broadcast TS files cannot be directly converted to MP4 text subtitles without additional OCR processing — only text-based subtitle streams transfer cleanly.
To change video quality, adjust the -crf value: lower numbers mean higher quality and larger files (e.g., -crf 18 for near-lossless), while higher numbers reduce quality and file size (e.g., -crf 28 for smaller files). To change audio bitrate, replace 128k in -b:a 128k with your target, such as 192k or 256k for higher-quality audio — useful for TS files sourced from high-bitrate broadcasts with AC3 5.1 audio that you want to preserve at higher fidelity in AAC.
Yes. On Linux or macOS, run this loop in your terminal: for f in *.ts; do ffmpeg -i "$f" -c:v libx264 -c:a aac -crf 23 -b:a 128k -movflags +faststart "${f%.ts}.mp4"; 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.mp4". This is especially useful for converting entire folders of DVR recordings or HLS segment archives.
Technical Notes
Transport Stream files present several unique challenges when converting to MP4 that do not apply to container-to-container conversions like MKV to MP4. TS was designed for lossy transmission environments — the packetized structure includes redundancy and error-correction metadata that has no equivalent in MP4 and is discarded during conversion. Timestamps in broadcast TS files often start at large non-zero values (e.g., timestamps reset after midnight in broadcast schedules) or contain gaps from signal interruptions; FFmpeg normalizes these during the encode pass. The default command uses libx264 with CRF 23 and AAC at 128k, which covers most use cases, but TS files from high-definition broadcasts often carry AC3 (Dolby Digital) 5.1 audio — the conversion to stereo AAC at 128k will downmix and reduce audio fidelity noticeably. For broadcast content with 5.1 surround, consider using -b:a 256k or switching to -c:a libopus for better efficiency. Multiple audio tracks (common in multilingual broadcast TS files) are preserved with -map 0:a, but the default command maps the first audio track only. Chapters are not supported in TS but are supported in the output MP4 container, so chapter metadata can be added post-conversion if needed. The -movflags +faststart flag is essential for any MP4 destined for web use, as it enables playback before the file fully downloads.