mencoder script help needed
ok this is my post script i use for sabnzbd that i need to adapt slightly
the script is Code:
dir=$1 im guessing its not as simple as replacing "$file" with "*.avi" or is it? (and changing the end to *_done.avi to insure the end file is named correctly?) |
test it out to be sure, but something like this might do the trick...
Code:
dir=$1 :study: |
How about this
Code:
IFS=' |
Quote:
but have amended a new conversion post processing script and am trying it out , i wont know for a few hours if its worked (well if it errors fully ill know in a few minutes lol) Thank you in advance ill post how it goes when its done ***edit*** while i tried to find sabnzbds script folder episode butler (i use this rather then a vcr so i can watch my programs at work lol, as far as i know nothing illeagel is going on after all its the same as taping it) picked up some programs fed them into sabnzbd which then downloaded and is running post processing scripts on them (it does them one at a time in order) so i wont know if that script has worked for a very long time (the new one that is) oh well fingers crossed |
well rayfodj script didnt work
but catkins did :) thnx catkin so far only tested as a script inside a folder of test avi files but i see no reason why it wouldnt work in a $dir :) here it is Code:
dir=$1 |
pardon the triple post but it serves a purpose of bumping the thread to get noticed and this is a new winkle and editing would mean it would go un noticed.
ok the script as Code:
IFS=' but the post processing script as Code:
dir=$1 /home/mrgreaper/sabnzbd/script/conv3: 5: Syntax error: "(" unexpected both have been chmod 777 i just dont get it a possible solution springs to mind if i could make conv3 executable from anywhere (is that possible? ie being able to ./conv3 with out the file being in the folder im in and it still converting all the files of the folder im looking at?) if thats possible i could do this Code:
dir=$1 if thats not possible the only other thing i can think of is this; Code:
dir=$1 |
No problem with posting again in the same thread -- it's the same problem and isn't solved yet.
"/home/mrgreaper/sabnzbd/script/conv3: 5: Syntax error: "(" unexpected" is a syntax error, nothing to do with permissions on the script file. Perhaps the script is running in a different shell when it is run as a post-processing script. Do you know and can you post details of how it is being launched? Try setting the first line of the script to this (if it is not already); It may force the script to be executed by bash. Code:
#!/bin/bash Code:
/home/<your user name>/bin/conv3.sh To copy files, use the cp command, details by running Code:
man cp |
Code:
dir=$1 also post #2 mite help here: http://www.linuxquestions.org/questi...light=mencoder |
Quote:
the recording on it is oversized and blocky so i use episode butler to get my tv programmes for me (again as far as i can see thats no different then setting a vcr up except its in a format i can do something with lol) i then use mencoder to put it into a smaller file size and make sure the audio is the right codec etc as for the change of script i added the bash bit (gedit automaticly changed the colours of some of the words, i guess to make scripting easier) tested it on a 1 avi file folder and it worked now just have to wait for it to work on a multi avi link (my net is being slow at mo (i norm 5000+k per second (around 5meg a sec actual) im getting 1200 k per sec |
To use a matrix here is completely non-required, even more, you shouldn't be parsing the ls output, for a number of reasons.
Use schneidz's way instead, which is not only easier and more efficient but also more solid. However, if |
Quote:
|
The for loop will work *always*. Just read that link I gave you to see why using the ls output as your source is not reliable. ls wasn't designed for that purpose, though it's a common practice for I don't know what reason, that doesn't make it any more correct.
|
Quote:
but again mite be because i got this from a freind after he got it from a friend. (the outer casing is missing some small screws. the battery/ harddrive compartment is taped shut.) i am wondering if buying a new unit will solve that ? |
Quote:
I guess most of us use ls because we are scripting using a toolset we use interactively. About the final recommendation Code:
find . -type f -print0 | while IFS= read -r -d '' filename; do The "-d ''" is intriguing; it looks like an empty string but must mean NULL to read ... ? |
Quote:
That's the purpose of the -print0 statement as well. This instructs find to use the null character to separate the elements of the list. This is why you use IFS=, or xargs -0 in conjunction with the find -print0 option. |
All times are GMT -5. The time now is 10:47 PM. |