TS to MP4: What a .ts File Is and How to Convert It on Mac
What Is a TS File?
A .ts file is an MPEG transport stream, and converting TS to MP4 is how you get a TV recording, a downloaded stream or a DVR capture to play in Photos, iMovie, a browser or on a phone. The good news: most of the time the conversion is a lossless rewrap that takes seconds, not a slow re-encode.
(If your .ts file came out of a code project, it's TypeScript source code. Open it in a text editor; nothing in this guide applies.)
MPEG-TS (transport stream) is a container defined in the MPEG-2 Systems standard (ISO/IEC 13818-1) for broadcasting. It chops video, audio, subtitles and program data into small 188-byte packets, each with its own header, so a receiver can start decoding mid-stream and recover from lost or damaged packets. That design is why it shows up wherever video is transmitted rather than stored:
- TV broadcasts: DVB (Europe and much of the world), ATSC (North America) and ISDB (Japan, South America) all carry programs as transport streams.
- DVR and set-top box recordings: HDHomeRun, Plex DVR, Channels, TVHeadend and Enigma2 receivers (Dreambox, VU+) typically save recordings as
.ts. Enigma2 boxes add sidecar files like.ts.meta,.ts.apand.eit; you only need the.ts. - HLS streaming: Apple's HTTP Live Streaming delivers video as many short
.tssegments listed in an.m3u8playlist (newer streams may use fragmented MP4 segments instead). - OBS and screen capture: OBS Studio can record to MPEG-TS, which, unlike a plain MP4, stays playable if the recording crashes.
- Camcorders and Blu-ray:
.m2tsand.mtsfiles are the same format with a 4-byte timestamp added to each packet (192 bytes). If you have an AVCHD folder from a camera, our AVCHD to MP4 guide covers that structure.
TS vs MP4 at a glance
| MPEG-TS (.ts) | MP4 (.mp4) | |
|---|---|---|
| Designed for | Broadcast and streaming over lossy links | Files on disk, download and web playback |
| Typical video | MPEG-2, H.264, HEVC | H.264, HEVC, AV1 |
| Typical audio | MP2, AC-3, E-AC-3, AAC | AAC (AC-3 and others possible) |
| Subtitles | DVB bitmap subtitles, teletext | Text (mov_text) only |
| Survives truncation | Yes, plays up to the break | Not unless written in fragments |
| Plays in Photos, iMovie, browsers, phones | Inconsistently | Yes |
The key point for conversion: MP4 is just a different box. If the codecs inside the TS are ones MP4 handles well, you can move them across without touching a single frame.
The Quick Answer
To convert TS to MP4 on a Mac, install FFmpeg (brew install ffmpeg) and run ffmpeg -i input.ts -c copy output.mp4. That remuxes the H.264 or HEVC video and the audio into MP4 without re-encoding, so it's lossless and takes seconds. Re-encode only if the TS contains MPEG-2 video or MP2 audio.
How to Open a TS File on Mac
Before converting, check that the file plays and see what's inside.
- VLC (free) plays nearly any transport stream, lets you pick between audio tracks under Audio → Audio Track, and shows DVB subtitles under Subtitles → Subtitle Track. Window → Media Information → Codec Details tells you the codecs, which decides how you convert.
- IINA (free, open source, built on mpv) is a more Mac-like player that handles the same files, including multiple audio and subtitle tracks.
- QuickTime Player is better with TS than its reputation suggests. On a current macOS release, our test files (one H.264/AAC transport stream and one MPEG-2/MP2 stream mimicking a European broadcast recording) both opened and played. Older macOS versions, damaged recordings and files with unusual streams can still trigger "The file isn't compatible with QuickTime Player," and QuickTime won't show DVB subtitles.
If a TS plays fine in VLC but nowhere else, that's the cue to convert it. A fully black picture with sound in every player usually means the recording was encrypted by the box that made it; no converter can fix that.
Remux or Re-encode? Check the Codecs First
The right TS to MP4 method depends on what's inside. Run ffprobe (installed alongside FFmpeg):
ffprobe -hide_banner input.ts
Look at the Stream #0:x lines and use this table:
| Video in the TS | Audio in the TS | What to do |
|---|---|---|
| H.264 | AAC | Remux with -c copy. Lossless, seconds. |
| H.264 or HEVC | AC-3 / E-AC-3 | Remux; add AAC if a player is silent |
| HEVC | Any | Remux with -tag:v hvc1 so macOS recognizes it |
| MPEG-2 | MP2 or AC-3 | Re-encode video to H.264/HEVC, audio to AAC |
Any interlaced (1080i, 576i, "top first") | Any | Remux works; re-encode with a deinterlacer if you see comb lines |
US over-the-air recordings (ATSC 1.0) are almost always MPEG-2 video with AC-3 audio. European SD channels are usually MPEG-2 with MP2; HD channels are H.264 or HEVC. HLS segments and OBS recordings are usually H.264 with AAC, the easy case.
How to Convert TS to MP4 with FFmpeg (Lossless Remux)
FFmpeg is the fastest and most precise TS to MP4 converter, and it's free. Install it with Homebrew:
brew install ffmpeg
Then remux:
ffmpeg -i input.ts -c copy output.mp4
-c copy tells FFmpeg to copy every selected stream as-is. A one-hour recording converts in about the time it takes to read the file from disk, and the picture is bit-for-bit identical.
What about -bsf:a aac_adtstoasc? Older guides insist on it. AAC inside a transport stream uses ADTS headers that MP4 doesn't allow, and this bitstream filter strips them. Current FFmpeg inserts it automatically when writing MP4 or MOV (the FFmpeg docs say so, and our test output was identical with and without it). It's harmless to add for older FFmpeg builds:
ffmpeg -i input.ts -c copy -bsf:a aac_adtstoasc output.mp4
HEVC recordings need one extra flag so Finder, Quick Look and QuickTime recognize the video:
ffmpeg -i input.ts -c copy -tag:v hvc1 output.mp4
Keep every audio track. By default FFmpeg picks one video and one audio stream. To keep all audio tracks (for example a second language or audio description):
ffmpeg -i input.ts -map 0:v:0 -map 0:a -c copy output.mp4
Convert a whole folder of recordings, keeping the original names:
for f in *.ts; do ffmpeg -n -i "$f" -c copy "${f%.ts}.mp4"; done
-n skips any file that already has an MP4, so you can safely re-run it.
When You Need to Re-encode TS to MP4
Remuxing MPEG-2 video into MP4 technically works, but many apps, phones and browsers won't play MPEG-2 in an MP4, and MPEG-2 files are large. MP2 audio has the same problem. Re-encode those:
ffmpeg -i input.ts \
-map 0:v:0 -map 0:a:0 \
-vf bwdif=mode=send_frame \
-c:v libx264 -crf 20 -preset medium \
-c:a aac -b:a 192k \
-movflags +faststart \
output.mp4
bwdif=mode=send_framedeinterlaces broadcast video (1080i, 576i, 480i) while keeping the frame rate. Drop the filter for progressive sources like 720p or HLS streams.-crf 20is H.264's quality setting; 18-22 is a sensible range for broadcast sources. Lower is better and bigger.-c:a aacconverts MP2 or AC-3 to AAC, which plays everywhere. Our AAC codec explainer covers bitrates.-movflags +faststartputs the index at the front so the file starts playing immediately on the web.
For faster hardware encoding on a Mac, swap in Apple's VideoToolbox encoder: -c:v hevc_videotoolbox -q:v 60 -tag:v hvc1. MPEG-2 to HEVC typically shrinks a recording dramatically. Our HEVC vs H.264 comparison explains the size and compatibility trade-off, and how to compress video with FFmpeg goes deeper on CRF and presets.
How to Combine TS Files into One MP4
Downloaded HLS streams and some recorders leave you with dozens or hundreds of numbered .ts segments. There are three ways to join them, from best to simplest.
1. Use the playlist if you have it. FFmpeg reads .m3u8 playlists directly and joins the segments in the right order:
ffmpeg -i index.m3u8 -c copy output.mp4
If the playlist sits on your disk but lists https:// segment URLs, FFmpeg may refuse with "not on whitelist." Add -protocol_whitelist file,http,https,tcp,tls,crypto before -i.
2. Use the concat demuxer. Write a list of the segments, sorted numerically so segment10.ts doesn't land before segment2.ts:
ls segment*.ts | sort -V | sed "s/.*/file '&'/" > list.txt
ffmpeg -f concat -safe 0 -i list.txt -c copy output.mp4
The concat demuxer reads each file in turn and adjusts timestamps between them, so it copes with segments whose clocks restart. All segments must share the same codecs and resolution.
3. Byte-join with cat. Transport streams were designed to be cut and spliced, so segments from one continuous stream can simply be glued together:
cat $(ls segment*.ts | sort -V) > joined.ts
ffmpeg -i joined.ts -c copy output.mp4
This is quick, but if the segments came from different recordings or the stream had ad breaks or discontinuities, you'll get timestamp warnings and seeking glitches. Use the concat demuxer in that case. We tested all three methods on a set of HLS segments; each produced a complete, playable MP4.
Only download and join streams you have the right to keep. Protected streams (FairPlay, Widevine or encrypted keys you don't have) won't decrypt with these commands.
Convert TS to MP4 with HandBrake
HandBrake is the friendliest option if you'd rather not use Terminal, and the right choice for MPEG-2 recordings you want to shrink. It always re-encodes the video, so it's slower than a remux but produces smaller files.
- Open HandBrake and choose your
.tsfile (or a folder of them) as the source. - Pick a General preset that matches the source: Fast 1080p30 for HD recordings, Fast 720p30 for 720p channels, Fast 576p25 or Fast 480p30 for SD.
- Check Format is set to MP4.
- On Filters, leave Interlace Detection on and set Deinterlace to Decomb or Bwdif for broadcast material.
- On Audio, confirm the right language track is selected; add others if you want them.
- On Subtitles, add the DVB subtitle track and tick Burn In if you need subtitles always visible.
- Click Start.
HandBrake treats each .ts as a separate title, so join HLS segments with FFmpeg first. Our guides to using HandBrake and the best HandBrake settings cover the quality controls in detail.
Convert TS to MP4 with VLC or OBS
VLC can convert a single file: File → Convert / Stream, drop in the .ts, choose the Video - H.264 + MP3 (MP4) profile, click Save as File, and give it a .mp4 name. It re-encodes everything and offers few quality controls, so use it for one-off files. See how to convert to MP4 with VLC for the full walk-through.
OBS Studio has a built-in lossless remuxer: File → Remux Recordings, add your .ts recording, and click Remux. It's the same -c copy operation, inside the app you recorded with. Our OBS recording settings guide covers choosing a crash-safe format in the first place.
Troubleshooting TS to MP4 Problems
Timestamp errors: "Non-monotonic DTS" or "pts has no value"
Broadcast recordings often start mid-stream, include a glitch from weak reception, or splice two programs. Ask FFmpeg to regenerate missing timestamps and shift the start to zero:
ffmpeg -fflags +genpts -i input.ts -c copy -avoid_negative_ts make_zero output.mp4
If the result still stutters or won't seek, re-encode (the command above, with -c:v libx264) instead of copying. A badly damaged file may need more help; see how to fix corrupted video.
No sound, or the wrong language
List the audio streams with ffprobe input.ts. Broadcasts often carry several: main audio, audio description, a second language. Map the one you want explicitly, such as -map 0:v:0 -map 0:a:1 for the second track, and re-encode MP2 to AAC with -c:a aac. If FFmpeg reports a stream with no codec parameters, add -probesize 100M -analyzeduration 100M before -i so it reads further into the file.
Subtitles disappear
DVB subtitles are bitmaps, and MP4 only supports text subtitles, so -c copy drops them. Either burn them into the picture (HandBrake's Burn In, or FFmpeg's overlay filter: -filter_complex "[0:v:0][0:s:0]overlay[v]" -map "[v]" -map 0:a:0 with a video encoder), or keep them switchable by converting to MKV with -map 0 -c copy. Our MKV to MP4 and MKV vs MP4 guides explain that trade-off. Teletext subtitles (common on UK and European channels) need an FFmpeg build with libzvbi; the standard Homebrew build we tested doesn't include that decoder.
The MP4 plays but won't preview in Finder
That's HEVC tagged as hev1. Re-run the remux with -tag:v hvc1.
Other Formats You Might Be Converting
DVD files? See VOB to MP4. Files from a professional camera or broadcast workflow? Our MXF file guide covers that container. For anything else, start with how to convert video to MP4.
Shrink Large TS Recordings with Compresto
Broadcast recordings are big: an hour of HD TV can easily run to several gigabytes, and a remux keeps every one of those bytes. Once you have an MP4, Compresto can shrink it. It's a native Mac app that re-encodes video with hardware-accelerated H.264 or HEVC, compresses whole folders of recordings in one batch, and can aim each file at an exact target size when you need to fit a drive, an upload limit or an email. Everything runs locally, so nothing is uploaded.
To be clear about where it fits: Compresto works on the MP4 you've created. Do the TS to MP4 step itself with FFmpeg, HandBrake, VLC or OBS. For more ways to cut down big recordings, see how to compress large video files.
Frequently Asked Questions
What is a TS file?
An MPEG transport stream: a broadcast container that splits video, audio and subtitles into 188-byte packets. TV and DVR recordings, HLS streaming segments, IPTV captures and some OBS recordings use it. A .ts in a code project is TypeScript.
How do I convert TS to MP4 without losing quality?
Remux with ffmpeg -i input.ts -c copy output.mp4. It copies the H.264 or HEVC video and audio into MP4 without re-encoding. Add -tag:v hvc1 for HEVC.
Can QuickTime play TS files on a Mac?
Often, on a current macOS: our H.264 and MPEG-2 test streams both opened. Older versions and some recordings still fail. VLC and IINA play almost any .ts, including extra audio tracks and DVB subtitles.
How do I combine TS files into one MP4?
Run ffmpeg -i index.m3u8 -c copy output.mp4 if you have the playlist. Otherwise list the segments in a text file and use ffmpeg -f concat -safe 0 -i list.txt -c copy output.mp4, or cat segments from one continuous stream together first.
Why does my converted MP4 have no sound or the wrong language?
FFmpeg picks one audio track by default. Check the tracks with ffprobe, map the one you want (-map 0:a:1) or all of them (-map 0:a), and re-encode MP2 audio to AAC.
Is it safe to just rename a .ts file to .mp4?
No. Renaming doesn't change the container. Remuxing with -c copy takes about as long as copying the file and produces a real MP4.
The Short Version
A .ts file is a broadcast container, not a special codec. Remux H.264 or HEVC recordings with -c copy, re-encode MPEG-2 and MP2 recordings to H.264/HEVC with AAC, join HLS segments via the playlist or concat demuxer, then compress the MP4s if they're still too big.