Today, I will show, how can we upload and convert a video file to flv using FFmpeg in CodeIgniter website. FFmpeg commands runs in Linux but in Window server we need to download FFmpeg.exe file from its site. Which we have to put in our site root folder. IF your server is Linux then you also need verify that your hosting server has FFmpeg installed or you need it to be installed. For checking FFmpeg availability print phpinfo() in any file and run this command on server where you will get PHP version and other server settings. Find FFmpeg on that window if it doesn’t found then it means server has no FFmpeg installed.
2 thoughts on “CodeIgniter Tutorial: Upload and Convert video to FLV using FFmpeg.”
Comments are closed.
Hi i put this code in controller but i am unable to upload plz tell me how i do this. plz tell me step by step i am new………
load->model(‘files_model’);
$this->load->database();
$this->load->helper(‘url’);
}
public function index()
{
$this->load->view(‘upload’);
}
public function upload_file()
{
$status = “”;
$msg = “”;
$file_element_name = ‘userfile’;
$filename = $_FILES[‘userfile’][‘name’];
if ($status != “error”)
{
$config[‘upload_path’] = ‘./uploads/’;
$config[‘allowed_types’] = ‘*’;
$config[‘max_size’] = 1024 * 8;
$config[‘encrypt_name’] = TRUE;
$this->load->library(‘upload’, $config);
if (!$this->upload->do_upload($file_element_name))
{
$status = ‘error’;
$msg = $this->upload->display_errors(”, ”);
}
else
{
$data = $this->upload->data();
// echo “
I used this code but the converter is not worked what to do now…. Please help me…