Open klogg416 opened 5 years ago
@klogg416 Good question, Kyle! Unfortunately, HandBrakeCLI
doesn't have an API to set the title/name of a subtitle. And while I might be able to make this work with mkvpropedit
for MKV output by post-processing, I'm not sure if that's even possible for MP4 output because the mp4track
tool I which I use for media queries may not allow that.
Let me look into it and I'll see what I can do. But don't get your hopes up.
In the meantime, you should open an issue on the HandBrake project and request an API for this.
@donmelton As far as reasons go, that is a convincing one. Thanks for the considered reply, I will get on it with team HandBrake.
In the interim a quick check the mkvpropedit
documentation shows me that it can edit without re-writing the entire file, so that gives me an easy way to update the handful of impacted files today. Thanks for pointing me in that direction Don!
@klogg416 No problem and thanks for filing that issue!
@klogg416
This is part of my wrapper script (Yo dawg, I heard you liked wrappers, so I built a script to wrap the wrapper gem that wraps the wrapper app for FFmpeg). It changes the title of whatever movie I'm encoding, if the existing title doesn't match the file name. You can easily do the same with other properties. Hope this helps!
if [ "$strFilename" != "$strMIName" ]; then
mkvpropedit "$strTheFile" --edit info --set "title=$strFilename"
fi
if [ "$strFilename" != "$strMIName" ]; then mkvpropedit "$strTheFile" --edit info --set "title=$strFilename" fi
@khaosx that is super helpful to start from as I dig into mkvpropedit
, thank you!!
And I appreciate the deep, deep meta recursion, and look forward to the troubleshoot efforts required when you hand off layers of wrappers to a slightly less technical friend. :-)
@khaosx @klogg416 You guys are amazing. What a bunch of geeks! :)
I have added this to my starter, to keep track of what version of the gem managed the encoding:
mkvpropedit "$strTheFile" --edit info --set "muxing-application=vtp_0.25"
(vtp = video transcoding project)
This shows up in media info as:
Writing library : vtp_0.25 / Lavf58.20.100
while leaving this correct:
Writing application : HandBrake 1.2.0 2018122300
At some point, I'll start tracking what changes I made to the script and tie those to Don's versions.
EDIT:
And then my new love affair with DevOps kicked in, and I realized that I can set up a continuous delivery pipeline by setting the server to find 15 movies a night that don't meet the minimum version, re-encoding the masters, and auto-replacing them in the library.
Shortly after that thought, I hit myself really hard in the face with a hammer to shut that thought down before things got out of hand...
@khaosx I never noticed that attribute changed by just using mkvpropedit
. Nice catch! You're obviously paying attention to the details.
Oooh, automatic selection for re-transcoding, eh? Clever! You are living in the Star Trek future now. And that's gotta be simpler than my excruciatingly manual method (which I will describe one day when I'm not in a hurry).
But stay away from those hammers! :)
Hi @donmelton I have an official question! When adding (not burning) subtitles, is there a way to have the "title" field copied as well? I don't see it in the help or readme. With anime in particular you often have multiple English subtitles: studio, improved Disney re-release, and "signs" with subs only for relevant in-movie signs. Using
--add-subtitle all
works as expected but the detailed names aren't copied over so it isn't clear which English sub is which.Is there a way to do this today, or can I submit a feature request to copy existing subtitle descriptions when the
--add-subtitle
switch is called?Thanks!
Here are mediainfo examples.
Source:
and transcoded: