is it possible streaming video via network?
I know there's some example how to shows how to the play a video using a local video file and the samples codes works fine. But as soon as i replace the local video file with my url of video server, it doesn't work.
and i got a warning msg "Warning: "No decoder available for type 'video/x-asf-unknown, fourcc=(uint)1986490477'."".
I used the same url on vlc player or mpv, these player is able to stream the live video feed from my video server properly. Is it possible to use QMediaPlayer to stream live video feed via network?
Some forum said need to libvlc to this. Anyone can point me to right and easier way to do this?
QMediaPlayer *player = new QMediaPlayer(); QVideoWidget *videoWidge = new QVideoWidget(); videoWidge->show(); //load the mp4 video file directly works ok. //player->setMedia(QUrl::fromLocalFile("/home/test/testVide.mp4")); //try to to connect to my video server QUrl url = QUrl("http://192.168.0.1:1234"); const QNetworkRequest requete(url); player->setMedia(requete); player->setVideoOutput(videoWidge); player->play();
Thanks in advance.
If you want more advanced multimedia capability then the VLC-Qt project is likely what you want use.