We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The idea is to use GStream with OpenCV to compress a video.
The code raises an error because of the pipeline
My code is: `compressed_video_path = os.path.join(picture_path, f"{datetime.datetime.now()}.mp4")
gst_pipeline = ( f"appsrc format=GST_APP_FORMAT_TIME ! videoconvert ! x264enc ! mp4mux ! filesink location={compressed_video_path}" ) recorded_video = cv2.VideoWriter(gst_pipeline, cv2.CAP_GSTREAMER, 0, self.camera_fps, (self.frame_size[1], self.frame_size[0])) if not recorded_video.isOpened(): raise ValueError("Error!!!") for frame in frames_to_compress: recorded_video.write(frame) recorded_video.release() rospy.loginfo(f"Compressed video saved in {compressed_video_path}.")`
And when calling the ros service involved, I have the error "Error!!!"
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Expected behaviour
The idea is to use GStream with OpenCV to compress a video.
Actual behaviour
The code raises an error because of the pipeline
Steps to reproduce
My code is:
`compressed_video_path = os.path.join(picture_path, f"{datetime.datetime.now()}.mp4")
And when calling the ros service involved, I have the error "Error!!!"
The text was updated successfully, but these errors were encountered: