Hard and Soft Subtitles Guide

HandBrake for Windows support
Forum rules
An Activity Log is required for support requests. Please read How-to get an activity log? for details on how and why this should be provided.
Zoraji
Posts: 1
Joined: Wed Mar 11, 2015 11:40 pm

Re: Hard and Soft Subtitles Guide

Post by Zoraji » Wed Mar 11, 2015 11:45 pm

I am having the same issue on 10.1.6962 with Subtitles selecting Burn In by default and I have to untick that on every title I encode with Handbrake. I go to the Defaults and select English, but there is nowhere that allows me have Burn In unticked by default. Older versions of Handbrake didn't force the Burn In on me, I didn't have to go and uncheck it every single time.

gmartin7
Posts: 6
Joined: Tue Mar 31, 2015 5:27 pm

Re: Hard and Soft Subtitles Guide

Post by gmartin7 » Wed Apr 08, 2015 5:05 pm

I am trying to burn in Khmer subtitles onto an mp4. I'm using HandbrakeCLI and I get the following output:

...
[09:47:10] * subtitle track 1, Central Khmer (track 0, id 0xff) Text [SRT] -> R
ender/Burn-in, offset: 0, charset: UTF-8
[09:47:10] * audio track 1
[09:47:10] + decoder: Unknown (AAC) (2.0 ch) (track 1, id 0x1)
[09:47:10] + bitrate: 147 kbps, samplerate: 48000 Hz
[09:47:10] + mixdown: Stereo
[09:47:10] + encoder: AAC (libavcodec)
[09:47:10] + bitrate: 160 kbps, samplerate: 48000 Hz
[09:47:10] reader: first SCR 0 id 0x0 DTS -6000
[09:47:10] encavcodecInit: MPEG-4 ASP encoder
[09:47:10] sync: first pts is 6000
Encoding: task 1 of 1, 3.96 %[09:47:10] [ass] Glyph 0x1787 not found, selecting
one more font for (Arial, 80, 0)
[09:47:10] [ass] fontconfig: Selected font is not the requested one: 'Khmer UI'
!= 'Arial'
...

Most of the Khmer seems to work well (but then I can't read Khmer), but there are a few characters that are obviously not correct. When I look at the .srt file in Notepad++, the text looks fine (it's UTF-8 encoding). Is there any way to tell HandbrakeCLI to use a particular font when burning the subtitles?

Woodstock
Veteran User
Posts: 3185
Joined: Tue Aug 27, 2013 6:39 am

Re: Hard and Soft Subtitles Guide

Post by Woodstock » Wed Apr 08, 2015 5:44 pm

You have to have the specific fonts available on your system, or you'll get whatever Handrake can find that is "close". I've worked with some files where the necessary TrueType fonts were merged into the MKV as attachments, but that wouldn't apply to an SRT being loaded from a separate file.

Someone with more knowledge would have to answer whether or not you can simply put the TTF files in a specific place, or if they have to be registered with the operating system....

gmartin7
Posts: 6
Joined: Tue Mar 31, 2015 5:27 pm

Re: Hard and Soft Subtitles Guide

Post by gmartin7 » Wed Apr 08, 2015 8:43 pm

All the fonts are there on the system.

User avatar
Rodeo
HandBrake Team
Posts: 12160
Joined: Tue Mar 03, 2009 8:55 pm

Re: Hard and Soft Subtitles Guide

Post by Rodeo » Wed Apr 08, 2015 8:54 pm

SRT files don't usually specify fonts. You'd have to modify the source SRT to select a specific font…

gmartin7
Posts: 6
Joined: Tue Mar 31, 2015 5:27 pm

Re: Hard and Soft Subtitles Guide

Post by gmartin7 » Thu Apr 09, 2015 2:01 pm

I haven't found a way to select a specific font in the SRT file. At least nothing that HandbrakeCLI will recognize.

User avatar
Rodeo
HandBrake Team
Posts: 12160
Joined: Tue Mar 03, 2009 8:55 pm

Re: Hard and Soft Subtitles Guide

Post by Rodeo » Thu Apr 09, 2015 2:45 pm

IIRC you can use a font tag, though you may be better off using SSA tags (a hack which would only work in HandBrake though).

I suppose the cleanest way would be to convert your SRT file to SSA and set the font for the whole SSA subtitle file, then embed the subtitle file in the source before feeding it to HandBrake.

gmartin7
Posts: 6
Joined: Tue Mar 31, 2015 5:27 pm

Re: Hard and Soft Subtitles Guide

Post by gmartin7 » Thu Apr 09, 2015 4:10 pm

Skyping with a friend who knows about complex scripts, he said:
17be KHMER VOWEL SIGN OE gen cat Mc, Bidirectional=L
178f KHMER LETTER TA gen cat Lo Bidirectional = L
It's not a normalization issue.
I think it's a display issue. Some display systems probably don't know how to combine these two characters properly.
a Mc category is a Spacing_Mark = a spacing combining mark (positive advance width)
So the display system needs to be smart enough to recognize that MC and scoot the following character underneath the hat.
So I think it's not actually a font issue, but a rendering issue. As I mentioned before, Notepad++ displays it correctly, so maybe the rendering engine just needs updating somehow.

I installed some new Khmer fonts on my system, and I noticed in the subtitles that the font had changed, but the same rendering issue was there. That, and a change in the error message in HandbrakeCLI, lead me to believe that Handbrake is actually using the right font, just not rendering it properly.

User avatar
Rodeo
HandBrake Team
Posts: 12160
Joined: Tue Mar 03, 2009 8:55 pm

Re: Hard and Soft Subtitles Guide

Post by Rodeo » Thu Apr 09, 2015 4:40 pm

Sounds possible, though I have no clue how we'd go about fixing it then. Can you upload your subtitle file somewhere please?

gmartin7
Posts: 6
Joined: Tue Mar 31, 2015 5:27 pm

Re: Hard and Soft Subtitles Guide

Post by gmartin7 » Thu Apr 09, 2015 7:04 pm

https://dl.dropboxusercontent.com/u/709 ... HD-khm.srt

In the first subtitle, you'll see a word in Khmer and then the word "Bloom" and then another looong Khmer word that contains 5 diacritics on top of letters. The diacritic looks kind of like a curly hat. When I burn my subtitles onto my .mp4 to create a new .mp4, the first 3 of those hat diacritics show up above a dotted oval placeholder instead of over the appropriate letter. The same text in Word or Notepad++ is rendered correctly (as far as I can tell w/o being able to read Khmer!) :)

User avatar
Rodeo
HandBrake Team
Posts: 12160
Joined: Tue Mar 03, 2009 8:55 pm

Re: Hard and Soft Subtitles Guide

Post by Rodeo » Thu Apr 09, 2015 7:18 pm

OK, which subtitle packet should I be looking at, and may I have a screenshot of how it's supposed to look (as well as maybe an incorrect screenshot for comparison)?

gmartin7
Posts: 6
Joined: Tue Mar 31, 2015 5:27 pm

Re: Hard and Soft Subtitles Guide

Post by gmartin7 » Thu Apr 09, 2015 8:30 pm

Here's a screenshot of the first subtitle packet in MS Word and in the .mp4 generated by HandbrakeCLI:

https://dl.dropboxusercontent.com/u/709 ... apture.PNG

and comparing the two now I see there's something interesting going on with a subscripted '+' in the Handbrake subtitles that's apparently supposed to do something fascinating to the following glyph!

xRyoox
Posts: 1
Joined: Wed Apr 15, 2015 11:34 pm

Re: Hard and Soft Subtitles Guide

Post by xRyoox » Thu Apr 16, 2015 12:17 am

Could someone help me please I have no clue what I am doing, I'm just trying to soft sub this mp4 movie with an srt file. MPC can view just fine I can turn on and off the subtitle But the ipad doesn't read srt so i encode it in handbrake importing the srt file and leaving the offset and utf thing default language is english but the movie is japanese. once everything is done I can see that the subtitle is soft coded and I can turn on and off But nothing appear, not in mpc, wmp, itune, or quicktime, not even the ipad but the option to turn on and off still there. What am I doing wrong?

Woodstock
Veteran User
Posts: 3185
Joined: Tue Aug 27, 2013 6:39 am

Re: Hard and Soft Subtitles Guide

Post by Woodstock » Thu Apr 16, 2015 2:22 am

It would REALLY help to see the activity log from the encode. There are many possibilities, and rather than ask a lot of questions, the log will show what you did.

jjh76
Posts: 2
Joined: Sat May 02, 2015 4:51 am

Re: Hard and Soft Subtitles Guide

Post by jjh76 » Sat May 02, 2015 5:04 am

I'm trying to re-encode my videos so I can play them directly from a usb drive on my Roku 3. Since the roku doesn't handle subs very well I've been burning them in. If I load a folder and use "add all", only the first one gets the subs burned in - all the rest default to soft subs. Is there some setting in a config file or the windows registry that I can tweak to make it always burn in the subs?

Woodstock
Veteran User
Posts: 3185
Joined: Tue Aug 27, 2013 6:39 am

Re: Hard and Soft Subtitles Guide

Post by Woodstock » Sat May 02, 2015 3:28 pm

Does your preset include burning the subtitles in? "Add all" goes by the preset in use.

You change that on the subtitles menu by clicking on "switch to defaults", and setting the behaviour there. Then you can resave the preset, and the default to burn in will be applied to all files you process with that preset.

GregiBoy
Veteran User
Posts: 908
Joined: Sat Feb 12, 2011 9:23 pm

Re: Hard and Soft Subtitles Guide

Post by GregiBoy » Sat May 02, 2015 10:23 pm

Besides that, you can only "BURN IN" one track, not ALL.

Have a think about it!!!

jjh76
Posts: 2
Joined: Sat May 02, 2015 4:51 am

Re: Hard and Soft Subtitles Guide

Post by jjh76 » Mon May 04, 2015 7:50 am

I have already tried saving the burn-in option in the preset, but it wasn't actually saving it. After some further testing I found that if the preset is set to output to mp4 then it does save the burn-in setting and it works as expected. However, I want my files to be mkv, but it refuses to save the burn-in option to the preset when the output is set to mvk

Woodstock
Veteran User
Posts: 3185
Joined: Tue Aug 27, 2013 6:39 am

Re: Hard and Soft Subtitles Guide

Post by Woodstock » Mon May 04, 2015 2:10 pm

OK, maybe it's not "saving" the burn-in setting for EITHER MKV or MP4, but the type of subtitle being selected is limited to being burned in on MP4?

When I went back and looked at the menu itself, the Defaults page only covers selecting tracks. The other options (forced only, burn in, default) are on the non-defaults screen, which is NOT saved in the preset, from what I can see.

dasfoo
Posts: 1
Joined: Fri Jun 19, 2015 7:34 pm

Re: Hard and Soft Subtitles Guide

Post by dasfoo » Fri Jun 19, 2015 7:40 pm

Is there a way to control the size and alignment of hard-burned subtitles?

I have an MKV with embedded subs. I want to re-encode it with HB as an MP4 with hard-burned subs. However, when I do this (I've done it before without trouble on other files) the burned-in subs are huge and aligned to the right side of the frame. I'd like to make them a normal sub size and centered. They are so big they take up about the bottom third of the screen and don't wrap, so long subs get cut-off on the left.

When I watched the original MKV with embedded subs, the subs looked fine, but my player software probably overrode the size and alignment. Handbrake doesn't appear to do this, so they are wonky after I re-encode the movie.

Thanks!

Woodstock
Veteran User
Posts: 3185
Joined: Tue Aug 27, 2013 6:39 am

Re: Hard and Soft Subtitles Guide

Post by Woodstock » Fri Jun 19, 2015 11:37 pm

A lot depends upon the type of subtitles. If they're image subtitles (PGS or VOB), my experience is that they're scaled to match the new size when the video is resized.

Embedded text subtitles.... the ASS/SSA subtitles I've worked with seemed to render properly.

I'd suggest starting a separate thread with activity logs from encodes where the subtitles "went wrong" included.

fishZombie
Posts: 1
Joined: Sun Jul 12, 2015 2:55 pm

Re: Hard and Soft Subtitles Guide

Post by fishZombie » Sun Jul 12, 2015 3:02 pm

All the subtitle stuff seems straight forward to me. There was a button for BURN IN, and DEFAULT, and FORCED ONLY.
But... For some reason all that changed.
Not sure why it's doing this, but no matter what I click, it burns in the first subtitle in the list, and when played, there is no other selections for subtitles.
So now I have to convert the movie, and the subtitles separately, and then put everything in a folder.
This is super annoying. I liked having everything in one file.

Anyone know a workaround for this?

mduell
Veteran User
Posts: 6630
Joined: Sat Apr 21, 2007 8:54 pm

Re: Hard and Soft Subtitles Guide

Post by mduell » Sun Jul 12, 2015 7:55 pm

Forum rules
Activity Log is required for support requests. See Must Read: How To Get Questions Answered on These Forums for details


We have no idea what subs you have or what version you're on or what you're choosing without the encode log.

Woodstock
Veteran User
Posts: 3185
Joined: Tue Aug 27, 2013 6:39 am

Re: Hard and Soft Subtitles Guide

Post by Woodstock » Sun Jul 12, 2015 10:09 pm

And it would be best to start a new topic for your support question.

blueflowerhp
Posts: 1
Joined: Tue Dec 08, 2015 2:53 am

Re: Hard and Soft Subtitles Guide

Post by blueflowerhp » Tue Dec 08, 2015 3:32 am

Guys, I'm in need of some help here - I have an MP4 file and a separate SRT file. I need to hardcode the subs in for streaming.

I've verified that the subs work when playing on a local media player with sub file selected.

But no matter what I do, check UTF-8 and Burn in, no subs are being written into the new output MP4.

Any suggestions on what could be the issue? And how to fix?

Here is the activity log:

Code: Select all

HandBrake 0.10.2.7286 - 64bit Version
OS: Microsoft Windows NT 6.1.7601 Service Pack 1 - 64bit
CPU: Intel(R) Core(TM)2 Duo CPU     P8600  @ 2.40GHz
Ram: 7926 MB, 
GPU Information:
  NVIDIA GeForce 320M         - 8.17.12.6141
Screen: 1920x1080
Temp Dir: C:\Users\tiendq\AppData\Local\Temp\
Install Dir: C:\Program Files\Handbrake
Data Dir: C:\Users\tiendq\AppData\Roaming\HandBrake\HandBrake\0.10.2.7286

-------------------------------------------
CLI Query:  -i "C:\Users\tiendq\Downloads\LEGO® Youngest Builders - Let’s Build Happy.mp4" -t 1 --angle 1 -c 1 -o "C:\Users\tiendq\Downloads\LEGO® Youngest Builders - Let’s Build Happy Subs.mp4"  -f mp4  -w 1280 --crop 0:0:0:0 --loose-anamorphic  --modulus 2 -e x264 -q 20 --vfr -a 1 -E av_aac -6 dpl2 -R Auto -B 160 -D 0 --gain 0 --audio-fallback ac3 --srt-file "C:\\Users\\tiendq\\Downloads\\LEGO® Youngest Builders - Let’s Build Happy.srt" --srt-codeset UTF-8 --srt-offset 0 --srt-lang eng --srt-burn=1 --markers="C:\Users\tiendq\AppData\Local\Temp\LEGO® Youngest Builders - Let’s Build Happy Subs-1-chapters.csv" --encoder-preset=veryfast  --encoder-level="4.0"  --encoder-profile=main  --verbose=1

[10:27:32] hb_init: starting libhb thread
HandBrake 0.10.2 (2015060900) - MinGW x86_64 - https://handbrake.fr
2 CPUs detected
Opening C:\Users\tiendq\Downloads\LEGO® Youngest Builders - Let’s Build Happy.mp4...
[10:27:32] CPU: Intel(R) Core(TM)2 Duo CPU     P8600  @ 2.40GHz
[10:27:32]  - logical processor count: 2
[10:27:32] OpenCL device #1: NVIDIA Corporation GeForce 320M
[10:27:32]  - OpenCL version: 1.0 CUDA
[10:27:32]  - driver version: 261.41
[10:27:32]  - device type:    GPU
[10:27:32]  - supported:      no
[10:27:32] Intel Quick Sync Video support: no
[10:27:32] hb_scan: path=C:\Users\tiendq\Downloads\LEGOr Youngest Builders - Let's Build Happy.mp4, title_index=1
libbluray/bdnav/index_parse.c:162: indx_parse(): error opening C:\Users\tiendq\Downloads\LEGO® Youngest Builders - Let’s Build Happy.mp4/BDMV/index.bdmv
libbluray/bdnav/index_parse.c:162: indx_parse(): error opening C:\Users\tiendq\Downloads\LEGO® Youngest Builders - Let’s Build Happy.mp4/BDMV/BACKUP/index.bdmv
libbluray/bluray.c:2182: nav_get_title_list(C:\Users\tiendq\Downloads\LEGO® Youngest Builders - Let’s Build Happy.mp4) failed
[10:27:32] bd: not a bd - trying as a stream/file instead
libdvdnav: Using dvdnav version 5.0.1
libdvdread: Encrypted DVD support unavailable.
libdvdread:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.IFO failed
libdvdread:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.BUP failed
libdvdread: Can't open file VIDEO_TS.IFO.
libdvdnav: vm: failed to read VIDEO_TS.IFO
[10:27:32] dvd: not a dvd - trying as a stream/file instead
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'C:\Users\tiendq\Downloads\LEGO® Youngest Builders - Let’s Build Happy.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf54.63.104
  Duration: 00:01:00.09, start: 0.000000, bitrate: 1347 kb/s
    Stream #0.0(und): Video: h264 (Main), yuv420p, 1280x720 [PAR 1:1 DAR 16:9], 1217 kb/s, 25 fps, 90k tbn, 50 tbc (default)
    Stream #0.1(und): Audio: aac, 44100 Hz, stereo, fltp, 125 kb/s (default)
[10:27:32] scan: decoding previews for title 1
Scanning title 1 of 1, preview 1, 10.00 %[10:27:32] scan: audio 0x1: aac, rate=44100Hz, bitrate=125652 Unknown (AAC) (2.0 ch)
Scanning title 1 of 1, preview 5, 50.00 %[10:27:32] scan: 10 previews, 1280x720, 25.000 fps, autocrop = 0/0/0/0, aspect 16:9, PAR 1:1
[10:27:32] libhb: scan thread found 1 valid title(s)
+ title 1:
  + stream: C:\Users\tiendq\Downloads\LEGO® Youngest Builders - Let’s Build Happy.mp4
  + duration: 00:01:00
  + size: 1280x720, pixel aspect: 1/1, display aspect: 1.78, 25.000 fps
  + autocrop: 0/0/0/0
  + support opencl: no
  + support hwd: yes
  + chapters:
    + 1: cells 0->0, 0 blocks, duration 00:01:00
  + audio tracks:
    + 1, Unknown (AAC) (2.0 ch) (iso639-2: und)
  + subtitle tracks:
Reading chapter markers from file C:\Users\tiendq\AppData\Local\Temp\LEGO® Youngest Builders - Let’s Build Happy Subs-1-chapters.csv
[10:27:32] 1 job(s) to process
[10:27:32] starting job
[10:27:32] work: sanitizing track 1 mixdown Dolby Pro Logic II to Stereo
[10:27:32] sync: expecting 1502 video frames
[10:27:32] work: only 1 chapter, disabling chapter markers
[10:27:32] job configuration:
[10:27:32]  * source
[10:27:32]    + C:\Users\tiendq\Downloads\LEGOr Youngest Builders - Let's Build Happy.mp4
[10:27:32]    + title 1, chapter(s) 1 to 1
[10:27:32]    + container: mov,mp4,m4a,3gp,3g2,mj2
[10:27:32]    + data rate: 1347 kbps
[10:27:32]  * destination
[10:27:32]    + C:\Users\tiendq\Downloads\LEGOr Youngest Builders - Let's Build Happy Subs.mp4
[10:27:32]    + container: MPEG-4 (libavformat)
[10:27:32]  * video track
[10:27:32]    + decoder: h264
[10:27:32]      + bitrate 1217 kbps
[10:27:32]    + filters
[10:27:32]      + Framerate Shaper (0:27000000:1080000)
[10:27:32]        + frame rate: same as source (around 25.000 fps)
[10:27:32]      + Subtitle renderer (0:0:0:0)
[10:27:32]      + Crop and Scale (1280:720:0:0:0:0)
[10:27:32]        + source: 1280 * 720, crop (0/0/0/0): 1280 * 720, scale: 1280 * 720
[10:27:32]    + loose anamorphic
[10:27:32]      + storage dimensions: 1280 * 720, mod 2
[10:27:32]      + pixel aspect ratio: 1 / 1
[10:27:32]      + display dimensions: 1280 * 720
[10:27:32]    + encoder: H.264 (libx264)
[10:27:32]      + preset:  veryfast
[10:27:32]      + profile: main
[10:27:32]      + level:   4.0
[10:27:32]      + quality: 20.00 (RF)
[10:27:32]  * subtitle track 1, English (track 0, id 0xff) Text [SRT] -> Render/Burn-in, offset: 0, charset: UTF-8
[10:27:32]  * audio track 1
[10:27:32]    + decoder: Unknown (AAC) (2.0 ch) (track 1, id 0x1)
[10:27:32]      + bitrate: 125 kbps, samplerate: 44100 Hz
[10:27:32]    + mixdown: Stereo
[10:27:32]    + encoder: AAC (libavcodec)
[10:27:32]      + bitrate: 160 kbps, samplerate: 44100 Hz
[10:27:32] reader: first SCR 0 id 0x0 DTS -3600
[10:27:32] encx264: encoding at constant RF 20.000000
[10:27:32] encx264: unparsed options: level=4.0:ref=1:8x8dct=0:weightp=1:subme=2:mixed-refs=0:trellis=0:vbv-bufsize=25000:vbv-maxrate=20000:rc-lookahead=10
x264 [info]: using SAR=1/1
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.1 Cache64
x264 [info]: profile Main, level 4.0
[10:27:33] sync: first pts is 3600
[10:28:21] reader: done. 1 scr changes
[10:28:23] work: average encoding speed for job is 29.457806 fps
[10:28:23] sync: got 1500 frames, 1502 expected
[10:28:23] render: lost time: 0 (0 frames)
[10:28:23] render: gained time: 0 (0 frames) (0 not accounted for)
[10:28:23] h264-decoder done: 1500 frames, 0 decoder errors, 0 drops
x264 [info]: frame I:34    Avg QP:15.46  size: 46590
x264 [info]: frame P:726   Avg QP:19.27  size: 13915
x264 [info]: frame B:740   Avg QP:20.94  size:  3516
x264 [info]: consecutive B-frames: 27.2% 16.5% 13.6% 42.7%
x264 [info]: mb I  I16..4: 33.2%  0.0% 66.8%
x264 [info]: mb P  I16..4: 12.5%  0.0%  2.8%  P16..4: 29.3% 15.2%  7.7%  0.0%  0.0%    skip:32.4%
x264 [info]: mb B  I16..4:  1.3%  0.0%  0.2%  B16..8: 16.7%  4.9%  0.5%  direct: 4.6%  skip:71.8%  L0:39.6% L1:46.2% BI:14.2%
x264 [info]: coded y,uvDC,uvAC intra: 25.3% 50.4% 11.8% inter: 8.6% 14.2% 0.5%
x264 [info]: i16 v,h,dc,p: 44% 29% 16% 12%
x264 [info]: i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 33% 23% 20%  4%  4%  5%  4%  4%  3%
x264 [info]: i8c dc,h,v,p: 48% 23% 22%  7%
x264 [info]: Weighted P-Frames: Y:5.4% UV:3.7%
x264 [info]: kb/s:1905.13
[10:28:23] aac-decoder done: 0 frames, 0 decoder errors, 0 drops
[10:28:23] mux: track 0, 1500 frames, 14287214 bytes, 1903.69 kbps, fifo 2048
[10:28:23] mux: track 1, 2587 frames, 1206363 bytes, 160.74 kbps, fifo 2048
[10:28:23] libhb: work result = 0
Encode done!
HandBrake has exited.
Last edited by Rodeo on Tue Dec 08, 2015 11:51 am, edited 1 time in total.
Reason: Logs must be placed between [code][/code] blocks

Post Reply