When using HandBrake, it found it quite a nice feature that it can recognize the correct movie name that is on a DVD (of course not all, but a lot). When using HandBrake CLI, I could not find an option to do that autodiscovery.
Did I miss something? How does the GUI do it? Any recommendations for getting the movie name from the commandline? It does not need to be HandBrake CLI, I can stitch it together myself.
For clarification of my question: I am not after the movie title number (as in the argument to the -t
option), but after the movie name, as in "Lock, Stock and Two Smoking Barrels". The gui does recognize this, at least for some DVDs. How is that acomplished?
Answer
I finally found a solution with the help of the HandBrake Forum:
HandBrakeCLI --scan -i /dev/sr0 | awk -F: '/DVD Title/ {print $3}' |python -c "import sys; print(sys.stdin.read().title().replace('_', ' '))" |head -1
So what this does is it filter libdvdnavs logoutput. Probably not a stable solution, because the log output of lbdvdnav is probably not to be considred a stable api. However it works for.
No comments:
Post a Comment