0

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?

Cal-linux
  • 111
  • 4
  • You sure you used hb 1.5.1 3 years ago? It's not that old. But it seems to be a VLC issue. Try "Advanced preferences" with the Video -> Subtitles -> Text renderer settings. Keep in mkind, that you have to stop and start the video for the changes to take effect. – stoney Aug 28 '23 at 09:25
  • No wait .... you seem to have misunderstood. With my current Ubuntu 22, I get HB 1.5.1; when I originally encoded these DVDs two or three years ago, that was with whatever version came with Ubuntu 18 (which I believe it was HB 1.3 — see my last paragraph before the screenshot showing the correct subtitles; BTW, it may have been whatever version I downloaded from handgrake.fr back then, I don't actually remember). By "Advanced Preferences", I guess you mean in HB, and not in VLC? (I don't see any "Advanced Preferences" in VLC) Notice that I am using the command-line version (HandBrakeCLI). – Cal-linux Aug 28 '23 at 11:56
  • You are running in 2 issues here: 1st Handbrake writes Subs with outline and shadows enabled (for easy readability with all sorts of backgrounds) and this is not easily changeable (only by splitting the subs and edit the font/outline/whatever). 2nd, vlc has issues switching the fonts/outline/shadows of these subs (most probably ass streams). Other players work. – stoney Aug 28 '23 at 12:39

0 Answers0