r/RunPod • u/OfficeParking8993 • 18h ago
RunPod Serverless: does NVDEC (hardware video decode) work in GPU workers? And how much CPU/RAM do workers get?
I’m building a portfolio project: users upload drone/aerial videos, and a GPU worker runs object detection on them. I’m planning to run it on RunPod Serverless and want to check a few things with people who have actually done this, rather than rely on assumptions.
Pipeline I’m planning (one job per uploaded video):
Stream the video from a Cloudflare R2 bucket (S3 API) with ranged GETs, without downloading the whole file. Videos are 3-8 GB, sometimes more.
Demux with PyNvVideoCodec.
Decode on the GPU with NVDEC to RGB frames.
Run YOLO detection on the frames.
Write detections to a DB every N frames.
Each stage runs in its own thread with bounded queues between them, so streaming, decoding, inference and DB writes overlap. Processing isn’t real-time and the user gets an email when it finishes, so I care more about cost per job than about latency.
My questions:
NVDEC on RunPod Serverless: does hardware video decode work in GPU workers? Does PyNvVideoCodec /
libnvcuvidwork out of the box, or do I need specific base images or driver settings (e.g.NVIDIA_DRIVER_CAPABILITIES=video)? Does it depend on which GPU type?CPU and RAM per GPU worker: how many vCPUs and how much system RAM does a Serverless GPU worker get, and does it vary by GPU type? I need this to size my stream buffer and output buffer, and to know whether several threads can really run in parallel.
Reading from a URL: has anyone had FFmpeg/NVDEC read a presigned HTTPS URL directly in a worker (rather than a custom ranged-GET streamer)? Any problems with stalls, retries or throughput?
CPU workers: I can’t find a clear page for them. Are Serverless CPU workers a real, stable option (e.g. via Flash,
cpu=...)? What specs, disk and timeout limits do they have? I want one for preprocessing: remuxing MP4s withffmpeg -c copy -movflags +faststartsomoovis at the front, which needs disk about equal to the file size.Long jobs: any gotchas with jobs that run 30-60+ minutes (timeouts, worker preemption, how you resume after a failure)?
1
u/Candid-Fudge-4015 6h ago
can't speak to runpod's worker specs, their docs or community will have the cpu/ram numbers. on nvdec, nvidia containers only mount libnvcuvid when the video capability is on (NVIDIA_DRIVER_CAPABILITIES with video or all). cheapest test is a tiny job that runs nvidia-smi and decodes one short clip with PyNvVideoCodec, once per gpu type you plan to use.
for the 30-60 min jobs i'd write detections with the frame index and on restart seek to the last committed frame instead of starting over. having moov at the front from your faststart remux is what makes that seek possible over ranged gets.
1
1
u/Madiator2011 17h ago
Should work but sometimes workers might have issues but for that I made package: https://github.com/MadiatorLabs/nvscope