VideoHelp Forum




+ Reply to Thread
Results 1 to 5 of 5
  1. 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!
    Quote Quote  
  2. Use

    --srt-file "C:\\tmp2\\1.srt"
    Quote Quote  
  3. 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?
    Quote Quote  
  4. Works fine here. Both Windows Vista HB x32 and Windows 8.1 HB x64.
    Image Attached Files
    Quote Quote  
  5. 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!
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!