shage Posted December 16, 2007 Share Posted December 16, 2007 ffmpeg -i /var/videos/incoming/video.avi -s 320x240 -ar 44100 -r 12 /var/videos/flv/video.flv is command line to convert video, how could i get it to process all files in a dir thank you Quote Link to comment Share on other sites More sharing options...
trq Posted December 16, 2007 Share Posted December 16, 2007 In bash.. for f in *.avi ; do ffmpeg -i /var/videos/incoming/$f -s 320x240 -ar 44100 -r 12 /var/videos/flv/${f%.*}.flv done and php... <?php foreach(glob(*.avi) as $f) { exec("ffmpeg -i /var/videos/incoming/$f -s 320x240 -ar 44100 -r 12 /var/videos/flv/" . substr($f,0,strpos($f,'.')-1) . ".flv"); } ?> Quote Link to comment Share on other sites More sharing options...
paul2463 Posted December 16, 2007 Share Posted December 16, 2007 HI Thorpe just a quick one with your post, should it be substr() instead of sustr(), I realise you dont have time to test all your code and it could be a simple typo, but I thought I would check anyway Paul Merry Christmas Quote Link to comment Share on other sites More sharing options...
trq Posted December 16, 2007 Share Posted December 16, 2007 Yeah, its a typo (edited). I don't test any of my code I post here usually. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.