Solved RTSP Stream with Qt
-
Hi°, I have an RTSP address that can be play on VLC. When i try to play it with QMediaPlayer i am getting this error:
DirectShowPlayerService::doSetUrlSource: Unresolved error code 800c000d
QMediaPlayer *player; player = new QMediaPlayer(this); QGraphicsScene *scene = new QGraphicsScene; ui->graphicsView->setScene(scene);
player->setMedia(QUrl("rtsp://192.168.0.55.....")); player->play();
When i try to play an mp4 file, it is ok but rtsp address cannot be shown. Any information?
-
Hi
It depends on the backend, Qt is using for media on each platform.
On linux, its gstreamer which can handle RTSP but on windows, its DirectShow and
i think you need something extra for it to work.
https://sourceforge.net/projects/rtspdirectshow/Disclaimer. i did not try this myself. just read about it.
-
Hi,
I once used RTSP streams together with Qt.There I used OpenCV in the middle. It uses ffmpeg as backend and ffmpeg can handle RTSP.
An OpenCV mat can easily be converted to e.g. QImage.Probably you could also use ffmpeg directly without OpenCV.
Maybe this helps.
-