i'have addapted a script found on this forum to convert the biggest M2TS file found in /BDMV/STREAM/ folder of Blu-Ray in MKV, no compression, everything inclued:
#!/bin/bash
BDMV_FOLD=`find "$1" -name "BDMV" -print0`
if [[ $BDMV_FOLD == *BDMV* ]]; then
# cd to the ./BDMV/STREAM sub folder
cd "$BDMV_FOLD/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-- and move file out of STREAM folder
chmod 644 "$BIGST_M2TS".mkv
mv "$BIGST_M2TS".mkv "$1"
echo "MKV created! ("$1")"
else
echo "BDMV2Mkv: no processing"
fi
Thanks for the script works well for me, I added on to it to support iso files since some rips are iso dumps and also to use the name of the $3 (job name of the nzb) as the filename.
Couch potato does good work for most media filetypes but BDMV is a mess so this definitely helps.
**editing the code now to fix some bugs
not a script pro so probably worth while to verify and keep an eye out on a couple run throughs
goblix wrote:Thanks for the script works well for me, I added on to it to support iso files since some rips are iso dumps and also to use the name of the $3 (job name of the nzb) as the filename.
Couch potato does good work for most media filetypes but BDMV is a mess so this definitely helps.
**editing the code now to fix some bugs
not a script pro so probably worth while to verify and keep an eye out on a couple run throughs
Hello Goblix,
glad to see you find it usefull, post your modified version for others if you have time