Closed deepfriedmind closed 5 years ago
Hi it appears this is an error which the HandbrakeCLI has produced. It seems the first issue is at:
disc.c:323: failed opening UDF image /Volumes/disk1/TV/Shows/Newsreaders/Season 02/Newsreaders - S02E02 - Motorboating Dads; the Negative 00,000 Question 720p HDTV DD 5.1 x264 - BAJSKORV.mkv
It may be worth checking on the Handbrake forum or subreddit to find out what causes this as I'm not familiar with all Handbrake's error codes.
It's because of the $1
in the filename, which gets treated like a variable in the shell. How are you escaping filenames passed to HandbrakeCLI?
Ah very interesting thanks for letting me know. I only did a test on Windows with that file name so didn't run into any problems.
Here is the Linux/macOS command which is executed in shell. I'll have another look to see what can be done to escape special characters.
workerCommand ="HandBrakeCLI -i \"" + currentSourceLine + "\" -o \"" + currentDestinationLine + "\" " + preset;
It's because of the
$1
in the filename, which gets treated like a variable in the shell. How are you escaping filenames passed to HandbrakeCLI?
Fixed in v2.0.8 just released.
@HaveAGitGat -- Still having issues with this on Linux with any special characters (mainly single quotes that I've noticed) or different space delimiting in filenames (using v2.0.8). HBBatchBeast is therefore reporting such files as being corrupted.
Running HandbrakeCLI on these files manually and doing a scan shows they are not in fact corrupted at all, it's just a case of HandbrakeCLI getting jammed up on the input filename and then just erroring out.
I think it may have to do with this....
workerCommand ="HandBrakeCLI -i \"" + currentSourceLine + "\" -o \"" + currentDestinationLine + "\" " + preset;
I'm pretty sure you need single quotes around the outer part of the command... like so...
workerCommand ='HandBrakeCLI -i \"" + currentSourceLine + "\" -o \"" + currentDestinationLine + "\" ' + preset;
because what I believe is happening is.. the way it is now, when HandbrakeCLI executes the command, it is seeing the single quotes in the filenames as part of the command itself, and therefore it breaks the execution of the command and errors out.
Hi, so it was originally this:
workerCommand ="HandBrakeCLI -i \"" + currentSourceLine + "\" -o \"" + currentDestinationLine + "\" " + preset;
Then I did some testing and changed it to this (solved issue with '$' in filename):
workerCommand ="HandBrakeCLI -i '" + currentSourceLine + "' -o '" + currentDestinationLine + "' " + preset;
I'll do some testing with your suggestion and report back. Thanks
@sjclayton Had a play around with your suggestion as well as a few other ways but still no luck. I'm not sure it's possible for shell to execute commands which contain file paths with single quotes in. The single quotes always break up the shell command, causing errors. Will keep looking though.
v2.1.3 has the option to automatically remove apostrophes/single quotes from filenames:
Fixed in 2.1.5 for Linux and macOS