![]() ![]() ![]() Return np.reshape(vec, (self.height, self.width)) Vec = np.frombuffer(self._last_chunk, dtype=dt) Logging.warning( 'Reloading ffmpeg process.') Time.sleep( 0.125) # Put your FPS threshold here if time.time() - started > self.MAX_FRAME_WAIT: While self._last_frame_read = ame_number: Self.process = subprocess.Popen(args, stdout=subprocess.PIPE, stderr=FNULL) bug( 'Opening ffmpeg process with command "%s"' % command) format(rtsp=self.rtsp_url, width=self.width, height=self.height) Self.launch_string = 'appsrc name=source is-live=true block=true format=GST_FORMAT_TIME ' \ ![]() Self.duration = 1 / self.fps * Gst.SECOND # duration of a frame in nanoseconds Super(SensorFactory, self)._init_(**properties) Gi.require_version( 'GstRtspServer', '1.0')įrom gi.repository import Gst, GstRtspServer, GObjectĬlass SensorFactory(GstRtspServer.RTSPMediaFactory): I also tried another solution based on Write opencv frames into gstreamer rtsp server pipeline import cv2 Out = cv2.VideoWriter( 'appsrc ! videoconvert ! ' 'x264enc noise-reduction=10000 speed-preset=ultrafast Can anyone assist with proper arguments to gst-launch-1.0? The ones I tried got stuck in "Pipeline is PREROLLING" import cv2 I tried the following based on Write in Gstreamer pipeline from opencv in python, but I was unable to figure out what the appropriate gst-launch-1.0 arguments should be to create the rtsp server. My goal is to read frames from an rtsp server, do some opencv manipulation, and write the manipulated frames to a new rtsp server.
0 Comments
Leave a Reply. |