On Thu, 29 Jun 2006 16:36:10 -0500
"Jeff Hyche" <[EMAIL PROTECTED]> wrote:

Hi,

> 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.

For sake of curiosity, are you rewriting the script in bash or in some other
language?

[cut explanation]
> 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.

Looks really nice. Thanks for this contribute, I'll upload to wiki ASAP
unless of course take care more quickly.

[...]
> for _target in $*
>   do
>   
>   # Get Video Frame Rate and Code
>   #tcscan -i ${_target} > scan.$$ 2>&1
>   #_frame_rate=`awk '/sequence:/ {print $4}' scan.$$`
>   _frame_rate=`tcprobe -i ${_target} | awk '/frame rate: -f/ {print $4}'`
>   case ${_frame_rate} in
>     23.976) _frame_code=1;;
>     24) _frame_code=2;;
>     25) _frame_code=3;; 
>     29.970) _frame_code=4;;
>     30) _frame_code=5;;
>   esac

Here the new tcprobe raw mode will be useful (avalaible in future 1.1.0) :)

>   # Want to calculate bitrate on the fly because of the time it
>   # it takes to do so
>   echo "_vid_brate=\`echo | awk -v S=\${_S} -v L=\${_L} -v A=\${_A} \
>        '{printf \"%d\", ((S-(A*L))/L)*8}'\`" >> ${_target}.sh

Interesting! (I'm an awk enthusiast even if not so expert ;) )
Maybe bc can be useful here?

Best regards,

-- 
Francesco Romani - Ikitt ['people always complain, no matther what you do']
IM contact    : (email first, Antispam default deny!) icq://27-83-87-867
known bugs    : http://www.transcoding.org/cgi-bin/transcode?Bug_Showcase
tiny homepage : http://fromani.exit1.org (see IDEAS if you want send code!)

Reply via email to