You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to encode videos frames, like
from nvcodec import VideoSource, VideoDecoder, VideoEncoder
import numpy as np
import cv2
import ctypes
if __name__=="__main__":
video_stream = cv2.VideoCapture("00021.mp4")
encFile = open("test.h264", "wb")
encoder = VideoEncoder(224, 224)
while True:
success, frame = video_stream.read()
if not success:
break
frame = cv2.cvtColor(frame, cv2.COLOR_BGR2RGB)
packets = encoder.encode(frame)
print(packets)
encFile.write(packets)
encFile.close()
when I an runing the code, I am getting following error?
ValueError: Parse the argument FAILED! You should pass ABGR image numpy array by heightwidthchannel!
The text was updated successfully, but these errors were encountered:
I am trying to encode videos frames, like
from nvcodec import VideoSource, VideoDecoder, VideoEncoder
import numpy as np
import cv2
import ctypes
when I an runing the code, I am getting following error?
ValueError: Parse the argument FAILED! You should pass ABGR image numpy array by heightwidthchannel!
The text was updated successfully, but these errors were encountered: