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. Show waveform from mp3 file on mac

Show waveform from mp3 file on mac

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 2 Posters 780 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.
  • G Offline
    G Offline
    Gael_Nukeygara
    wrote on last edited by
    #1

    Re: Generating a waveform from an audio (or video) file?

    Hello,

    I need to display a waveform from an user audio file (let's say an mp3 file) in a cross platform way.

    On windows I could use QAudioDecoder to access audio samples and build the waveform image.

    As QAudioDecoder isn't handled on macos, could you please give me a hint about how to acheive this?
    (the Spectrum example - closest to my point - only handles wav files with a home made header parsing, but I need to read more file types than that)

    Thank you!

    1 Reply Last reply
    0
    • Kent-DorfmanK Offline
      Kent-DorfmanK Offline
      Kent-Dorfman
      wrote on last edited by
      #2

      I'm not a sound engineer, but I believe waveform isn't directly applicable to MP3. I think you need to extract the audio into PCM and generate a waveform graph based on the amplitude of the individual uncompressed samples.

      If you meet the AI on the road, kill it.

      G 1 Reply Last reply
      1
      • Kent-DorfmanK Kent-Dorfman

        I'm not a sound engineer, but I believe waveform isn't directly applicable to MP3. I think you need to extract the audio into PCM and generate a waveform graph based on the amplitude of the individual uncompressed samples.

        G Offline
        G Offline
        Gael_Nukeygara
        wrote on last edited by
        #3

        @Kent-Dorfman

        Yes, and the main question is : how can I "extract the audio into PCM" with Qt on a mac ?

        I can resume this with 2 problems there :
        -first, mp3 file interpretation (just playing the sound would be one good starting step)
        -second, access final stream data (the samples so I can build the waveform image)
        It seems that both these operations are complicated without QAudioDecoder or QMediaPlayer handling mp3 files on mac

        I think you're right though : mp3 representation in not based on samples. But, still, samples are what will be fed to the speakers, so someone in there will make the translation. I just need it not to be a black box: is this possible?

        1 Reply Last reply
        0
        • Kent-DorfmanK Offline
          Kent-DorfmanK Offline
          Kent-Dorfman
          wrote on last edited by
          #4

          there are open source MP3 decoder libraries. google search: "mp3 decoder library sourcecode"...

          If you meet the AI on the road, kill it.

          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