Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Jetson - embedding hardware decoded video stream into Qt
Forum Updated to NodeBB v4.3 + New Features

Jetson - embedding hardware decoded video stream into Qt

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
4 Posts 4 Posters 254 Views 3 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.
  • L Offline
    L Offline
    luka.ib
    wrote on last edited by
    #1

    Platform: Jetson Orin Nano 8gb dev kit running 22.04.5 LTS Jammy

    I’ll going to keep this short and right to the issue.
    I'm trying to take a video stream (HLS for now), hardware decode it, fully utilizing Jetsons capabilities, and then display it within a simple Qt GUI.

    Is there a way to embed a video stream into Qt without leaving GPU memory? I've seen online elements like qml6glsink be mentioned but I am limited to GStreamer 1.20 because NVIDIA's hardware acceleration elements are only available in that version.

    My test Gstreamer pipline works no problem:

    gst-launch-1.0 souphttpsrc location="https://cdn-004.whatsupcams.com/hls/hr_dubrovnik07.m3u8" ! hlsdemux ! tsdemux ! queue ! h264parse ! nvv4l2decoder ! nvvidconv ! nveglglessing
    

    My question is, what can I do to display my hardware accelerated stream within Qt? The video stream must be embedded within a GUI and not be opened in a separate window.
    As I see it, I have a couple of options:

    Build a newer version of GStreamer to access elements like qml6glsink (will NVIDIA elements still work?)
    use nveglglessink + VideoOverlay (kind of a hack + could I add an overly to it?)
    Use software decoding

    Just to note, I am very new with Jetson env, Qt and video signal processing so if you have any resources on how to achieve my goal, I would appriciate it 🙏

    Ronel_qtmasterR 1 Reply Last reply
    0
    • L luka.ib

      Platform: Jetson Orin Nano 8gb dev kit running 22.04.5 LTS Jammy

      I’ll going to keep this short and right to the issue.
      I'm trying to take a video stream (HLS for now), hardware decode it, fully utilizing Jetsons capabilities, and then display it within a simple Qt GUI.

      Is there a way to embed a video stream into Qt without leaving GPU memory? I've seen online elements like qml6glsink be mentioned but I am limited to GStreamer 1.20 because NVIDIA's hardware acceleration elements are only available in that version.

      My test Gstreamer pipline works no problem:

      gst-launch-1.0 souphttpsrc location="https://cdn-004.whatsupcams.com/hls/hr_dubrovnik07.m3u8" ! hlsdemux ! tsdemux ! queue ! h264parse ! nvv4l2decoder ! nvvidconv ! nveglglessing
      

      My question is, what can I do to display my hardware accelerated stream within Qt? The video stream must be embedded within a GUI and not be opened in a separate window.
      As I see it, I have a couple of options:

      Build a newer version of GStreamer to access elements like qml6glsink (will NVIDIA elements still work?)
      use nveglglessink + VideoOverlay (kind of a hack + could I add an overly to it?)
      Use software decoding

      Just to note, I am very new with Jetson env, Qt and video signal processing so if you have any resources on how to achieve my goal, I would appriciate it 🙏

      Ronel_qtmasterR Offline
      Ronel_qtmasterR Offline
      Ronel_qtmaster
      wrote on last edited by
      #2

      @luka.ib Hi Luka. You need to take each videoframe of your streaming , convert it to Image and then display It inside the Qt GUi windows in realtime. You will create a separated thread for getting the VideoFrames and converting them, then send the updated Image to the UI. It should be okay that way.

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

        Hi and welcome to devnet,

        Which exact version of Qt are you using ?
        If you are locked to that old version of GStreamer, one option is to use Qt5 which provides the option of starting custom GStreamer pipelines and display them. Taking into account the fact that Qt 5 has reached end of life but it could be a 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
        2
        • mrdebugM Offline
          mrdebugM Offline
          mrdebug
          wrote last edited by
          #4

          https://github.com/denisgottardello/QtFFmpegPlayer

          Works on Qt5 and 6, play a remote file, rtsp, webcam etc. It is based on ffmpeg library and, as explained above, the gpu usage is related at the size and definition of the stream.

          Need programmers to hire?
          www.labcsp.com
          www.denisgottardello.it
          GMT+1
          Skype: mrdebug

          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