Sample Header Ad - 728x90

Subtitles generated by HandBrake are "wrong" in version 1.5.1

0 votes
0 answers
134 views
After upgrading to Ubuntu 22.04, which includes Handbrake 1.5.1, the subtitles generated by HandBrakeCLI seem wrong — at least when played with VLC version 3. They have a fixed (to my taste ugly) font that I cannot change, and they show a *big* shadow that I cannot remove. This is an example (snapshot from actual Buffy converted DVD shown under _Fair Use_ provision): enter image description here These are the settings (actual screen capture of the settings dialog box): enter image description here You can see that there is no shadow, no outline, the configured font is DejaVu Sans, which is not what the actual subtitles show. Notice: the subtitles are not "burned" onto the video — I can enable/disable them. The workflow to go from my DVDs to individual .mkv files for each episode is as follows: - Run dvdbackup --mirror to create an image of the DVD on my hard drive (directory Buffy-S2D2, subdirectory VIDEO_TS and so on). - Then, run the following script to use HandBrakeCLI to encode the episodes:
#!/bin/bash
    
SHOW="Buffy"
SEASON="2"
DISC="2"
    
SRC="/home/cal-linux/Videos/Buffy-S$SEASON""D$DISC"
    
DIR="/home/cal-linux/tv/Buffy-the-Vampire-Slayer"
QUALITY=16.0
HIGHQUALITY=12.0
    
T1="05--Reptile-Boy"
T2="06--Halloween"
T3="07--Lie-to-Me"
T4="08--The-Dark-Age"
    
Q1=$QUALITY
Q2=$HIGHQUALITY
Q3=$HIGHQUALITY
Q4=$QUALITY
   
CC1=HandBrakeCLI --scan -i $SRC -t 1 2>&1 | grep "Closed Caption" | grep -v VOBSUB | cut -f2 -d"+" | cut -f1 -d","
CC2=HandBrakeCLI --scan -i $SRC -t 2 2>&1 | grep "Closed Caption" | grep -v VOBSUB | cut -f2 -d"+" | cut -f1 -d","
... (same for the remaining episodes)

## The above commands, in this case for this DVD, assign 4 to each of the variables CC1 to CC4 (that happens to be the "track number" for the English captions)

HandBrakeCLI --decomb --deinterlace --markers -e x264 --quality $Q1 --two-pass --no-turbo --encoder-level 5.2 --encoder-preset veryslow --subtitle $CC1 -i $SRC -t 1 -o "$DIR/$SHOW-S$SEASON""E$T1.mkv"
.... (similar for the other three episodes)
The thing is, this is the _exact same script_ that I had used two or three years ago to encode these same DVDs — except for the --decomb --deinterlace switches (my recent discovery/noticing these features is what prompted me to repeat the encoding of my Buffy DVDs). When I encoded these DVDs something like two or three years ago (back then, running Ubuntu 18.04, which I believe included Handbrake 1.3), the subtitles worked as expected. Now, re-doing the same DVDs with the same command (other than decombing and deinterlacing), the subtitles come out "wrong". This is a sample (a screenshot, taken just now) of one of the originally encoded files, showing the subtitles as they should show (i.e., respecting the settings of the player): enter image description here I'm puzzled as to why this is happening, but more importantly I'm interested in: how do I fix it?
Asked by Cal-linux (121 rep)
Aug 28, 2023, 02:13 AM