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. How to build a QT bluethooth music player
QtWS25 Last Chance

How to build a QT bluethooth music player

Scheduled Pinned Locked Moved Unsolved General and Desktop
bluethoothmusicraspberry pisongsmetadata
4 Posts 2 Posters 1.5k 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.
  • E Offline
    E Offline
    ElPadre
    wrote on 21 Jan 2022, 06:57 last edited by
    #1

    Hello,
    what i want to create a bluethooth speaker with QT (on a RaspberryPi).
    So I want to connect my phone via Bluethooth to the RaspberryPi and the QT programm should show me the song titel, how long the song takes, a button to skip the song, change volume and so on.

    I am allready able to connect the phone with the QT programm and the music is also playing over the speaker of the RaspberryPi but how I am able to access the music metadata to show the song titel? And how can I tell the phone to pause the song and so on?

    I hope you guys can help me.

    Best regards,
    Leon

    R 1 Reply Last reply 21 Jan 2022, 08:30
    0
    • E ElPadre
      21 Jan 2022, 06:57

      Hello,
      what i want to create a bluethooth speaker with QT (on a RaspberryPi).
      So I want to connect my phone via Bluethooth to the RaspberryPi and the QT programm should show me the song titel, how long the song takes, a button to skip the song, change volume and so on.

      I am allready able to connect the phone with the QT programm and the music is also playing over the speaker of the RaspberryPi but how I am able to access the music metadata to show the song titel? And how can I tell the phone to pause the song and so on?

      I hope you guys can help me.

      Best regards,
      Leon

      R Offline
      R Offline
      raven-worx
      Moderators
      wrote on 21 Jan 2022, 08:30 last edited by
      #2

      @ElPadre
      how did you exactly implement the audio playback connection? I dont find any reference in the docs.
      Basically for audio playback the A2DP (Advanced Audio Distribution Profile) profile is used. And the AVRCP (Audio/Video Remote Control Profile) profile for audio meta data and playback control.

      Since you are on a RPi you might also want to bypass QtBluetooth module completely and use KDE BluezQt (especially the MediaPlayer class)

      --- 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

      E 1 Reply Last reply 21 Jan 2022, 09:47
      0
      • R raven-worx
        21 Jan 2022, 08:30

        @ElPadre
        how did you exactly implement the audio playback connection? I dont find any reference in the docs.
        Basically for audio playback the A2DP (Advanced Audio Distribution Profile) profile is used. And the AVRCP (Audio/Video Remote Control Profile) profile for audio meta data and playback control.

        Since you are on a RPi you might also want to bypass QtBluetooth module completely and use KDE BluezQt (especially the MediaPlayer class)

        E Offline
        E Offline
        ElPadre
        wrote on 21 Jan 2022, 09:47 last edited by
        #3

        @raven-worx
        I just started the QT Bluetooth example "Bluetooth Scanner". And after I paired my phone with the raspi the audio was playing over the speakers.

        Oh wow yes this lib looks promising.
        Do you know any example project which is using the BluezQT lib with the MediaPlayer Class?

        R 1 Reply Last reply 21 Jan 2022, 13:05
        0
        • E ElPadre
          21 Jan 2022, 09:47

          @raven-worx
          I just started the QT Bluetooth example "Bluetooth Scanner". And after I paired my phone with the raspi the audio was playing over the speakers.

          Oh wow yes this lib looks promising.
          Do you know any example project which is using the BluezQT lib with the MediaPlayer Class?

          R Offline
          R Offline
          raven-worx
          Moderators
          wrote on 21 Jan 2022, 13:05 last edited by
          #4

          @ElPadre
          no i dont couldnt find an example, but i think you can follow the mediaendpointconnector test implementation:
          https://github.com/KDE/bluez-qt/edit/master/tests/mediaendpointconnector.cpp

          --- 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

          1/4

          21 Jan 2022, 06:57

          • Login

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