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 ปี ที่ผ่านมา

แสดงความคิดเห็นเพิ่มเติม

วิธีเริ่มต้นจัดการประกวด

  • ประกาศการประกวดของคุณ

    จัดการประกวดของคุณ รวดเร็วและง่ายดาย

  • รอรับผลงานจำนวนมหาศาล

    รอรับผลงานจำนวนมหาศาล จากทั่วโลก

  • มอบรางวัลให้แก่ผลงานที่ดีที่สุด

    มอบรางวัลให้แก่ผลงานที่ดีที่สุด ดาวน์โหลดไฟล์ - ง่ายดาย!

โพสต์การประกวดตอนนี้เลย หรือเข้าร่วมกับเราวันนี้!