Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/276.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 转换后的视频在FFMpeg中变得模糊_Php_Laravel 5_Video_Ffmpeg - Fatal编程技术网

Php 转换后的视频在FFMpeg中变得模糊

Php 转换后的视频在FFMpeg中变得模糊,php,laravel-5,video,ffmpeg,Php,Laravel 5,Video,Ffmpeg,我有一个视频,并转换成mp4格式。我正在使用FFMpeg转换视频。视频转换已成功完成,但视频变得模糊。有什么帮助吗 你说模糊是什么意思?压缩伪影?@Felixkruemel视频在转换后变得不清晰或不清晰。请在转换前后上传一个简短的示例。两张截图也足够了 $fileName = "convertedVideoFile.mp4"; $mp4File = "oldVideoFile.mp4"; $format = new X26

我有一个视频,并转换成mp4格式。我正在使用FFMpeg转换视频。视频转换已成功完成,但视频变得模糊。有什么帮助吗


你说模糊是什么意思?压缩伪影?@Felixkruemel视频在转换后变得不清晰或不清晰。请在转换前后上传一个简短的示例。两张截图也足够了
    $fileName = "convertedVideoFile.mp4";
    $mp4File = "oldVideoFile.mp4";
    
    $format = new X264('aac', 'libx264');

    // create object
    $ffmpeg = FFMpeg::create([
        'ffmpeg.binaries'  => exec('which ffmpeg'),
        'ffprobe.binaries' => exec('which ffprobe'),
        'timeout'          => 3600, // The timeout for the underlying process
        'ffmpeg.threads'   => 12,   // The number of threads that FFMpeg should use
    ]);

    // open the file.
    $video = $ffmpeg->open($mp4File);
    $video
        ->filters()
        ->resize(new Dimension(320, 240))
        ->synchronize();

    $video->save($format, 'video/'.$fileName)