I have the following ffmpeg command that converts and scales an input video using cuda:
ffmpeg -hwaccel cuda -hwaccel_output_format cuda -i input.mp4 -c:a copy –vf scale_npp=-1:360:interp_algo=super -c:v h264_nvenc -b:v 5M output.mp4
I'm trying to use Laravel FFMpeg to convert using the following code:
FFMpeg::fromDisk('sources')
->setInitialParameters(['-hwaccel', 'cuda', '-hwaccel_output_format', 'cuda'])
->open($file)
->export()
->toDisk('indexed')
->setAdditionalParameters(['-c:a', 'copy', '–vf', 'scale_npp=-1:360:interp_algo=super', '-c:v', 'h264_nvenc', '-b:v', '5M'])
->save($file);
But the command tries to execute the following command (notice the absence of filenames):
fmpeg.exe -y -hwaccel cuda -hwaccel_output_format cuda -c:a copy –vf scale_npp=-1:360:interp_algo=super -c:v h264_nvenc -b:v 5M
Any idea what I'm doing wrong?
I can live with using directly PHP FFMpeg if the Laravel wrapper can't do it.
Thanks