If you’ve ever downloaded a video file using a popular download manager such as IDM or JDownloader, you might have received a TS (Transport Stream) video file from the server.
If you want your video file to be in MP4 or any other file format, you can’t force the server to deliver it in that format, and most download managers do not offer an option to convert the file after downloading.
So, here you can take advantage of some CLI as well as GUI tools to convert your “.ts” video files to “.mp4” or any other file format you desire.
Tutorial Details
Description | Convert TS File to MP4 File Format |
Difficulty Level | Low |
Root or Sudo Privileges | No |
OS Compatibility | Windows, macOS, and Linux |
Prerequisites | FFmpeg, LosslessCut, VLC |
Internet Required | No |
When to Convert a TS File to an MP4 File Format
Modern video players can effortlessly handle TS video files without any problems. However, some codec issues may arise, as seen in VLC Media Player, which experiences lag when skipping forward or backward with TS files.
If your system has good hardware specs, you might experience a slightly choppy playback issue, but for a potato PC, it could be a terrible experience, and in that case, converting it to MP4 or any other format would be the best choice.
How to Convert TS File to MP4 File Format via CLI and GUI
There would be many options to convert your TS file to MP4 format, but I’ve given you my favorite and the one most recommended by others—starting with the CLI, which offers the most options and convenience.
Converting TS to MP4 Using FFmpeg (CLI)
FFmpeg is a robust cross-platform CLI tool that provides a range of options for multimedia processing, including the capability to convert any media file to its supported file formats.
So, to convert your desired TS file to MP4 file format, simply execute the following command, replacing “input_file.ts
” and “output_file.mp4
” with your desired filename.
$ ffmpeg.exe -i input_file.ts -c copy output_file.mp4
If you have multiple TS files and other content mixed, and you only want to convert all your TS files to MP4 file format (or any other), you can use the following command:
$ for i in *.ts; do ffmpeg -i "$i" -c copy "${i%.ts}.mp4"; done
The above command might be a bit tricky to understand, so here is the breakdown.
for i in *.ts; do ...
: This loop iterates over all files with a “.ts
” extension in the current directory.ffmpeg -i "$i" -c copy "${i%.ts}.mp4"
: This is the “ffmpeg
” command for each iteration. It takes the input file ‘-i "%i"
‘, uses the same codecs as the input file “-c copy
“, and sets the output file name to be the same as the input file but with the “.mp4
” extension.
If you wish to use custom codecs for the output file, you can refer to the following command examples on how to achieve that with your desired options.
1. If your TS file uses H.264 video and AAC audio:
$ ffmpeg -i input_file.ts -c:v libx264 -c:a aac output_file.mp4
2. If you want to control the video bitrate to 2 Mbps:
$ ffmpeg -i input_file.ts -c:v libx264 -c:a aac -b:v 2M output_file.mp4
Converting TS to MP4 Using VLC Media Player (GUI)
The VLC Media Player has a built-in file converter—surprised? To learn more about its diverse list of features, check out our dedicated article.
This method is recommended for those who already have VLC installed on their system and are ready to sacrifice some time for conversion. If you are comfortable trying a new tool, then check out the next section, which can convert your TS file to MP4 at a faster rate.
Now, to convert your desired TS file to MP4 using VLC, launch VLC and navigate to the “File” -> “Convert / Save…” option or use the “Ctrl +R” shortcut key.
It will launch the following window; you need to click on the “Add” button to select the file with the TS format, and the file will be listed in the “File Selection” column.
Finally, click on the “down arrow” next to the “Convert / Save” button, and from the dropdown, select the “Convert” button, or you can alternatively use the “Alt+O” shortcut key.
Now, the Convert window will appear. From here, choose the “destination location” for the output file (the default format would be MP4), and then click the “Start” button to begin.
Once the process is initiated, your VLC player will pop up, and its progress bar will run as if a video is playing. However, behind the scenes, it’s converting your desired TS file to MP4.
Once this process is complete, you will discover the output file in MP4 format at the designated destination location.
Converting TS to MP4 Using LosslessCut (GUI, Recommended)
LosslessCut is an incredible free, open-source, and cross-platform video editing tool that can convert your TS file to MP4 (or any other format) at a faster rate than VLC can achieve.
If you haven’t installed this tool on your system, you can refer to our dedicated article for guidance and then easily launch, open, or drag and drop the TS video file onto the application.
In the above picture, it indicates that the file is not natively supported. You can simply ignore that and click directly on the “Export” button, which will prompt the following window.
Here, ensure that the output format is set to MP4, the output path is configured to the location where the output file will be saved, and then click on the “Export” button to convert the TS file to MP4 using LosslessCut.
Finally, when the process completes, it will prompt a warning message that you can simply close.
You can now close the LosslessCut window and navigate to the output directory, where you’ll discover your MP4 file with a name identical to this: “input_file-00.00.00.000-00.44.33.847.mp4
“.
Final Word
I hope this article has helped you successfully convert your TS file to MP4 with ease. If you encounter any problems, have questions, or have requests, please let us know in the comment section, as we are always at your service.
Till then, peace!
Join The Conversation
Users are always welcome to leave comments about the articles, whether they are questions, comments, constructive criticism, old information, or notices of typos. Please keep in mind that all comments are moderated according to our comment policy.