DONT make any cuts to the TS file (yet), as information at the start of the recording is required to extract the subs and align them. In ProjectX, under 'Pre-settings - Subtitles', check one of the Unicode output options (e.g. UTF-8 or UTF-16) (either will work).
Sometimes you may record videos with your JVC camcorder or have some videos downloaded some from Internet. However, all these videos are in the TS format and can't be shared on Facebook, YouTube or can't be played with your phone. In this case, you can try a HD Video Converter (Windows 10/8 supported) to convert TS to MP4, the most widely used video format. You can also edit TS video before TS to MP4 conversion.
Part 1. Best TS to MP4 Video Converter for Windows / Mac (MacOS Catalina Included)
Your Complete Video Toolbox for Windows/Mac (Catalina Included)Wondershare UniConverter (originally Wondershare Video Converter Ultimate)
Your Complete Video Toolbox
- Convert TS to MP4, AVI, MKV, MP4, MOV, etc.
- Convert TS to iPhone, iPad, Samsung, YouTube, HTC with presets.
- Convert videos with ZERO quality loss, retaining 100% of your original video quality.
- Convert video formats 30 times faster than other video converters.
- Supported OS: Windows 10/8/7/XP/Vista, macOS 10.14 (Mojave), 10.13, 10.12, 10.11 10.10, 10.9, 10.8, 10.7, 10.6.
- Convert Video
- Edit Video
- Burn DVD
- Download Video
- Transfer Video
- More Tools
Steps on how to convert TS to MP4:
If you are a Windows user, just follow the tutorial below to convert TS to MP4 for Windows (Windows 10 supported). If you want to convert TS to MP4 on Mac (Mojave included), download Video Converter for Mac version. This Mac app converts TS format to MP4 format on Mac without losing the video quality and has super fast conversion speed which would save your time a lot.
Step 1 Add .TS files to the TS to MP4 converter.
You can click Add Files button to add TS files from computer folder or just drag & drop your TS videos to the file list directly.
Step 2 Select MP4 as output format.
Select MP4 as the output format from the categorized output formats list, go to click the drop down icon of Convert all files to: > Video > MP4, and then double-click detailed preset.
This TS to MP4 HD Video Converter (Windows 10 supported) allows you to edit the video files by trimming, cropping or adding special effects and watermarks, as well as merging several clips into one. You can just click one of the editing buttons under the imported video to personalize your TS video.
Step 3 Start converting TS file to MP4 file.
After everything is done, click Convert All at the bottom right corner to convert TS to MP4. And all the tasks will be done at fast speed and high quality. The conversion speed often depends on the original video size and your PC configuration. You can go to the Converted tab, right-click on the converted video and click Open File Location to get the converted vidoes.
Also, you can connect your iPod/iPhone, or other portable media player you own with PC, and transfer these MP4 files to it. You know most portable media player accepts MP4 format, such as iPod, iPhone, Walkman, PSP, Zune, Creative Zen, etc. Now, it's time to enjoy both of your downloaded or recorded .ts videos on your portable media player. Learn more about Transfer video >
Video Tutorial: How to Use This TS to MP4 Video Converter for Windows
Part 2. Free TS to MP4 Converter
# 1. Free Video Converter: Wondershare Free TS to MP4 Converter
This application can let you easily FREE convert TS MP4 without any effort. Just try it.
Pro:
1. 100% FREE, no extra fee.
2. Support all the powerful conversion features.
3. Download videos from YouTube.
Cons:
1. Compared with UniConverter (originally Wondershare Video Converter Ultimate), this free version can't convert videos with watermark.
2. It convert audio files with ads.
3. It can't support downloading videos from other 10,000 sites except YouTube.
Part 3. Online TS to MP4 Converter
You can use the free online TS to MP4 video converterOnline UniConverter (originally Media.io)below. It converts videos to almost any format.
Part 4. Extended Knowledge for TS and MP4 Format
File Extension | TS | MP4 |
---|---|---|
TS is a .ts is a transport stream, not really a container like an avi. It is used to broadcast high-definition TV (HDTV). | MP4 is a container format used to store video, audio, and subtitles data. Since stores like iTunes uses this container format, it is widely used with iPod and PlayStation (PSP), iPhone, iPad, etc. | |
Apple iTunes Windows Media Player | ||
Convert MP4 to ISO Convert MP4 to iPad Add Subtitles to MP4 Convert AVI to MP4 Convert M4V to MP4 | Detailed information on the MP4 file format How to Convert and Burn MP4 to DVD How to Play MP4 on Galaxy S4 How to Add Subtitles to MP4 Files How to Convert MP4 to iPad (iPad Air included) |
I am trying to add text subtitles to an .mp4 container using ffmpeg:
When I am trying to run this line, it gives me an error :
Nmber of stream maps must match number of output streams.
If I try to change the mp4 to mkv (although mp4 supports text subtitles), like this:
It correctly maps the streams, but gives an error :
Encoder (codec id 94210) not found for output stream #0.2
When I launch
I can see that srt codec is supported as decoder and encoder, however I am not sure what is used for mp4 and mkv subs encoding, and whether I need to switch it on or compile separately.
9 Answers
-vf subtitles=infile.srt
will not work with -c copy
The order of -c copy -c:s mov_text
is important. You are telling FFmpeg:
- Video: copy, Audio: copy, Subtitle: copy
- Subtitle: mov_text
If you reverse them, you are telling FFmpeg:
- Subtitle: mov_text
- Video: copy, Audio: copy, Subtitle: copy
Alternatively you could just use -c:v copy -c:a copy -c:s mov_text
in anyorder.
Use the libass
library (make sure your ffmpeg install has the library in the configuration --enable-libass
).
First convert the subtitles to .ass
format:
Then add them using a video filter:
You are trying to mux subtitles as a subtitle stream. It is easy but different syntax is used for MP4 (or M4V) and MKV. In both cases you must specify video and audio codec, or just copy stream if you just want to add subtitle.
MP4:
MKV:
MKV container supports video and audio codecs Virtually anything and also supports subtitles and DVD menus. So you can just copy codecs from input video to output video with MKV container with subtitles. First you should convert SRT to ASS subtitle format
and embed ASS subtitles to video
Also worked with VMW file.
see the wiki page Comparison of container formats
ffmpeg supports the mov_text
subtitle encoder which is about the only one supported in an MP4 container and playable by iTunes, Quicktime, iOS etc.
Your line would read:
ffmpeg -i input.mp4 -i input.srt -map 0:0 -map 0:1 -map 1:0 -c:s mov_text output.mp4
I tried using MP4Box for this task, but it couldn't handle the M4V I was dealing with. I had success embedding the SRT as soft subtitles with ffmpeg with the following command line:
ffmpeg -i input.m4v -i input.srt -vcodec copy -acodec copy -scodec copy -map 0:0 -map 0:1 -map 1:0 -y output.mkv
Like you I had to use an MKV output file - I wasn't able to create an M4V file.
I will provide a simple and general answer that works with any number of audios and srt subtitles and respects the metadata that may include the mkv container. So it will even add the images the matroska may include as attachments (though not another types AFAIK) and convert them to tracks; you will not be able to watch but they will be there (you can demux them). Ah, and if the mkv has chapters the mp4 too.
As you can see, it's all about the -map 0
, that tells FFmpeg to add all the tracks, which includes metadata, chapters, attachments, etc. If there is an unrecognized 'track' (mkv allows to attach any type of file), it will end with an error.
You can create a simple batch mkv2mp4.bat
, if you usually do this, to create an mp4 with the same name as the mkv. It would be better with error control, a different output name, etc., but you get the point.
Now you can simply run
And it will create 'Video with subtitles etc.mp4' with the maximum of information included.
This is the reason why mkv is such a good container, especially now that it's mature:
protected by lloganNov 18 '16 at 18:29
Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).
Would you like to answer one of these unanswered questions instead?