Sludge Vohaul 22 Posted July 12, 2017 Share Posted July 12, 2017 Hi, I am not sure whether this is useful to anyone else, but I thought I'd share it here anyway. I needed an isolated Emby installation for doing some testing, with identical content as my "real" Emby installation. As I cannot copy the whole library (space + time), I therefore wrote a shell script which traverses all MKV files of my movie library and creates 2s long MKVs from those files somewhere else, while preserving the directory structure. The script is available as a Gist here It works on OSX and BSDs (change the shebang to /usr/local/bin/bash), for linux one will probably have to change the command paths. For windows it should work with cygwin. Usage: shortenmkv.sh /path/to/sourcedir /other/path/to/targetdir The sourcedir and targetdir can be relative or absolute paths. If a MKV file is in e.g. /path/to/sourcedir/some movie/movie.mkv the 2s long MKV will be created in /other/path/to/targetdir/some movie/movie.mkv It's limited to MKVs as I don't have anything else. Subtitles are not copied. The whole thing is a bit bloated, as I've stripped down some other script (audible2m4b.sh in my audiotools repo). -- sv Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now