Page 2 of 9

Re: [Linux - Bash] NoArchive scripts - MKV to M2TS and AVI join.

Posted: September 16th, 2009, 10:17 pm
by stabu

Code: Select all

#if [ $VIDEO_ID -lt $AUDIO_ID ]; then
	    #VIDEO_FPS=`grep "Frame rate" ${MKV_INFO} | sed -n 1p | cut -d'(' -f2 | cut -d' ' -f1`
	#else
	    VIDEO_FPS=`grep "Frame rate" ${MKV_INFO} | sed -n 2p | cut -d'(' -f2 | cut -d' ' -f1`
	#fi
everything works great now, thanks guy

Re: [Linux - Bash] NoArchive scripts - MKV to M2TS and AVI join.

Posted: September 17th, 2009, 8:34 am
by stabu
Know of a way to move the files to a dir after they are done downloading and converting? like heros.s01.e01.x264.hdtv.m3ts to a TV/Heros/Season1 or something liek that same with movies

Re: [Linux - Bash] NoArchive scripts - MKV to M2TS and AVI join.

Posted: September 19th, 2009, 4:48 am
by sweetie
You could look into this: http://forums.sabnzbd.org/index.php?topic=1847.0

I've never used it myself, though from the description at the top, it seems to be just what you're looking for.

You should be able to append:

Code: Select all

python /path/to/MEDIA/PROCESSING/+/XBMC/UPDATER/script
To the first script in the original post of this topic.



It's possible this won't work (script may use variables passed out by SAB, which are lost when run in a second script - not sure how to forward them.) So, if that's the case you'll have to hope somebody else reads this that does know, because I'd be at a loss. :D

Re: [Linux - Bash] NoArchive scripts - MKV to M2TS and AVI join.

Posted: September 19th, 2009, 2:05 pm
by stabu
One mkv was out of sync that ever happen to anything you got?

Re: [Linux - Bash] NoArchive scripts - MKV to M2TS and AVI join.

Posted: September 19th, 2009, 2:55 pm
by sweetie
Not that I remember, though it's almost inevitable there will be problems. Flippin' Sony. /shakefist

As for the script to move to show name dir. I noticed you postsed in moveAvis.sh, and I modded it for you:

Code: Select all

DEST="/path/to/move/files"
USHARE="hostname:port" ##uncomment this below if you run uShare.

for videos in *.avi *.mkv *.m2ts; do
	ext=${videos##*.} 
	myFile="$videos"
	if [[ "$myFile" =~ ([A-Za-z0-9\.]*)\.(S..E..).* ]] ; then
		File=${BASH_REMATCH[2]}.$ext
		PreShowName=${BASH_REMATCH[1]}
		ShowName=$(echo $PreShowName | sed 's/\./ /g')
		echo "A new episode of $ShowName is ready for your enjoyment!"
		[ -d "$DEST/$ShowName" ] || mkdir -pv "$DEST/$ShowName"
		mv -v $myFile "$DEST/$ShowName/$File"
		#wget http://$USHARE/web/ushare.cgi?action=refresh -o /dev/null -P /dev/null
	else   
		echo "$myFile does not match our TV shows"
		mv -v "$myFile" /$myFile
	fi
done
exit 0
Franky, I don't understand some of it. (BASH_REMATCH?) And I haven't had a chance to test. But stick this on the end of the first script.

Re: [Linux - Bash] NoArchive scripts - MKV to M2TS and AVI join.

Posted: September 19th, 2009, 4:50 pm
by stabu
i'll try it out soon

Re: [Linux/OSX - Bash] SceneSort scripts. [v2 - now with automated release rebuild!]

Posted: October 26th, 2009, 8:33 pm
by sweetie
Major update, sorry for bump.

May be some issues. I'll iron them out by the end of the week, won't have time before then, so you may as well have it now. :D

Re: [Linux/OSX - Bash] scenesort script. [v3 - AIO post-post-processor.]

Posted: November 20th, 2009, 8:37 pm
by sweetie
Super massive update. Sorry for bump, will be the final time, promise.

Also, to mods: this is now dupe of this thread.

Re: [Linux/OSX - Bash] scenesort script. [v3 - AIO post-post-processor.]

Posted: November 22nd, 2009, 1:10 pm
by stabu
-In release directory: bash /path/to/filename.sh [-switches]

i get

crc@slavebox:~$ bash mkv.sh
: command not found
: command not found
: command not found
: command not found
: command not found
: command not found
: command not found
: command not found
: command not found
: command not found
: command not found
: command not found
: command not found
'kv.sh: line 51: syntax error near unexpected token `{
'kv.sh: line 51: `which_all() {


Im not sure how to use this :(

Re: [Linux/OSX - Bash] scenesort script. [v3 - AIO post-post-processor.]

Posted: November 22nd, 2009, 1:21 pm
by sweetie
Which distro. are you running? It seems the 'which' command isn't available. It is in all major distros. and OS X, so, strange.

If you're looking to remux MKV, use: bash /path/to/script -m

Report back.


edit: Try again with updated version. There's a space now between: function_name () , possibly causing the issues.

Oh, seems Ubuntu doesn' have which on default install.

Code: Select all

wget http://www.xs4all.nl/~carlo17/which/which-2.20.tar.gz
tar -xf which-2.20.tar.gz
cd which-2.20
./configure
make
make install

Re: [Linux/OSX - Bash] scenesort script. [v3 - AIO post-post-processor.]

Posted: November 23rd, 2009, 5:53 pm
by stabu
crc@slavebox:~$ sudo apt-get install which
[sudo] password for crc:
Reading package lists... Done
Building dependency tree     
Reading state information... Done
E: Couldn't find package which

Re: [Linux/OSX - Bash] scenesort script. [v3 - AIO post-post-processor.]

Posted: November 23rd, 2009, 6:56 pm
by sweetie
I hate Ubuntu.

Code: Select all

wget http://www.xs4all.nl/~carlo17/which/which-2.20.tar.gz
tar -xf which-2.20.tar.gz
cd which-2.20
./configure
make
make install

Re: [Linux/OSX - Bash] scenesort script. [v3 - AIO post-post-processor.]

Posted: November 23rd, 2009, 10:15 pm
by stabu
I dunno what im doing wrong but

crc@slavebox:~$ sudo chmod -c +x filename.sh
mode of `filename.sh' changed to 0755 (rwxr-xr-x)
crc@slavebox:~$ filename.sh
filename.sh: command not found

Re: [Linux/OSX - Bash] scenesort script. [v3 - AIO post-post-processor.]

Posted: November 24th, 2009, 5:54 am
by sweetie

Code: Select all

bash filename.sh -m
Hopefully.

Did which install without a hitch?

Re: [Linux/OSX - Bash] scenesort script. [v3 - AIO post-post-processor.]

Posted: November 24th, 2009, 8:34 am
by stabu
ahh forgot bash, yeah which installed fine. thanks.
I added it to the scripts folder and selected it and now get

Stage UserScript
  [USER-SCRIPT] => Running user script /home/crc/NZB/Scripts/mkv.sh

External processing by /home/crc/NZB/Scripts/mkv.sh:
[1;31m@@ [0;39;49m bin is not compatible release format. Exiting.

Also if i run the command manual i get
@@ ReScene(srr.exe) is out of date, upgrade before continuing.

sorry for all the trouble.