how to specify the GPU to be used by nvenc in ffmpeg [closed]

耗尽温柔 提交于 2019-11-30 19:14:38

问题


I'm using ffmpeg executable for transcoding mpegts stream from h264 to h265 with nvenc and I have two nvidia Graphic Cards installed on my motherboard: GeForce GTX 690 and Tesla k-10. is there any codec specific parameters for nvenc in ffmpeg to choose to encode with any of these GPU which I want?


回答1:


The nvenc encoders have a GPU option which allow both to list and also to select GPUs to be used for encoding.

So, use

ffmpeg -f lavfi -i nullsrc -c:v h264_nvenc -gpu list -f null -

Above, a dummy video source is generated and then piped to null. Meanwhile, FFmpeg will list the list of available GPUs.

Once known, a specific GPU can selected by adding -gpu N to the encoding command where N is the device #.



来源:https://stackoverflow.com/questions/40424350/how-to-specify-the-gpu-to-be-used-by-nvenc-in-ffmpeg

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!