Fix my Music Visualizer algorithm for Android using ExoPlayer2

  • Κατάσταση: Closed
  • Βραβείο: $500
  • Ληφθείσες Συμμετοχές: 2
  • Νικητής: marenchuk

Σύνοψη Διαγωνισμού

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.

Προτεινόμενες Δεξιότητες

Σχόλια Εργοδότη

“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.”

Εικόνα προφίλ TalkStreamLive, United States.

Κορυφαίες καταχωρήσεις από αυτόν τον διαγωνισμό

Προβολή Περισσότερων Συμμετοχών

Δημόσιος Πίνακας Διευκρινίσεων

  • TalkStreamLive
    Κάτοχος Διαγωνισμού
    • Πριν από 5 χρόνια

    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)

    • Πριν από 5 χρόνια
  • marenchuk
    marenchuk
    • Πριν από 5 χρόνια

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

    • Πριν από 5 χρόνια
    1. TalkStreamLive
      Κάτοχος Διαγωνισμού
      • Πριν από 5 χρόνια

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

      • Πριν από 5 χρόνια
    2. TalkStreamLive
      Κάτοχος Διαγωνισμού
      • Πριν από 5 χρόνια

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

      • Πριν από 5 χρόνια
  • marenchuk
    marenchuk
    • Πριν από 5 χρόνια

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

    • Πριν από 5 χρόνια
    1. TalkStreamLive
      Κάτοχος Διαγωνισμού
      • Πριν από 5 χρόνια

      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.

      • Πριν από 5 χρόνια
  • marenchuk
    marenchuk
    • Πριν από 5 χρόνια

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

    • Πριν από 5 χρόνια
    1. TalkStreamLive
      Κάτοχος Διαγωνισμού
      • Πριν από 5 χρόνια

      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.

      • Πριν από 5 χρόνια
  • nourreddinebenme
    nourreddinebenme
    • Πριν από 5 χρόνια

    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

    • Πριν από 5 χρόνια
    1. TalkStreamLive
      Κάτοχος Διαγωνισμού
      • Πριν από 5 χρόνια

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

      • Πριν από 5 χρόνια
    2. TalkStreamLive
      Κάτοχος Διαγωνισμού
      • Πριν από 5 χρόνια

      https://github.com/gregmarut/ExoVisualizer

      • Πριν από 5 χρόνια

Προβολή περισσότερων σχολίων

Πώς να ξεκινήσετε με τους διαγωνισμούς

  • Δημοσιεύστε τον διαγωνισμό σας

    Αναρτήστε τον διαγωνισμό σας Γρήγορα και εύκολα

  • Λάβε ένα σωρό συμμετοχές

    Λάβετε Πολλές Συμμετοχές Από όλο τον κόσμο

  • Βραβεύστε την καλύτερη καταχώρηση

    Βραβεύστε την καλύτερη καταχώρηση Κατεβάστε τα αρχεία - Εύκολα!

Αναρτήστε ένα Διαγωνισμό Τώρα ή Ελάτε Μαζί Μας Σήμερα!