Record rtsp stream QMediaplayer
Unsolved
General and Desktop
-
Hello,
I have an rtsp camera stream that i can display using QMediaplayer and I want to record parts of the videostream using QMediarecorder. Can I connect the object QMediaplayer to either a QMediarecorder or a QMediaCaptureSession?
I can display the rtsp stream using the following code and I want to add the recording of the video to this. This is made using PyQt6 and works on windows and debian linux
video_widget = QtMultimediaWidgets.QVideoWidget()
rtsp_source = QtCore.QUrl(<url to rtsp stream>)
media_player = QtMultimedia.QMediaPlayer()
media_player.setSource(rtsp_source)
media_player.setVideoOutput(video_widget )video_widget.show()
media_player.play()Thanks in advance for any help