从codeigniter中的视频生成缩略图

s8vozzvw  于 2021-06-18  发布在  Mysql
关注(0)|答案(0)|浏览(221)

我想从上传的视频生成缩略图图像,但问题是缩略图图像没有生成。上传的视频去上传文件夹,但在这个地方的形象是不产生..请看代码,并告诉我哪里我错了。

public function add_video() {                   // move_upload_file code

    if(!empty($_FILES['video']['name'])){

        $tmp_name_array = $_FILES['video']['tmp_name'];
        $n_array = $_FILES['video']['name'];
        $exp = explode('.', $n_array);
        $newnme = date('his').rand().'.'.end($exp);
        $raw_name = explode('.', $newnme);

        $full_path = base_url('uploads').'/'.$newnme;
        $new_path = base_url('uploads').'/';
        if(move_uploaded_file($tmp_name_array, "uploads/".$newnme))
        {                
            $full_path = base_url('uploads').'/'.$newnme;
            $new_path = base_url('uploads').'/';

            print_r(exec("ffmpeg -i ".$full_path." ".$new_path.$raw_name[0].".jpg"));

            echo "uploaded Successfully";
        }
    }else{

        echo "not selected any file";
    }
}

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题