Set of Python bindings to C++ libraries which provides full HW acceleration for video decoding, encoding and GPU-accelerated color space and pixel format conversions
I want to save an encoded .h264 file. I use this to save a file.
success = nvEnc.EncodeSingleFrame(rawFrame, encFrame, sync=False)encByteArray = bytearray(encFrame)encFile.write(encByteArray)
I would recommend looking into PyAV to decode additional information from the container. I found some PR around it, might be a good starting point. https://github.com/PyAV-Org/PyAV/pull/924
I want to save an encoded .h264 file. I use this to save a file.
success = nvEnc.EncodeSingleFrame(rawFrame, encFrame, sync=False)
encByteArray = bytearray(encFrame)
encFile.write(encByteArray)
https://github.com/NVIDIA/VideoProcessingFramework/blob/7ab13cb035fb3aa33eca0b76d2815336211945f3/samples/SampleEncode.py#L96-L119
Then I analyze the file, there is no sei inside. How to encode with sei? I find that there is a function to encode with sei, but I do not know how to get sei numpy.ndarray firstly. https://github.com/NVIDIA/VideoProcessingFramework/blob/7ab13cb035fb3aa33eca0b76d2815336211945f3/src/PyNvCodec/__init__.pyi#L451