Playing udp stream using QMediaPlayer
I have to write an application to play udp stream using QMediaPlayer and QVideoWidget. I am using these stuffs in my application as follow:
QMediaPlayer *player = new QMediaPlayer(this); QMediaPlaylist *playlist = new QMediaPlaylist(); QVideoWidget *videoWidget = new QVideoWidget(this); player->setPlaylist(playlist); player->setVideoOutput(videoWidget); playlist->addMedia(QUrl("udp://192.168.55.16:9001"));
But it is not working Linux (Ubuntu 1604). However the same code working perfectly on windows with Leadtools and DirectShow. Further I am able to play
RTSP stream on Linux.
Please let me know why it is not working on Linux. GStreamer-1.0 is already installed on my system. Does it can be accomplish only by using QtGStreamer ?
Hi @gsharma ,
I see you solved your problem. I have similar problem. I use qt-5.10 and IP camera. I want to stream with rtsp. Also want to see at QMediaPlayer. Could you please help me. How did you solve problem. Also do you know tutorial about this.