How can I find the movie name with HandBrake CLI?

I have not found this feature in the CLI myself. According to this: https://forum.handbrake.fr/viewtopic.php?f=6&t=15874#p74897 (opens from Help->Guide in my Handbrake), Handbrake (GUI) by default selects the longest title as this is usually the main feature.

If you supply 0 to the -t option for CLI, it will list all the titles so that you can select the longest.

Another technique I have used is what is described in the solution section in the forum post above, simply start the DVD in VLC and then check which title is playing.


What I have been doing is to use `lsblk', i.e. (replace /dev/sr0 with the device file of your DVD device):

lsblk -n -o LABEL /dev/sr0

lsblk is part of util-linux (at least on Ubuntu), so it should already be installed.

If you wish to, you can process the label to make it nicer (like making it lowercase, changing underscores to dashes):

lsblk -n -o LABEL  /dev/sr0 | tr '[:upper:]' '[:lower:]' | sed -e 's/_/-/g'