i'm just new to symfony, i'm having trouble with using ffmpeg on symfony. i just modified this code which work properly on code igniter framework for symfony. but it doesn't save the 10sec audio file on the directory path? and i need to save this as well to the database?
here's my code: public function executeIndex($request) { $this->form = new WebsiteForm(); if ($request->isMethod('post')) { $this->form->bind($request->getParameter('website'), $request- >getFiles('website')); if ($this->form->isValid()) { $file = $this->form->getValue('file'); $filename = 'uploaded_'.sha1($file->getOriginalName()); $extension = $file->getExtension($file->getOriginalExtension ()); $file->save(sfConfig::get('sf_upload_dir').'/'.$filename. $extension); $uploaded = $this->form->save(); $ffmpegPath = 'c:\wamp\bin\ffmpeg\bin\ffmpeg.exe'; $sourcePath = sfConfig::get('sf_upload_dir').'/'.$uploaded->getFile ();; $destinationPath = sfConfig::get ('sf_upload_dir').'/'.'_preview'.$uploaded->getFile();; if ( $this->form->getValue('streamtype') == '10' ) { exec($ffmpegPath.' -i '.$sourcePath.' -t 10 -acodec copy '. $destinationPath); unlink($sourcePath); ($destinationPath, sfConfig::get('sf_upload_dir').$filename. $extension); } $this->redirect('website/show?id='.$uploaded->getId()); } } } i would really appreciate some help. thanks guys! --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~----------~----~----~----~------~----~------~--~---