Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. General talk
  3. Brainstorm
  4. Play H.264 Elementary Stream
Forum Updated to NodeBB v4.3 + New Features

Play H.264 Elementary Stream

Scheduled Pinned Locked Moved Brainstorm
16 Posts 5 Posters 21.2k Views 2 Watching
  • 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.
  • V Offline
    V Offline
    Vincent007
    wrote on last edited by
    #6

    QMediaPlayer cannot help you? QMediaPlayer can decode video files.

    1 Reply Last reply
    0
    • BonganiB Offline
      BonganiB Offline
      Bongani
      wrote on last edited by
      #7

      @HeresJonny and @SGaist , Did you finally find a solution for this problem ?

      1 Reply Last reply
      0
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #8

        The links provided by @andreyc are a good starting point.

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply
        0
        • BonganiB Offline
          BonganiB Offline
          Bongani
          wrote on last edited by
          #9

          @SGaist i am receiving raw h264 frames from a QTCP socket, i need a function or library where i will pass the h264 data (QByteArray) from a http payload, and decode it to pass it to a video player. The QT Multimedia library doesn't work with encoded data. i already tried using the QTAV library but there's is no luck in Reaching what i need. Please help.

          1 Reply Last reply
          0
          • SGaistS Offline
            SGaistS Offline
            SGaist
            Lifetime Qt Champion
            wrote on last edited by
            #10

            What OS are you targeting ?

            Interested in AI ? www.idiap.ch
            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

            1 Reply Last reply
            0
            • BonganiB Offline
              BonganiB Offline
              Bongani
              wrote on last edited by
              #11

              @SGaist Windows, Preferably 7 to 10.

              1 Reply Last reply
              0
              • SGaistS Offline
                SGaistS Offline
                SGaist
                Lifetime Qt Champion
                wrote on last edited by
                #12

                Do you have any h264 codec installed ?

                Interested in AI ? www.idiap.ch
                Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                1 Reply Last reply
                0
                • BonganiB Offline
                  BonganiB Offline
                  Bongani
                  wrote on last edited by
                  #13

                  @SGaist Yes, unfortunately VLC-QT from https://vlc-qt.tano.si doesn't support the particular functionality i require. i also tried using the QTAV library from http://www.qtav.org, which uses the ffmpeg library. none of these are of help because they don't support raw h264 bit streaming. you can check my conversation with on of the repository admins here https://github.com/wang-bin/QtAV/issues/510. I was wondering if QT has a library i could pass my QByteArray data (raw h264 data) from a QTCPSocket and decodes the bit-stream and stream it live.

                  1 Reply Last reply
                  0
                  • SGaistS Offline
                    SGaistS Offline
                    SGaist
                    Lifetime Qt Champion
                    wrote on last edited by
                    #14

                    Are you sure that FFMPEG doesn't help ? See this

                    Interested in AI ? www.idiap.ch
                    Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                    1 Reply Last reply
                    0
                    • BonganiB Offline
                      BonganiB Offline
                      Bongani
                      wrote on last edited by
                      #15

                      @SGaist

                      AVPacket avpkt; int err, frame_decoded = 0;
                      AVCodec *codec = avcodec_find_decoder ( AV_CODEC_ID_H264 );
                      AVCodecContext *codecCtx = avcodec_alloc_context3 ( codec );
                      avcodec_open2 ( codecCtx, codec, NULL );
                      // Set avpkt data and size here
                      err = avcodec_decode_video2 ( codecCtx, avframe, &frame_decoded, &avpkt );
                      
                      

                      avframe being the QByteArray data from the socket ?

                      1 Reply Last reply
                      0
                      • SGaistS Offline
                        SGaistS Offline
                        SGaist
                        Lifetime Qt Champion
                        wrote on last edited by
                        #16

                        You'll likely have build your avframe with the data contained by the QByteArray

                        Interested in AI ? www.idiap.ch
                        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                        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