Looping through files using exec
- From: Jason Cameron <luxen124012x1@xxxxxxxxxx>
- Date: Wed, 18 Jan 2006 13:09:23 +0900
I'm trying to do a mass encode of a large directory of media files but
I'm not having much luck. I tried to use bash but it doesn't like
filenames with spaces so now I'm trying to do it with ruby but using the
exec command it executes the first line then finishes. Here's what I've
done in the IRB.
Dir["*.avi"].each {|x| exec ("mencoder \"" + x + "\" -vf scale=320:240
-ovc lavc -lavcopts vcodec=mpeg4:vbitrate=150 -oac mp3lame -lameopts
vbr=3:br=64 -o \"Done\\" + x + "\"") }
It would be sweetness on a stick if it worked but unfortunately it stops
after the first one. Can anyone tell me what I'm doing wrong and more
importantly what I need to do to make this work?
Thanks in advance,
I
--
Posted via http://www.ruby-forum.com/.
.
- Follow-Ups:
- Re: Looping through files using exec
- From: nobuyoshi nakada
- Re: Looping through files using exec
- From: x1
- Re: Looping through files using exec
- Prev by Date: Re: [BUG] Re: 1.8.4 untaint behavior
- Next by Date: Re: Looping through files using exec
- Previous by thread: PDF::Writer and table columns
- Next by thread: Re: Looping through files using exec
- Index(es):
Relevant Pages
|