Media Processing Script

Come up with a useful post-processing script? Share it here!
th3joker
Jr. Member
Jr. Member
Posts: 64
Joined: January 25th, 2008, 8:15 am

Re: Media Processing Script

Post by th3joker »

Wow that's really kind of you, just got out of bed and I'll try it now.

Thanks again :-)
th3joker
Jr. Member
Jr. Member
Posts: 64
Joined: January 25th, 2008, 8:15 am

Re: Media Processing Script

Post by th3joker »

Still no joy.

This is the error I get if i run it:

./postproc.sh "/Volumes/Storage/sabnzbd/Downloads/Finished/TV"
usage: date [-jnu] [-d dst] [-r seconds] [-t west] [-v[+|-]val[ymwdHMS]] ...
            [-f fmt date | [[[mm]dd]HH]MM[[cc]yy][.ss]] [+format]

----- Started Processing:  -----
Folder Path: /Volumes/Storage/sabnzbd/Downloads/Finished/TV
Getting category from folder name
Cannot determine category - using default category: MOVIES
Category: MOVIES
du: illegal option -- S
usage: du [-H | -L | -P] [-a | -s | -d depth] [-c] [-h | -k | -m] [-x] [-I mask] [file ...]
Content is
No files found (file could be under 2M)
Processing error occured
Preserving source folder
Done!

Any ideas?
auskento
Moderator
Moderator
Posts: 77
Joined: January 21st, 2008, 8:45 pm
Location: Melbourne, AUS

Re: Media Processing Script

Post by auskento »

Sorry for delay on responding to this, I have been away for a while.

The error you are getting is again a limitation of the mac implementation of some of the linux commands i have itilised.

Search for the line that says

Code: Select all

MEDIATYPE=`du -aS | sort -nr | sed -n '2p' | awk -F. '{print $NF}'`
and change it to

Code: Select all

MEDIATYPE=`du -a | sort -nr | sed -n '2p' | awk -F. '{print $NF}'`
and give it a go
th3joker
Jr. Member
Jr. Member
Posts: 64
Joined: January 25th, 2008, 8:15 am

Re: Media Processing Script

Post by th3joker »

I moved my sab machine to a PC I wasn't using, installed openSUSE and I'm up and running, the script works a treat too.

Many, many thanks for trying to get me up and running on the Mac :-)

I've upgraded to the new Beta 0.4.0b2 and it's the dog's danglies.
sensei73
Newbie
Newbie
Posts: 7
Joined: April 6th, 2008, 8:41 am

Re: Media Processing Script

Post by sensei73 »

hi, i tried to download the script but i coulnd acces the site....please help!
anyway I have a question can it work with windows? thanks
auskento
Moderator
Moderator
Posts: 77
Joined: January 21st, 2008, 8:45 pm
Location: Melbourne, AUS

Re: Media Processing Script

Post by auskento »

My internet has been offline for about 5 days after storms and a truck caused lots of problems with phone lines.

It is back online.

I will be revising the script, to move all variables back internal to the script, or use a config file location variable in it, to better suit the script to the 0.4.0 series.
auskento
Moderator
Moderator
Posts: 77
Joined: January 21st, 2008, 8:45 pm
Location: Melbourne, AUS

Re: Media Processing Script

Post by auskento »

sensei73 wrote: hi, i tried to download the script but i coulnd acces the site....please help!
anyway I have a question can it work with windows? thanks
No
th3joker
Jr. Member
Jr. Member
Posts: 64
Joined: January 25th, 2008, 8:15 am

Re: Media Processing Script

Post by th3joker »

Just a quickie, when I download a TV episode that's about 1.2GB and also an MKV the script treats the file as though it where a Movie instead of a TV episode and copies it to the Movies folder instead.

If I download a Movie that is an MKV it fails to rename the file correctly and copies the file and it's folder to the Movies folder.

This is on my openSUSE box.
evidenceunseen
Jr. Member
Jr. Member
Posts: 56
Joined: February 11th, 2008, 2:33 pm

Re: Media Processing Script

Post by evidenceunseen »

How can I download this script? The site says I'm not authorized and if I use https it comes up with a login.
th3joker
Jr. Member
Jr. Member
Posts: 64
Joined: January 25th, 2008, 8:15 am

Re: Media Processing Script

Post by th3joker »

I think his hosting is broken, same for me too
auskento
Moderator
Moderator
Posts: 77
Joined: January 21st, 2008, 8:45 pm
Location: Melbourne, AUS

Re: Media Processing Script

Post by auskento »

My linux box died a nasty death :(

Should be back online now after getting a temp server in place.

Sorry for the problems
Last edited by auskento on April 23rd, 2008, 5:50 pm, edited 1 time in total.
th3joker
Jr. Member
Jr. Member
Posts: 64
Joined: January 25th, 2008, 8:15 am

Re: Media Processing Script

Post by th3joker »

I've switched to a FreeNAS server downloading my stuff as I'm trying to reduce the amount of computers I have on 24/7.

With that running my file server and downloads I've been able to switch my download machine off.

It took a while getting sab up and running but with some help from people both on here and the FreeNAS forum I managed it.

FreeNAS is a really small FreeBSD install and the implementation of du doesn't recognise the command 'du -S' the error comes back as:

Code: Select all

du: illegal option -- S
usage: du [-H | -L | -P] [-a | -s | -d depth] [-c] [-h | -k | -m] [-n] [-x] [-I mask] [file ...]
Content is 
No files found (file could be under 25M)
Processing error occured
Preserving source folder
Done!
When I change the command to 'du -s' lowercase 's' it doesn't error but responds with the following:

Code: Select all

usage: du [-H | -L | -P] [-a | -s | -d depth] [-c] [-h | -k | -m] [-n] [-x] [-I mask] [file ...]
Content is 
No files found (file could be under 25M)
Processing error occured
Preserving source folder
Done!
I would really appreciate any help, many thanks for looking.

Thanks to Auskento too, he really helped me out a while back with problems running the script on my mac.
th3joker
Jr. Member
Jr. Member
Posts: 64
Joined: January 25th, 2008, 8:15 am

Re: Media Processing Script

Post by th3joker »

Fixed it I think.

I change line 812 of postproc.sh from:

Code: Select all

MEDIATYPE=`du -aS | sort -nr | sed -n '2p' | awk -F. '{print $NF}'`
to

Code: Select all

MEDIATYPE=`du -a | sort -nr | sed -n '2p' | awk -F. '{print $NF}'`
Now it's working again, it's such a great script too.

It seemed that du on Ubuntu accepted the du -S but the BSD implementation FreeNAS uses doesn't.

Not sure if I broke anything by changing it but the script seems to run fine and it hasn't deleted anything I didn't want it to yet :-)
auskento
Moderator
Moderator
Posts: 77
Joined: January 21st, 2008, 8:45 pm
Location: Melbourne, AUS

Re: Media Processing Script

Post by auskento »

Glad you got it going.

I havent done much at all on this script in a while due to my free time being reduced.

It *mostly* does what it needs to, but occasionally does strange things.

I might get around to looking at it further closer to christmas.  Most of what needs to be done is bug fixes, theres not a huge amount else to add to the script at this stage.
th3joker
Jr. Member
Jr. Member
Posts: 64
Joined: January 25th, 2008, 8:15 am

Re: Media Processing Script

Post by th3joker »

How would I add into the TV part to also convert .mkv files into iPhone compliant files and keep the original .mkv as well.
Post Reply