> ---------------------------------------- > From: Zé Loff <zel...@zeloff.org> > Sent: Mon Sep 23 14:59:22 CEST 2013 > To: Fung <fungm...@qq.com> > Subject: Re: pure-uploadscript for ffmpeg to auto convert files > > > On 23/09/2013, at 13:35, "Fung" <fungm...@qq.com> wrote: > > > just install pure-ftpd and ffmpeg > > > > when convert *.avi to *.mp4 without reencoding in normal shell, the command > > is > > # ffmpeg -i inputname.avi -strict -2 -vcodec copy inputname.mp4 > > > > > > now with pure-uploadscript , need Automatically run ffmpeg after a > > successful *.avi upload , converting to *.mp4 > > the ouput file name should be the same as input file name except extension > > name. > > > > so how to wright this script ? > > > > ###not finish Example!!! > > #! /bin/sh > > /usr/local/bin/ffmpeg -i $1 -strict -2 -vcodec copy ????? > > ###not finish Example!!! > > > > Use sed >
Should use a shell substitution features. maybe something like ..... -vcodec copy -sameq ${1%%avi}mpg # should work just fine without sed substitution Cordialement Francois Pussault 3701 - 8 rue Marcel Pagnol 31100 Toulouse France +33 6 17 230 820 +33 5 34 365 269 fpussa...@contactoffice.fr