Hello,
I would like to hardcode subtitle in .srt file to .mp4 video using HandBrakeCLI.exe. The srt file is saved as UTF-8.
So, I have a small test file "1.mp4", and would like subtitle "1.srt" to be hardcoded in a resulting "1 encoded.mp4" file. All the files are placed in "C:\tmp2" folder.
It works using VidCoder, but I can't seem to make it work via HandBrakeCLI.exe. I have 64-bit Win7 machine.
So, first, I tried this command line:
HandBrakeCLI.exe -i "C:\tmp2\1.mp4" -o "C:\tmp2\1 encoded.mp4" --preset="High Profile" --srt-file "C:\tmp2\1.srt" --srt-codeset UTF-8 --srt-burn
But I got "ERROR: Could not open the SRT subtitle file 'C:tmp21.srt'". So it seems like Handbrake missed all the backslashes in srt file path? Does anybody have a clue what is going on here?
After this, I placed HandBrakeCLI.exe in the same "C:\tmp2" folder, and tried specifying subtitle file "1.srt" without path:
HandBrakeCLI.exe -i "C:\tmp2\1.mp4" -o "C:\tmp2\1 encoded.mp4" --preset="High Profile" --srt-file "1.srt" --srt-codeset UTF-8 --srt-burn
This worked, and I got my "1 encoded.mp4" video without any errors, but also without any subtitles
Please, what am I doing wrong?
Thanks!
+ Reply to Thread
Results 1 to 5 of 5
-
-
Thank you, the command:
HandBrakeCLI.exe -i "C:\tmp2\1.mp4" -o "C:\tmp2\1 encoded.mp4" --preset="High Profile" --srt-file "C:\\tmp2\\1.srt" --srt-codeset UTF-8 --srt-burn
resulted in "1 encoded.mp4", but still no subtitles.
I repeat, the VidCoder works on the same files - so I would assume my arguments are faulty. Unfortunately, Google can't really find any examples on correct CLI argument format for this case, so I'm asking here. Does anybody have experience on burning srt to the video using HandBrakeCLI? -
Thank you for taking the time and making the video.
Your comment prompted me to suspect first on the HandBrakeCLI version, and then on its setup. I then realized that I didn't unzipped subfolders (doc and fonts), just the HandBrakeCLI.exe. When I unzipped fonts folder along the exe, everything works fine)
Thanks again for your help!
Similar Threads
-
ON MAC How to HARDCODE .srt subtitles onto .mp4 using VLC or Handbreak
By syrus11709 in forum SubtitleReplies: 9Last Post: 6th Feb 2016, 16:52 -
using XviD4PSP5 to hardcode srt with mp4
By babak.y in forum Newbie / General discussionsReplies: 6Last Post: 6th Mar 2014, 02:49 -
How to hardcode srt subtitle in 720p mkv.
By Haroon Khan in forum SubtitleReplies: 6Last Post: 20th Aug 2013, 09:20 -
Hardcode srt subs into avi file
By LegendX in forum SubtitleReplies: 1Last Post: 9th May 2013, 15:35 -
is there a software allows me to hardcode srt subs and change their size?
By HeartBreak_Kid in forum SubtitleReplies: 17Last Post: 2nd Jul 2012, 03:52