When I use ffmpeg -f lavfi -i ddagrab -c:v h264_nvenc -cq 18 -y testing.mp4, FFmpeg CPU utilization is around 0%: Note: I couldn't test the QSV solution yet. The main advantage of ddagrab over gdigrab is that ddagrab doesn't transfer the video frame from the GPU to the CPU (and also saves the pixel format conversions).Įxample for using ddagrab with NVIDIA GPU:įfmpeg -f lavfi -i ddagrab -t 00:00:05 -c:v h264_nvenc -cq 18 -y output.mp4Įxample for using ddagrab with Intel Quick Sync:įfmpeg -init_hw_device qsv=hw,child_device_type=dxva2 -filter_hw_device hw -f lavfi -i ddagrab -t 00:00:05 -c:v h264_qsv -b:v 5M -y testing.mp4 When GPU encoding is used, gdigrab may not be the most efficient solution.įFmpeg version 6 (not yet stable release) supports ddagrab for capturing the Windows Desktop. In case your system has discrete GPU, it may be possible to use the discrete GPU for encoding the video. The following command is working in my machine (but 20% CPU utilized by FFmpeg):įfmpeg -init_hw_device qsv=hw,child_device_type=dxva2 -filter_hw_device hw -f dshow -i video="screen-capture-recorder" -t 00:00:05 -c:v h264_qsv -b:v 5M -y testing.mp4 Note: I am getting an error message: "Impossible to convert between the formats supported by the filter" (I think it's an issue with my system configuration because QSV encoding is not working in general). It may not work if your system doesn't support Intel Quick Sync.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |