[MPlayer-users] batch encode

torsted torsted at runbox.no
Thu May 8 10:52:05 CEST 2003


drwhat wrote:

 >[Automatic answer: RTFM (read DOCS, FAQ), also read DOCS/bugreports.html]

> howdy all,
>
> I have been trying to setup a bash script to encode a bunch of video's 
> in a
> give directory, and havent had much luck :/
>
> my script is:
>
> #!/bin/bash
> for filename in *
> do mencoder "$filename" -o /tmp/video/"$filename" -ovc lavc -lavcopts
> vcodec=mpeg4:vhq:vbitrate=800 -ofps 29.97 -oac mp3lame -lameopts
> br-128:q=9:cbr:mode=1
>
> but when I try to execute it, I get the following error:
>
> mencoder-batch.sh: line 6: syntax error: unexpected end of file
>
> any comments/suggetion greatly appreciated
>
>
> drwhat
>
>
> *******#######$$$$$$$$@@@@@@@@@@@@@@@@
> Linux user #:265953
> os:mandake v9.1/winME    cpu:amd duron 1.2G
> mobo:asus a7v133        mem:256M
> cdr:LG-8080B            nic:netgear fa311
> graphics:nvidia geforce3 ti200 64m ddr
> hda:FUJITSU MPA3017AT, 1.7G
> hdb: WESTERN DIGITAL WD1200BB-00CAA1, 120G
> sound:ensoniq creative audiopci/es1370
> videocapture:Hauppauge WinTV GO 190
>
> Today is Tommorrow, is Yesterday, but neither, is niether
> loc:48'02"N 122'49"W

If I understand the syntax right you have to add an
"done" at line 6
cut from man bash:
for name [ in word ] ; do list ; done
              The list of words following in is expanded, generating a 
list of
              items.  The variable name is set to each element of this 
list in
              turn, and list is executed each time.  If the in word  is  
omit-
              ted,  the  for  command  executes  list once for each 
positional
              parameter that is set (see PARAMETERS below).  The return 
status
              is  the  exit  status of the last command that executes.  
If the
              expansion of the items following in results in an empty 
list, no
              commands are executed, and the return status is 0.
_______________________________________________
RTFM!!!  http://www.MPlayerHQ.hu/DOCS
Search:  http://www.MPlayerHQ.hu/cgi-bin/htsearch
http://mplayerhq.hu/mailman/listinfo/mplayer-users






More information about the MPlayer-users mailing list