im playing with my video files, I want to convert them from mp4, mkv, wmv, avi, flv, mov... to webm.
So I have written this:
for file in *
do
if [ -f "$file" ]
then filename="${file%.*}"
../ffmpeg -hwaccel nvdec -hwaccel_device 0 -hwaccel_output_format cuda -i "$file" -c:v vp9 -b:v 0 -crf 31 -c:a libvorbis "$filename".webm
fi
done
As shown, I have compiler my own ffmpeg binary, with those options:
./configure --enable-gpl --enable-libx264 --enable-nonfree --enable-cuda-nvcc --enable-libvpx --enable-vaapi --enable-libvorbis --enable-libnpp --extra-cflags=-I/usr/local/cuda/include --extra-ldflags=-L/usr/local/cuda/lib64
It works, but, with CPU I got speed 0,1x and with cuda... almost the same.
My CPU? 11th Gen Intel(R) Core(TM) i7-11800H
My GPU? GeForce RTX™ 3060 mobile
Filesize? 300-3000mb (same speed with any)
Is there anything I could do? (I also tried vp9_vaapi, getting
Impossible to convert between the formats supported by the filter 'Parsed_null_0' and the filter 'auto_scale_0'
Error reinitializing filters!
Failed to inject frame into filter network: Function not implemented
Any clue? Or do I have to give up?
Thanks
Well, after some tests, the bests results were obtained using
-c:v libvpx-vp9 -cpu-used 8 -deadline realtime
speed increased from 0,05x to 1,12x slow, but, good enough.
Quality is good for me.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.