-1

i'm using ffmpeg and an NVIDIA for my video transcode process. so i have one problem. look at below image :

screenshot

one process just use 263MiB of my second GPU. not completly use that !!

that is not good. i think there should be a way to remove this limitation for gpu process.

my ffmpeg command that i run is:

ffmpeg -y -loglevel info -hwaccel cuda -hwaccel_output_format cuda -hwaccel_device 1 -i "MYVIDEO" -vf scale_npp=w=426:h=240 -c:v h264_nvenc -profile:v main -b:v 400k -sc_threshold 0 -g 25 -keyint_min 25 -bf 2   -c:a aac -b:a 64k -ar 48000   -f hls -hls_time 6 -hls_playlist_type vod   -hls_allow_cache 1   -hls_segment_filename f-0-seg-%d.ts f-0.m3u8
talonmies
  • 70,661
  • 34
  • 192
  • 269
R.A.M
  • 82
  • 1
  • 8
  • 1
    What limitation are you referring to? – talonmies Mar 15 '21 at 11:55
  • @talonmies my second GPU has 8126MiB memory. my ffmpeg process just use 263MiB of that. so about 7800 MiB of my GPU is free. i just want use all of them to speed up process – R.A.M Mar 15 '21 at 12:10
  • 1
    What makes you think that using more memory would "speed up process"? The video encoding and decoding APIs don't even use the graphics shader hardware. Despite the name it has nothing to do with CUDA, there is separate dedicated silicon for video – talonmies Mar 15 '21 at 12:21

1 Answers1

2

There is no limitation going on here, At least not related to memory.

You are scaling the video to 426x240 Assuming 4:2:0 subsampling, That is 153K per frame. The encoder needs 16 frames at most. Which is a little over 2MB. The GPU is using over 100 times that.

szatmary
  • 29,969
  • 8
  • 44
  • 57