[Python] rescepy - automated ReScene reconstruction.

Come up with a useful post-processing script? Share it here!
stabu
Jr. Member
Jr. Member
Posts: 64
Joined: December 10th, 2008, 10:02 pm

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

Post 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
stabu
Jr. Member
Jr. Member
Posts: 64
Joined: December 10th, 2008, 10:02 pm

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

Post 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
Last edited by stabu on September 17th, 2009, 12:00 pm, edited 1 time in total.
sweetie
Full Member
Full Member
Posts: 117
Joined: May 10th, 2009, 10:47 am

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

Post 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
Last edited by sweetie on September 19th, 2009, 4:50 am, edited 1 time in total.
stabu
Jr. Member
Jr. Member
Posts: 64
Joined: December 10th, 2008, 10:02 pm

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

Post by stabu »

One mkv was out of sync that ever happen to anything you got?
sweetie
Full Member
Full Member
Posts: 117
Joined: May 10th, 2009, 10:47 am

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

Post 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.
Last edited by sweetie on September 19th, 2009, 3:06 pm, edited 1 time in total.
stabu
Jr. Member
Jr. Member
Posts: 64
Joined: December 10th, 2008, 10:02 pm

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

Post by stabu »

i'll try it out soon
Last edited by stabu on September 20th, 2009, 5:16 pm, edited 1 time in total.
sweetie
Full Member
Full Member
Posts: 117
Joined: May 10th, 2009, 10:47 am

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

Post 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
sweetie
Full Member
Full Member
Posts: 117
Joined: May 10th, 2009, 10:47 am

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

Post by sweetie »

Super massive update. Sorry for bump, will be the final time, promise.

Also, to mods: this is now dupe of this thread.
stabu
Jr. Member
Jr. Member
Posts: 64
Joined: December 10th, 2008, 10:02 pm

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

Post 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 :(
Last edited by stabu on November 22nd, 2009, 1:16 pm, edited 1 time in total.
sweetie
Full Member
Full Member
Posts: 117
Joined: May 10th, 2009, 10:47 am

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

Post 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
Last edited by sweetie on November 23rd, 2009, 7:08 pm, edited 1 time in total.
stabu
Jr. Member
Jr. Member
Posts: 64
Joined: December 10th, 2008, 10:02 pm

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

Post 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
sweetie
Full Member
Full Member
Posts: 117
Joined: May 10th, 2009, 10:47 am

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

Post 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
Last edited by sweetie on November 23rd, 2009, 7:08 pm, edited 1 time in total.
stabu
Jr. Member
Jr. Member
Posts: 64
Joined: December 10th, 2008, 10:02 pm

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

Post 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
sweetie
Full Member
Full Member
Posts: 117
Joined: May 10th, 2009, 10:47 am

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

Post by sweetie »

Code: Select all

bash filename.sh -m
Hopefully.

Did which install without a hitch?
stabu
Jr. Member
Jr. Member
Posts: 64
Joined: December 10th, 2008, 10:02 pm

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

Post 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.
Last edited by stabu on November 24th, 2009, 5:15 pm, edited 1 time in total.
Post Reply