This worked after I removed the local before the variable.  For some reason it didn't like it in the script.

Thanks to everyone that helped.

On Sun, Aug 2, 2009 at 1:40 PM, Joseph Sinclair <plug-discussion@stcaz.net> wrote:
You might try this if you have bash available:
#!/bin/bash
# take all avi files in the current directory
# and transcode to Flash (flv) video files in the flv subdirectory.

for filename in *.avi ; do
 local basename=${filename%.avi}
 echo file base name is ${basename}
 ffmpeg -i "${basename}.avi" -ar 22050 -f flv "./flv/${basename}.flv"
done

Shawn Badger wrote:
> I have bee playing with this script for a while and I can't seem to find the
> magic to make it work right. The script basically takes all the avi files in
> in a folder and converts them to flash.
> Here is the simple script:
>
> #!/bin/sh
> ls *.avi|cut -d. -f1 | while read i
>     do
>     echo "this is the file "$i
>     ffmpeg -i $i.avi -ar 22050 -f flv ./flv/$i.flv
>     done
>
>
> The script does the first file it finds and then exits with no errors.
> If I comment out the ffmpeg line it runs as expected though all the files.
>
> Oh, I need to allow for spaces in the file names as well.
>
> Any ideas?
>
>
>
> ------------------------------------------------------------------------
>
> ---------------------------------------------------
> PLUG-discuss mailing list - PLUG-discuss@lists.plug.phoenix.az.us
> To subscribe, unsubscribe, or to change your mail settings:
> http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss


---------------------------------------------------
PLUG-discuss mailing list - PLUG-discuss@lists.plug.phoenix.az.us
To subscribe, unsubscribe, or to change your mail settings:
http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss