|
Okay, hear goes. I
hacked together this script in an hour last Chirstmas back when I was just
learning how to use trancode. I got it working and I’ve pretty much
left it alone since then. I’m in the process of rewriting it but
this script is useful. I took the ideal from a program,
auto gordian knot, that I was using on windows. The ideal behind autogk
was you set some basic parms, such as size and if you want dvix or xvid.
Then you push go and walk away. You can cue up a bunch of files and it
will figure out the rest. The script that I lovingly
called agk, does pretty much the linux version of that. There are only
two parameters that you need to feed the script. The –s <size>
option to tell it the size of the file you want it to put out, and then the
file(s) that you want it to work on. This version only supports VOBs but
its easy to change it to handle what ever you want it to. Just tell it
the size of the file you want and it will figure out the bitrate and the rest
of it on its own. It’s pretty accurate most of the time, hitting
with in 5% to 10% of the target size. There are only 3 more options
that you will find useful. The –b <bitrate> option which
tells the script what bitrate you want the audio to be encoded at. The
default is 128 mp3. The next option is the –A which tell it not to
convert the audio file to mp3 and leave it as it. This is to preserve the
5.1 audio files. The final option is the –F which tells it to
operate in the foreground and not submit the file to the batch queue, more on
that later. The –F option is good determine if transcode is going to
handle the file right before you feed it to the batch queue. Now the real beauty of this
script is how it interacts with the linux batch queue system. The default
operation is to take a VOB file and submit a script to the batch queue to
process it. I generally us it to process large amounts of anime and TV
shows in the background. The command I use 98% of the time. agk –s 600 –b 128
*.VOB It tells the script that I
want every avi to be 600 megabytes in size and encoded with 128bps mp3 for
audio. You can use the –a option to select which audio track.
Then the script will take every VOB file and submit a file to batch to process
it. After the script has been
submitted to the batch queue you then walk away and let the machine do the
rest. The batch command will then execute each script in the background,
with a lower priority so not to hog the machine. The user then can go on
to something else or even log off and leave the machine to do its work. Even
if the machine crashes or power is interrupted the only work lost will only be
the current files that it was working on. The rest of the files will
remain in the batch queue when the machine comes back up. Under most linux machines if
the work load gets above a certain point the batch command will stop processing
the queue until the load gets below a certain point. On my linux machine
the work load limit is set to 1.5. On machines that are powerful enough
the batch command can be set to process several files at one time so its
possible to have several copies of transcode running at one time. Another good thing about
using the batch queue is each file can have different parameters. You can
submit one file to be encoded as a divx then turn around, change the script and
submit another one to be encoded as a mpeg2. Jeff #!/bin/sh -----Original Message----- Jeff Hyche wrote: > What are the rules here
on script posting? I've only seen little snippets > of script and code goes
through but not a real functioning script. I > thought I would ask
because the last list that I posted a script to, well, > lets just say it wasn't
pretty. Did you know that when you try to peal the > tar off with the
feathers huge chunks of skin want to come too? Go for it. And the word is
"peel". Peal is what a bell does. |
- [transcode-users] Script Posting? Jeff Hyche
- Re: [transcode-users] Script Posting? Phil Ehrens
- RE: [transcode-users] Script Posting? Jeff Hyche
- Re: [transcode-users] Script Posting? Phil Ehrens
- RE: [transcode-users] Script Posting? Jeff Hyche
- Re: [transcode-users] Script Posting? Phil Ehrens
- Re: [transcode-users] Script Posting... Phil Ehrens
- Re: [transcode-users] Script Pos... Jeff Hyche
- [transcode-users] tomsmocomp vs ... Jeff Hyche
- Re: [transcode-users] tomsmocomp... Phil Ehrens
- Re: [transcode-users] tomsmocomp... Phil Ehrens
- Re: [transcode-users] tomsmocomp... Jeff Hyche
- RE: [transcode-users] Script Posting... Jeff Hyche
