I have subtitles in .srt file format, and I need to render them on top of video file (prefereably mp4). I have tried handbrake and mediacoder so far, with no luck. What should I do?
With a recent version of ffmpeg (requires the subtitles to be in a separate file, due to current libavfilter limitations):
ffmpeg -i input.mp4 -filter:v subtitles=subtitle.srt -c:a copy -c:v libx264 -crf 22 -preset veryfast output.mp4
If your SRT subtitles are muxed into an MKV container, you can extract them like this:
ffmpeg -i input.mkv -map 0:s:0 subtitles.srt
1Can you provide proper links and documentation for the command line utility you mentioned above? Nov 18, 2014 at 20:02
1@FagnerBrack Docs link includes Command Line Tools Documentation Oct 19, 2015 at 17:04
2Please note that for this to work, ffmpeg needs to be compiled with
libasssupport as noted in these answers: superuser.com/a/869473 askubuntu.com/a/519207 See the ffmpeg build instructions on how to build the ffmpeg binary appropriately May 28, 2017 at 20:54
Here are three ways to burn subtitles onto video:
You must use or convert to an AVI file
The subtitle file (.srt) must be named the same exact name as the video file (AVI)
The video file and the subtitle (.srt) file should reside in the same folder.
I will link to the first method I discovered in June: https://blogs.princeton.edu/hrc/2010/06/how_to_burn_subtitles_into_a_video_file.html
The second method I used requires a Mac that has Toast Titanium. You will then have to download a free program called Perian: http://www.perian.org/ (make sure you have the latest version of both programs.
Method 2 (Mac): Using Toast Titanium (not free) with Perian (free)
Open Perian and keep Perian open before and while you either burn a DVD using Toast Titanium or burn a ISO (which is what I did). To see if Perian is doing it's job, open the AVI file in VLC (VideoLan Client) and see if subtitles show up (you can also check in Quicktime) when you play the video. If they do, you are ready to use Toast to burn the subtitles into the file.
Open Toast and choose DVD. Drop the AVI file into the space to burn. Don't drop the srt file, but make sure the srt file is in the SAME folder as the AVI video file. If you drop the srt file in Toast you will get an error, but Perian will work it's magic and burn the subtitles into the video, so no need to worry.
Choose either burn to DVD or Disc Image (Disc Image is at the bottom of the window where you dropped the video file into).
Burn the video. You will now either have an ISO or a burned DVD. The files will now be in a DVD structure (VOBs, etc). You can now use Handbrake to rip the ISO or DVD to convert the video into another format (like mp4).
*Note: My subtitles did get cut off when I converted the video into an mp4 using Handbrake, not sure why.
Method 3 (Windows): Any Video Converter (AVC-free)
Download and install AVC http://www.any-video-converter.com/products/for_video_free/.
Make sure your AVI and .srt files are in the same folder. For AVC, if you have an mp4, you can actually load the mp4 and not have to convert it into an AVI file before burning the subtitles into the file.
Drag and drop the video file into AVC.
For Output file, choose Customized AVI Movie (*.avi)
Highlight the file (by clicking on it) and under audio options (scroll to bottom) click on the drop down menu next to Subtitle.
The .srt file should appear in the drop down if the video file and the srt file are in the same folder. Choose the correct srt fie.
Choose the rest of your settings for the AVI and click Convert at the top of the program screen.
I hope this helps :-). Here are a few sources I used to figure these steps out and find these resources:
Please, remove the method 3. AVC free doesn't let you convert anything and prompt a screen to buy the ultimate version. Nov 18, 2014 at 19:59
Freemake would be my best choice. It gives you great flexibility and also enables you to add subtitles to your video also. There is a variety of codecs and formats available for your testing. Just give a try , after all its free na ? Here is the Link.
`.freemake: Free Video Converter with Subtitles Support
Convert DVD, MKV, MOV with embedded subtitles to any video format or device for free. Add SSA/SRT/ASS external subtitles to any video with our free video converter.`
says so in the official site.And they also says,
.freemake: Fastest Video Converter with CUDA and DXVA
Freemake is the only free video converter that features integrated both CUDA and DXVA technologies for the fastest ever video conversion and less CPU usage. The software automatically detects the optimal conversion parameters and switches on/off CUDA and DXVA for better conversion results.
I've just discovered Subler, which makes it super easy to add subtitles to an existing m4v file, and then burn that.