Closed SiftingSands closed 1 year ago
Nevermind, forgot that you just have to pass a PacketData object to DecodeSingleSurface
...
packet_data = nvc.PacketData()
while True:
# Decode NV12 surface
src_surface = nvDec.DecodeSingleSurface(packet_data)
...
I'm working off of https://github.com/NVIDIA/VideoProcessingFramework/blob/master/samples/SamplePyTorch.py to get a PyTorch GPU tensor for a frame and the corresponding packet data such as
dts
with the built-in demuxer.DecodeSingleSurface()
only returns a surface, so I tried the following:Which returns an error after a few frames
I looked at the other issues here related to "HW reset", but those didn't appear immediately applicable. This video decodes fine if I just call
DecodeSingleSurface()
(aka removing my modifications to the script).Do I need to switch to FFmpeg's demuxer to get this to work, or is there a way with the builtin demuxer that I'm missing?