Sending HandBrake Output to MKVMerge

Random chit-chat and anything that doesn't belong elsewhere
Post Reply
randomreuben
Veteran User
Posts: 468
Joined: Mon Nov 02, 2009 2:18 pm

Sending HandBrake Output to MKVMerge

Post by randomreuben »

Greetings,

In Ubuntu, I used to be able to remux HandBrake output with MKVToolnix's MKVMerge program by using

Code: Select all

mkvmerge -o "$OUTPUTFILE" "$FILE"
where the "$OUTPUTFILE" and "$FILE" stood for placeholders for the output and input filenames in my script.

I see that in HandBrake's Windows version, there' the option to send the output file to a software program once it's done. That sounds like a brilliant plan. Any ideas on how I could get HandBrake to send the finished file to MKVMerge for a remux? I don't know how to get MKVMerge to see the finished file as the input file and the output file to have the same name as the input file, but to be sent to a different location.

I'm looking for some version of this.

Code: Select all

 mkvmerge -o C:/SOMEOTHERFOLDER/"SAME_NAME_AS_RECENTLY_FINISHED_HANDBRAKE_FILE" C:/SOMEFOLDER/"RECENTLY_FINISHED_HANDBRAKE_FILE"
In before the "WHY DO YOU WANT TO DO THIS???!! OMG!!" comments, remuxing HandBrake output in MKVMerge allows you to play the encoded file in VLC with a minimum of weird shearing/distortion.
User avatar
s55
HandBrake Team
Posts: 10357
Joined: Sun Dec 24, 2006 1:05 pm

Re: Sending HandBrake Output to MKVMerge

Post by s55 »

This isn't something you can achieve with that feature. You could certainly get the first argument. I.e select mkvmerge as the exe, and add -0 to the arguments but there is no way to define a second filename unless mkvmerge has some kind of autonaming output feature.
Deleted User 11865

Re: Sending HandBrake Output to MKVMerge

Post by Deleted User 11865 »

It might be possible to launch the mkvmerge GUI (which would have an autoname feature), though I have no idea if there's a switch to make it output the remuxed MKV without user intervention…
User avatar
s55
HandBrake Team
Posts: 10357
Joined: Sun Dec 24, 2006 1:05 pm

Re: Sending HandBrake Output to MKVMerge

Post by s55 »

Frankly though, I'd like to know why you are seeing shearing/distortions. Wouldn't mind seeing an encode long and if possible a sample that reproduces the problem.

If people workaround problems, rather than telling us, they will never get fixed.
randomreuben
Veteran User
Posts: 468
Joined: Mon Nov 02, 2009 2:18 pm

Re: Sending HandBrake Output to MKVMerge

Post by randomreuben »

Honestly, the reason I've not posted this as a bug is because I can't be sure that it's HandBrake's fault. The files seem to play cleaner after remuxing with MKVMerge, but I can't really prove that. Also, I can't remember now, but a long time ago (I've been with this forum for some time now), I remember remuxing in MKVMerge to get around some issue. Lost in the mists of time, I'm afraid. Something about audio interleaving with video, something, something. I don't remember the exact details, but for me, HandBrake and then MKVMerge has always been a part of the process.

I didn't post this as a bug because it's too quirky and strange a bug for me to post as a reproducible sample.

For me, sending HandBrake output to MKVMerge isn't a problem. I can easily make a batch file to process a folder full of .mkv files. All right, no worries then.
Deleted User 11865

Re: Sending HandBrake Output to MKVMerge

Post by Deleted User 11865 »

Unless I am mistaken, our new MKV muxer handles all aspects of interleaving on its own, so in that regard, results should (hopefully) be better than with libmkv.
Post Reply