jeudi 13 mai 2021

Converted video is getting blur in FFMpeg

I have a video and converted to mp4 format. I am using FFMpeg to convert the video. Video conversion is successfully done but video is getting blur. any Help?

    $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)


via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire