[eluser]Milind[/eluser]
hello friends
I am trying to upload vedio and creating its thumbnail so follow above code but i got error "Can't open movie file funny dogs.wmv"
my code is
$srcFile=$_FILES['upload_file']['name'];
$destFile="out.flv";
$ffmpegPath="c:/wamp/www/codeigniter/system/plugins/ffmpeg.exe";
$ffmpegTool="c:/wamp/www/codeigniter/system/plugins/flvtool2.exe";
$ffmpegobj = new ffmpeg_movie($srcFile);
$srcwidth = $ffmpegobj->getFrameWidth();
echo $srcwidth;
//$srcwidth -= $srcwidth & 1;
//$srcheight = $ffmpegobj->getFrameHeight();
//$srcheight -= $srcwidth & 1;
//$srcsize=$srcwidth.'x'.$srcheight;
// $config['upload_path'] = 'c:/wamp/www/CodeIgniter/system/application/ffmpeg/';
// $config['allowed_types'] = 'avi|dat|flv|mp3|mp4|MPEG|rm|wmv';
// $config['max_size'] = '112400 ';
$this->load->library('upload', $config);
if ( ! $this->upload->do_upload('upload_file'))
{
$error = array('error' => $this->upload->display_errors());
echo $error['error'];
$this->load->view('upload_video', $error);
}
else
{ exec("$ffmpegPath -i {$srcFile} -sameq -acodec libmp3lame -ar 22050 -ab 32 -f flv -s {$srcSize} {$destFile}");
$data = array('upload_data' => $this->upload->data());
$this->load->view('upload_suceess');
//printf("frame height = %d pixels\n", $ffmpegobj->getFrameHeight());
//printf("frame width = %d pixels\n", $ffmpegobj->getFrameWidth());
//echo "hi ";
}