Playing a network streaming video using Qt MultiMedia and Widgets
<p>I am trying to build a simple qt application which will play a live video stream. The streaming video is not playing in my app. I have played a local file using qt but i can't play the live video stream. I have found this links but they didn't help me :-</p>

<p><a href="https://stackoverflow.com/questions/21448027/play-a-live-video-stream-using-qt">Play a Live video Stream using Qt</a></p>

<p><a href="https://stackoverflow.com/questions/30494319/qt-stream-ip-camera-video">Qt Stream IP Camera Video</a></p>

<p>Here is the code:-</p>

<pre><code>#include &lt;QApplication&gt;
#include &lt;QtMultimediaWidgets/QVideoWidget&gt;
#include &lt;QtMultimedia/QMediaPlayer&gt;
int main(int argc, char *argv[])
{
    QApplication a(argc, argv);

    QMediaPlayer *player = new QMediaPlayer;
    QMediaContent *mc=new QMediaContent(QUrl("http://192.168.42.129:8080/video"));
    player-&gt;setMedia(*mc);
    player-&gt;setVolume(50);
    QVideoWidget *videoWidget = new QVideoWidget;
    videoWidget-&gt;resize(700,700);
    videoWidget-&gt;show();
    player-&gt;setVideoOutput(videoWidget);
    player-&gt;play();

    qDebug()&lt;&lt;player-&gt;availableMetaData()&lt;&lt;player-&gt;currentMedia().canonicalUrl();
    qDebug()&lt;&lt;player-&gt;errorString();

    return a.exec();
}
</code></pre>

<p>I am using an app in my android phone to stream the video. The streamed video is playing on VLC media player, Opera Browser, Mozilla Browser. I have tried different formats like MOV, MKV, WEBM (The app says MP4 is not supported by the hardware renderer in my phone). Please help, stuck on it for a while.</p>

<p><strong>EDIT -</strong> I don't want to use any other library like libVLC because I noticed the streaming video is lagging in vlc media player. It may have some performance issues.</p>