To convert TS to MP4 without losing quality, drop the .ts file above and press Convert to MP4. The page copies the H.264 video and AAC sound from the transport stream into an MP4 file without re-encoding them, so the picture and sound keep their original quality. Several files are joined in order. Nothing leaves your device.
How to convert TS to MP4
- Add the files. Press Choose .ts files or drop them on the box.
.ts,.m2tsand.mtsare accepted. You can also paste ahttps://link to a .ts file. - Check what the page found. Each file shows its size, its estimated duration and its codecs, read from the first and last 2 MB of the file. If a codec cannot be converted in the browser, the page says so before anything is converted and gives the ffmpeg command instead.
- Set the order. Several files are sorted by name in natural order, so
part2.tscomes beforepart10.ts. The arrows move a file up or down. - Press Convert to MP4. In Chrome and Edge on a computer, you choose where to save and the MP4 is written to disk while it is made. In other browsers it is assembled in memory, then downloaded.
The files are read in 4 MB pieces, so even a recording of several gigabytes is never loaded whole. Cancel stops at once and discards what was written.
Why the conversion is lossless
TS (MPEG transport stream) and MP4 are containers: they say how the video and sound are packed, not how they are compressed. The pictures inside a typical .ts file are H.264 and the sound is AAC, and both fit in an MP4 as they are. Converting TS to MP4 is therefore a remux: the page unpacks the compressed frames from the 188-byte TS packets and repacks them into MP4 boxes, with their timestamps. Nothing is decoded or compressed again.
Three consequences follow. The quality is exactly the original, frame for frame. The conversion is fast, because copying bytes is far cheaper than encoding video. And the MP4 is about the size of the TS, usually a little smaller, since MP4 has less packaging overhead than a stream of small packets.
Online converters that upload your file often re-encode it, which is slower and costs quality, and they cap the size. A remux needs neither.
The output is a fragmented MP4, the layout streaming sites use, which can be written while it is made. Current players and browsers read it. If an old editor refuses it, one command rewrites it as a classic MP4 in seconds, still without re-encoding:
ffmpeg -i "video.mp4" -c copy -movflags +faststart "video-classic.mp4"
TS vs MP4: what is the difference?
| TS (.ts, .m2ts, .mts) | MP4 (.mp4) | |
|---|---|---|
| Made for | Broadcasting, recording, HLS streaming | Playing, editing, sharing, uploading |
| Structure | A continuous stream of 188-byte packets (192 in .m2ts) | An index of the samples plus the media data |
| If the file is cut | Still plays up to the cut, from any point | A plain MP4 may not open; a fragmented MP4 plays up to the cut |
| Overhead | Higher: a header in every packet | Lower |
| Support | VLC, ffmpeg, most TVs; poorly in browsers, phones and upload forms | Everywhere |
| Quality | The same: both carry the same codecs (H.264, HEVC, AAC...) | |
Is TS better than MP4? For recording, yes: a capture that crashes or a download that stops halfway still leaves a playable .ts. For everything after the recording, MP4 is the better choice, which is why so many tools save to TS first and convert later.
Joining several .ts files into one MP4
Add every file at once. The page treats the list as one video, in the order shown, and writes one MP4. It follows the timestamp of every video frame, across files and inside each file:
- Segments of one stream (pieces of an HLS download, a recording split by size) carry timestamps that follow each other. They are joined on one timeline, as if they had never been cut, including segments that do not start on a keyframe.
- Separate recordings each start their own clock. Each file is placed right after the previous one. When the sound of a file runs a little longer than its picture, the next file starts after the sound, so the last frame stays on screen for that moment (under a tenth of a second in our tests).
- Jumps inside a file: files glued together with
catorcopy /b, or a live recording whose clock starts again, are handled the same way: the part after the jump is placed right after the part before it. A jump forward of more than 5 seconds is closed too. - Repeated parts: a segment saved twice, or segments that overlap, would repeat a few seconds. Frames whose timestamp was already written are skipped, so each moment appears once.
All the files must share the same layout: H.264 video, AAC sound or no sound in all of them, and the same picture size and sound settings. One MP4 cannot switch its picture size halfway; if a file differs, the conversion stops and the ffmpeg command takes over. With ffmpeg, joining files uses a list:
# list.txt
file 'part1.ts'
file 'part2.ts'
file 'part3.ts'
ffmpeg -f concat -safe 0 -i list.txt -c copy "part1.mp4"
When the sound is AC-3, MP2 or MP3, or the video is HEVC
The browser remux relies on mux.js, which handles H.264 video and AAC sound, the pair found in most .ts files from the web and HLS streams. TV recordings and cameras often use something else: AC-3 (Dolby Digital) or MP2 sound from DVB and ATSC broadcasts, AC-3 from AVCHD camcorders, HEVC (H.265) video from recent devices.
The page reads the stream table of every file before converting. When it finds one of these codecs, it stops before writing anything, says which codec is the problem and prints the ffmpeg command for your files. Most of them still need no re-encoding, because MP4 can hold them:
ffmpeg -i "recording.ts" -c copy "recording.mp4"
For HEVC the command adds -tag:v hvc1, which Apple players need to recognize the video. For codecs MP4 cannot hold as they are (LPCM or TrueHD from Blu-ray, AAC in LATM framing), it copies the video and converts only the sound to AAC with -c:v copy -c:a aac -b:a 192k. When a file has several sound tracks and one is AAC, the page converts it with the first AAC track and says which tracks are left out. Subtitles and teletext are not carried over.
Converting a .ts that came from an M3U8 stream
HLS streams deliver video as many short .ts segments listed in an .m3u8 playlist. If you saved the segments yourself, add them all here: they are sorted in natural order and joined on one timeline. If you only have the link to the playlist, there is no need to download the segments first: the M3U8 to MP4 converter reads the playlist, downloads the segments and decrypts AES-128 in one go. If the link does not work, the M3U8 tester tells you why (expired link, server that refuses other sites, DRM) before you try anything else.
A .ts recorded from a live stream with ffmpeg converts the same way. If the recording was cut, the .ts still plays up to the cut, and so does the MP4 made from it.
Other ways: ffmpeg and VLC
ffmpeg
The command shown under the converter is built for your files and in your order, and its -map options keep the same tracks as the page: the video and the first AAC sound track. -c copy is the important part: without it, ffmpeg re-encodes the video. ffmpeg is the right tool for codecs the browser cannot remux and for batches of many files.
VLC
In VLC, open Media > Convert / Save, add the .ts file, press Convert / Save and choose a profile with MP4 as the encapsulation. Edit the profile and tick Keep original video track in the Video codec tab and Keep original audio track in the Audio codec tab, then pick a destination file ending in .mp4. Without those two options, VLC re-encodes the video, which takes much longer and loses quality.
Limits
- Codecs. H.264 video with AAC sound, or H.264 without sound. Everything else gets the ffmpeg command.
- Memory. Chrome and Edge on a computer write to disk as they go. Other browsers keep the MP4 in memory: the page warns above 500 MB and stops at 1 GB (300 MB on phones).
- Links. A pasted link works only if its server lets other sites read the file (CORS) and does not need cookies, which a web page cannot send. Otherwise, download the file first or use the ffmpeg command.
- Several programs. A TV recording that carries several channels converts the first one.
- Encrypted or damaged files. A scrambled pay-TV recording, a file with no stream table or a video without timestamps cannot be converted; the page says so before converting instead of writing an empty file.
- Sound before the first picture. When a recording starts its sound before its first video frame, that lead-in (about half a second in our tests) is left out, so picture and sound start together.
- Duration of large files. The duration shown before converting comes from the start and the end of each file. If the timestamps jump somewhere in the middle of a large file, the exact duration is shown once the conversion is done.