Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Live stream with Qt5
Forum Update on Monday, May 27th 2025

Live stream with Qt5

Scheduled Pinned Locked Moved General and Desktop
5 Posts 3 Posters 5.4k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • freddy311082F Offline
    freddy311082F Offline
    freddy311082
    wrote on last edited by
    #1

    Hi... I'm trying to show a live streaming using Qt5 and this is my code:

    @
    #include "MainWindow.h"
    #include <QApplication>
    #include <QMediaPlayer>
    #include <QUrl>
    #include <QVideoWidget>

    int main(int argc, char argv[])
    {
    QApplication a(argc, argv);
    QMediaPlayer
    mPlayer = new QMediaPlayer;
    mPlayer->setMedia(QUrl("http://www.youtube.com/watch?feature=player_detailpage&v=U2CKDRQBUsI"));
    QVideoWidget* videoWidget = new QVideoWidget;
    mPlayer->setVideoOutput(videoWidget);
    videoWidget->show();
    mPlayer->play();
    return a.exec();
    }
    @

    the error that I have is this one:

    @
    Warning: "No decoder available for type 'text/html'."
    Error: "Your GStreamer installation is missing a plug-in."
    @

    some help please

    best regards

    Freddy

    1 Reply Last reply
    0
    • R Offline
      R Offline
      rcari
      wrote on last edited by
      #2

      Your Youtube URL is pointing to an HTML page, not to an actual video stream this explains the text/html content type in the HTTP reply.
      It used to be possible to get an http link to the video stream on YouTube but it's now very complicated as Google is trying to protect the content from stealing.

      1 Reply Last reply
      0
      • freddy311082F Offline
        freddy311082F Offline
        freddy311082
        wrote on last edited by
        #3

        so... it's mean that if I have a real live streaming url, I can show it with the code before ???

        well, for example, I will lke to get the stream from my webcam, send it to one port of my computer, and read it from the network with one code like the last one... how can I do dat using just Qt5 ?

        because I need generate live stream and read it to....

        some help please.....

        1 Reply Last reply
        0
        • raven-worxR Offline
          raven-worxR Offline
          raven-worx
          Moderators
          wrote on last edited by
          #4

          [quote author="freddy311082" date="1383520350"]so... it's mean that if I have a real live streaming url, I can show it with the code before ???[/quote]
          should be... if gstreamer supports the type of the stream.

          Alternatively you can look at "this":http://derekmolloy.ie/custom-video-streaming-player-using-libvlc-and-qt/.

          --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
          If you have a question please use the forum so others can benefit from the solution in the future

          1 Reply Last reply
          0
          • freddy311082F Offline
            freddy311082F Offline
            freddy311082
            wrote on last edited by
            #5

            bus as I can see, Qt5Multimedia library is implemented with gstreamer, and, I don't know if I there is some way to do this

            1 Reply Last reply
            0

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved