Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Passing parameters to ffmpeg while using QtMultimedia
QtWS25 Last Chance

Passing parameters to ffmpeg while using QtMultimedia

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
ffmpegqmultimediaqml
4 Posts 4 Posters 791 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.
  • N Offline
    N Offline
    Nedurcuk
    wrote on 29 Mar 2024, 12:53 last edited by
    #1

    Hi,

    I am trying to use ffmpeg as QtMultimedia backend in windows and trying to display an rtp h264 stream.
    I use a sdp file for stream description. Using ffplay, I can easily play the stream by:

    .\ffplay.exe -protocol_whitelist file,udp,rtp -i .\stream.sdp
    

    Giving this sdp file as source of a QML Video item also works as:

    Video {
          id: mediaplayer
          width: 720
          height: 576
          onErrorChanged: console.log("play error", mediaplayer.errorString , error) // Failed to load source
          source: "file:///C:/stream.sdp"
          autoPlay: true
      }
    

    However, because I cannot pass -protocol_whitelist file,udp,rtp parameter to ffmpeg over QML, I end up the following error:
    [rtp @ 000002288B0A4000] Protocol 'rtp' not on whitelist 'file,crypto,data'!

    Is there a way to pass this -protocol_whitelist file,udp,rtp parameter to ffmpeg?

    Regards
    Alper

    C 1 Reply Last reply 21 Apr 2024, 08:07
    1
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 29 Mar 2024, 20:38 last edited by
      #2

      Hi and welcome to devnet,

      AFAIK, you currently can't.

      You should check the bug report system to see if there's a ticket related to that.

      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
      1
      • N Nedurcuk
        29 Mar 2024, 12:53

        Hi,

        I am trying to use ffmpeg as QtMultimedia backend in windows and trying to display an rtp h264 stream.
        I use a sdp file for stream description. Using ffplay, I can easily play the stream by:

        .\ffplay.exe -protocol_whitelist file,udp,rtp -i .\stream.sdp
        

        Giving this sdp file as source of a QML Video item also works as:

        Video {
              id: mediaplayer
              width: 720
              height: 576
              onErrorChanged: console.log("play error", mediaplayer.errorString , error) // Failed to load source
              source: "file:///C:/stream.sdp"
              autoPlay: true
          }
        

        However, because I cannot pass -protocol_whitelist file,udp,rtp parameter to ffmpeg over QML, I end up the following error:
        [rtp @ 000002288B0A4000] Protocol 'rtp' not on whitelist 'file,crypto,data'!

        Is there a way to pass this -protocol_whitelist file,udp,rtp parameter to ffmpeg?

        Regards
        Alper

        C Offline
        C Offline
        Chucken_79
        wrote on 21 Apr 2024, 08:07 last edited by
        #3

        @Nedurcuk

        Did you come up with any solution for this? I have the same issue!

        1 Reply Last reply
        0
        • J Offline
          J Offline
          Joger
          wrote on 26 Aug 2024, 11:24 last edited by Joger
          #4

          This will be fixed in the upcoming Qt 6.8 release, and is back-ported to 6.7.2. See https://bugreports.qt.io/browse/QTBUG-125006, which adds a check for the QT_FFMPEG_PROTOCOL_WHITELIST environment variable, which the user can set to override the whitelist with their own.

          1 Reply Last reply
          1

          • Login

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