Fix my Music Visualizer algorithm for Android using ExoPlayer2

  • Stare: Closed
  • Premiu: $500
  • Intrări primite: 2
  • Câștigător: marenchuk

Sumarul concursului

We need to build a music visualizer that can bypass the Android Visualizer API and utilize the PCM data coming directly from ExoPlayer2. I posted this question on the ExoPlayer's github page (https://github.com/google/ExoPlayer/issues/5268) asking where I can grab the PCM data to convert it to a frequency spectrum visualizer. After a little bit of investigation and tapping into this data, I was overwhelmed by the math and algorithms needed to accomplish my goal.

So for our project, I need an engineer to take a look at my sample app and fix up the algorithms to match the requirements.

Requirements:
1. Must use the latest (or very recent) version of ExoPlayer2: https://github.com/google/ExoPlayer. The version specified in the demo project below is ideal as that is what we are already using in our actual project.
2. Must support multiple bitrates. ExoPlayer handles this automatically when playing the audio but I did notice some trouble when trying to visualize different bitrate audio streams in the visualizer
3. Must NOT require "android.permission.RECORD_AUDIO" or "android.permission.MODIFY_AUDIO_SETTINGS" to work
4. Must render a simple bar style visualizer (similar to this one https://youtu.be/C2TV2DaCVk0?t=6). Can be either Canvas or OpenGL as long as it is efficient and not demanding on the CPU/Battery.

I have created a quick demo project of exactly where I am stuck. You can grab the source code, run the app and see exactly where I need assistance. If you can take this sample code and fix it up to look like the one in the youtube video provided in this email, that will be an acceptable deliverable. To solve this, we will probably need an engineer who is experienced in signal processing algorithms.

What I need from you is to first, verify this approach is correct and then to refine the algorithm to get a better looking visualizer.

This is ultimately what I am going for. We need the visualizer to look nearly identical to this demo on youtube:
https://youtu.be/C2TV2DaCVk0?t=6

Here are the 2 points of code that need attention:
Where the raw PCM data is available from ExoPlayer and "attempted" to be converted into data to be visualized. I say attempted because I am not sure if this algorithm is even correct.
https://github.com/gregmarut/ExoVisualizer/blob/master/app/src/main/java/com/gregmarut/exovisualizer/exo/CustomMediaCodecAudioRenderer.java

This class takes the output of the CustomMediaCodecAudioRenderer to attempt to draw it on screen. Right now I am just drawing to a Canvas as I am not experienced in OpenGL. For simplicity sake, I am open to just solving the original problem first by drawing to Canvas and then converting the final visualizer to OpenGL if that is easier.
https://github.com/gregmarut/ExoVisualizer/blob/master/app/src/main/java/com/gregmarut/exovisualizer/visualizer/renderer/BarRenderer.java

Code available on GitHub:
https://github.com/gregmarut/ExoVisualizer

Whoever can solve this algorithm and show me a working demo will be awarded the prize money. We have more possible projects involving music visualizers. The winner will be first to be considered for any future music visualization work that we need.

UPDATE: I have attached a quick video of the what the app looks like right now which is obviously in need of some work.

Aptitudinile recomandate

Feedback de la Angajator

“Kornienko was dedicated to finding a solution to our project. Even when we were ready to end the project early due to the complexity, Kornienko was determined to continue trying. Overall, the project was a bit more complex than we originally anticipated however the effort and determination by Kornienko to solve the problem was admirable. Thanks.”

Imagine de profil TalkStreamLive, United States.

Cele mai bune intrări pentru acest concurs

Vezi mai multe intrări

Panoul public de clarificare

  • TalkStreamLive
    Titularul concursului
    • acum 5 ani

    I understand that this contest ends in about 1 hour however, I do not have an entry that meets what I am looking for. I am currently talking with 2 of you and willing to continue working with you guys until I get a solution I am happy with. Feel free to continue talking with me and if you can solve the issue, I will award the money at that time (even after the contest ends)

    • acum 5 ani
  • marenchuk
    marenchuk
    • acum 5 ani

    Your project is built successful. But it doesn't play.

    • acum 5 ani
    1. TalkStreamLive
      Titularul concursului
      • acum 5 ani

      Try changing to a different audio feed. I added a few samples, you just need to change the audio feed URL.

      https://github.com/gregmarut/ExoVisualizer/blob/master/app/src/main/java/com/gregmarut/exovisualizer/activity/MainActivity.java

      //pick an audio stream
      final String audioURL = "http://88.198.10.229:8108/stream";
      //final String audioURL = "http://45.79.204.39:8086/stream";
      //final String audioURL = "http://94.23.66.155:8030/stream";
      //final String audioURL = "http://5.63.151.52:7136/stream";

      • acum 5 ani
    2. TalkStreamLive
      Titularul concursului
      • acum 5 ani

      I have just added a video to the description of the project showing what the app looks like right now.

      • acum 5 ani
  • marenchuk
    marenchuk
    • acum 5 ani

    I think the submitted image is not visualizer image. Right?

    • acum 5 ani
    1. TalkStreamLive
      Titularul concursului
      • acum 5 ani

      The image submitted above is not a visualizer. I am not sure what that is but it is not what I am looking for. I need to see a video or some sort of demo showing the new visualizer running on the demo project I provided.

      • acum 5 ani
  • marenchuk
    marenchuk
    • acum 5 ani

    What about The #1 Entry submitted by Shahala Anjum C in your opinion?

    • acum 5 ani
    1. TalkStreamLive
      Titularul concursului
      • acum 5 ani

      I spoke with the developer for that submitted that and am looking for a video/demo showing the app using a visualizer that looks similar to the one in the youtube video provided in the description. I am still waiting on Shahala to finish the demo.

      • acum 5 ani
  • nourreddinebenme
    nourreddinebenme
    • acum 5 ani

    hey sir i can't see your code https://prnt.sc/ly8miy i'm good in opengl and frequency spectrum visualizer and android studio please if you are still interested message me

    • acum 5 ani
    1. TalkStreamLive
      Titularul concursului
      • acum 5 ani

      Hi, are you unable to access the source code? It is in GitHub and should be public

      • acum 5 ani
    2. TalkStreamLive
      Titularul concursului
      • acum 5 ani

      https://github.com/gregmarut/ExoVisualizer

      • acum 5 ani

Afișează mai multe comentarii

Cum să începi concursurile

  • Postează-ţi concursul

    Postează-ți concursul Rapid și ușor

  • Obține o mulțime de intrări

    Obține o mulțime de intrări Din întreaga lume

  • Premiază cea mai bună intrare

    Premiază cea mai bună intrare Descarcă ușor fișierele

Postează un concurs chiar acum sau înregistrează-te astăzi!