Help with a script

Share your scripts or request scripts with specific features.
Forum rules
Please keep the forum clean - one topic per script. Questions not related to a specific script should be posted in Support forum.
Post Reply
porkchop999
Posts: 1
Joined: 06 May 2015, 05:26

Help with a script

Post by porkchop999 » 03 Jun 2015, 06:10

Is it possible to get this script form the sabnzbd forum to work with nzbget? It extracts the biggest mts file as converts it to a single mkv. I am not much of a coder so any help would be appecaited . Thanks

#!/bin/bash
BDMV_FOLD=`find "$1" -name "BDMV" -print0`

if [[ $BDMV_FOLD == *BDMV* ]]; then
# cd to the ./BDMV/STREAM folder
cd "$1"/BDMV/STREAM/
# Find the biggest .M2TS file, usually the movie
BIGST_M2TS=`find . -type f | xargs ls -1S | head -n 1 | rev | cut -c 6- | rev`
# MkvMerge the file
mkvmerge -o "$BIGST_M2TS".mkv --compression -1:none "$BIGST_M2TS".m2ts
# Change MKV permission to -rw-r--r--
chmod 644 "$BIGST_M2TS".mkv
echo "Blu-Ray: MKV created!"
else
echo "BDMV2MKV: no processing"
fi

Post Reply

Who is online

Users browsing this forum: No registered users and 43 guests