ikosa Posted September 24, 2015 Share Posted September 24, 2015 If you are addicted to merging mkvs as me you will need this too. Actually i made this for me but want to share it with the community. I try to make this as parametric as i can (there are still some hard coded stuff but dont forget that i m too lazy to merge mkvs manually ) This is a two part script: automerge merges a single mkv and mergeall calls automerge for all the folders and merge them all. I use mkvtoolnix-gui docker for the dependicies. Bad news is i can i run it within the container from cli with docker exec -ti mkvtoolnix-gui /bin/bash /config/config/automerge.sh -d "/somedirectory/" but i want to run this with another script outside the docker. Cant achive that yet i appriciate any help and comments. PS: I m not an linux or bash scripting expert i just can google and read. I think that i ve tested this script enough and beyond tests i merge over 30 movies with this but you should use it with caution. #usage: automerge.sh -d "/input dir/" -o "/output dir/" -l eng #you can omit any parameter #if you omit -d and/or -o script will use currrent directory both for input & output #-l parameter sets/overwrites the audio track language #purpose of the script is to merge movie files, subtitles, posters and nfos automaticly with mkvmerge #what does this script do: #adds mkv file (just one file) in the input dir excluding sample without subtitle tracks #adds turkish and english subs in the input dir (*_tr.srt *_eng.srt case insensitive) #script will exit if tr sub not exists but continoue if eng sub not exists #makes tr sub default track #gets audio codec and channel info and put that to audio track name #gets release name from the foldernae and put that to video track name #adds *poster*.jp(e)g as attachment (there must be poster for movies. othervise script will exit) #adds *.nfo as attachment (if not exists script will continue) #script will exit if audio track lang is und this is where the -l option comes #script will exit if multiple audio tracks exists #and merges them with mkvmerge #changes the output files permissions to 666 #moves the source files to another dir. sorry it is hard coded change it from the bottom of the script automerge.zip Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.