NVidia Geforce 그래픽 카드를 사용하여 Ubuntu 22.04LTS에 CUDA를 설치했습니다. 현재 이 명령을 실행하여 전체 데스크탑을 캡처하려고 합니다.
ffmpeg -y -hide_banner \
-hwaccel cuda \
-f x11grab \
-framerate 25 \
-video_size 3840x2160 \
-i :1.0+0,0 \
-vf "scale_npp=1920:-1" \
-c:v hevc_nvenc -cq:v 21 -preset slow \
output.mp4
필터 scale_npp
로 인해 다음 오류가 발생합니다.
Impossible to convert between the formats supported by the filter 'graph 0 input from stream 0:0' and the filter 'auto_scale_0'
[vf#0:0 @ 0x561418cffe00] Error reinitializing filters!
[vf#0:0 @ 0x561418cffe00] Task finished with error code: -38 (Function not implemented)
[vf#0:0 @ 0x561418cffe00] Terminating thread with return code -38 (Function not implemented)
[vost#0:0/hevc_nvenc @ 0x561418ce2840] Could not open encoder before EOF
[vost#0:0/hevc_nvenc @ 0x561418ce2840] Task finished with error code: -22 (Invalid argument)
[vost#0:0/hevc_nvenc @ 0x561418ce2840] Terminating thread with return code -22 (Invalid argument)
[out#0/mp4 @ 0x561418ce0c00] Nothing was written into output file, because at least one of its streams received no packets.
오류로 인해 모든 것이 제대로 작동하는지 모르겠습니다 Function not implemented
.
일반적으로 저는 GPU에서 모든 작업이 완료되었는지 확인한 다음 최종 결과를 출력 파일로 보내고 싶습니다.
다음은 시스템의 몇 가지 출력입니다.
ffmpeg -hide_banner -h encoder=hevc_nvenc
Encoder hevc_nvenc [NVIDIA NVENC hevc encoder]:
General capabilities: dr1 delay hardware
Threading capabilities: none
Supported hardware devices: cuda cuda
Supported pixel formats: yuv420p nv12 p010le yuv444p p016le yuv444p16le bgr0 bgra rgb0 rgba x2rgb10le x2bgr10le gbrp gbrp16le cuda
ffmpeg -hide_banner -h filter=scale_npp
Filter scale_npp
NVIDIA Performance Primitives video scaling and format conversion
Inputs:
#0: default (video)
Outputs:
#0: default (video)