Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
09-04-2007, 05:28 AM #1
- Join Date
- Sep 2007
- Thanked 0 Times in 0 Posts
Automatic number naming of files in php please help me with this I am using exec func
$output is the variable I just need to know what to do with this.
I need the $output to be a numbered jpeg such as 0000001.jpg 0000002.jpg
and a numbered flv 0000001.flv 0000002.flv
so I just need the numbering part
how do I make it do this so that it is automaticly done lets say 0000001.jpg 0000002.jpg so the next one made will be 0000003.jpg and so on and so forth
and the next flv
made will be 0000003.flv and so on and so forth it does not need the extension I just need to make sure it does the sequence correctly so I don't get over written files etc.
By the way the command runs ffmpeg
$input = $_GET['input'];
$output = ?
exec 'ffmpeg -i /home/forbushj/public_html/uploadvidd/'.$input.' -ar 22050 -ab 32 -f flv -s 320x240 /home/forbushj/public_html/2vidd/'.$output.'.flv';
exec 'ffmpeg -i /home/forbushj/public_html/uploadvidd/'.$input.' -an -ss 00:00:45 -an -r 1 -vframes 1 -y -s 150x100 /home/forbushj/public_html/2vidd/'.$output.'.jpg';
09-04-2007, 06:17 AM #2