New project opportunity: Media player?

Post Reply
millim
Posts: 59
Joined: Mon Jun 08, 2020 6:11 pm
languages_spoken: english
ODROIDs: Odroid GO
Has thanked: 2 times
Been thanked: 36 times
Contact:

New project opportunity: Media player?

Post by millim »

Dear community,

I am searching for a new project opportunity of a modern, skinable media player (at least mp3 audio format) for the Odroid GO. I am aware of the ogo-shell which is actually very nice and handy. However, I especially like the BT feature and was not able to find any working media player that supports BT audio streaming to wireless headphones which is ESP32 based. There are only examples around using the esp_adf feature set. Ok, the ESP32 supports only SBC codec over BT classic, but with properly set bit-rates it's comparable to MP3 quality. I did a bit of a search on the web and found some candidates:

A.) Rockbox (https://www.rockbox.org)
- Looks to be to divers and too difficult to port to the Odroid Go.

B.) Nitrogen (https://github.com/WinCEsoft/APP-MULTIMEDIA-Nitrogen)
- Nice skin-able media player, for Windows CE, also difficult to port, I think

C.) STM32 Motion player (http://nucleof401player.wiki.fc2.com , http://motionplayer.wiki.fc2.com)
- Ultra cool project on a bare metal STM32 shield, looks to be Ok to port, still a lot of work to merge it with freeRTOS/esp_idf

D.) add the BT feature to the ogo-shell
- Straightforward, but does not feature a nice skinning like today's media players do.

Have somebody already tried to develop/port a modern/decent media (mp3) player to the OG, or is it too difficult to get it to work on the ESP32?

regards
millim

Hensch
Posts: 5
Joined: Thu Nov 12, 2020 5:28 am
languages_spoken: english, german
ODROIDs: C1+ with HifiShield 2, C2, GO
Has thanked: 3 times
Been thanked: 1 time
Contact:

Re: New project opportunity: Media player?

Post by Hensch »

I'm not a developer. But I always hoped that ogo-shell will be continued some day. I like its simplicity. There are some things that could be better. I personally don't need skinning capabilities. I prefer a feature packed and stable (and energy saving) player with simple interface.

The following features would be nice:
- progress bar and time on player screen
- show cover art if available
- option to play whole folder with sub folders
- tag support
- remember last song when shut off
- Bluetooth audio output
- streaming web radio
- simple ftp server for file upload
- play list support
- web interface for remote control
- emulator launcher
These users thanked the author Hensch for the post:
millim (Fri Jun 25, 2021 4:23 am)

ddrsoul
Posts: 31
Joined: Thu Feb 04, 2021 4:47 pm
languages_spoken: english
ODROIDs: Odroid go
Has thanked: 4 times
Been thanked: 0
Contact:

Re: New project opportunity: Media player?

Post by ddrsoul »

I agree, it would be nice to have player to forward web radio (m3u) to bluetooth speaker. At least this is something i may use at home.

millim
Posts: 59
Joined: Mon Jun 08, 2020 6:11 pm
languages_spoken: english
ODROIDs: Odroid GO
Has thanked: 2 times
Been thanked: 36 times
Contact:

Re: New project opportunity: Media player?

Post by millim »

Hensch wrote:
Tue Jun 22, 2021 5:15 am
I'm not a developer. But I always hoped that ogo-shell will be continued some day. I like its simplicity. There are some things that could be better. I personally don't need skinning capabilities. I prefer a feature packed and stable (and energy saving) player with simple interface.

The following features would be nice:
- progress bar and time on player screen
- show cover art if available
- option to play whole folder with sub folders
- tag support
- remember last song when shut off
- Bluetooth audio output
- streaming web radio
- simple ftp server for file upload
- play list support
- web interface for remote control
- emulator launcher
Thanks, Hensch for this valuable inputs! Indeed, these are cool features. I am working on the framework actually, with good progress... :-)

millim
These users thanked the author millim for the post:
Hensch (Fri Jun 25, 2021 6:16 am)

Hensch
Posts: 5
Joined: Thu Nov 12, 2020 5:28 am
languages_spoken: english, german
ODROIDs: C1+ with HifiShield 2, C2, GO
Has thanked: 3 times
Been thanked: 1 time
Contact:

Re: New project opportunity: Media player?

Post by Hensch »

I think this will be a very valuable piece of software when released, especially a draft for other ESP32 projects. For example one could make things similar like this. The Odroid with I2C or Bluetooth audio will be the perfect playground for this, a nice pocket player and wireless data drive. 8-)

L67GS
Posts: 548
Joined: Wed Apr 22, 2020 3:02 pm
languages_spoken: English, Jibberish, Pig Latin
ODROIDs: XU4, C1+,(3) C0's, and a whole big pile of accessories, VU7A Plus,, ect....
Location: Great Lakes Region, U.S.A
Has thanked: 154 times
Been thanked: 79 times
Contact:

Re: New project opportunity: Media player?

Post by L67GS »

A while back I experimented a bit with writing an mp3 player in C++ using ffmpeg as the engine. I ran 2 threads, each thread used ffprobe to measure the length of the mp3 currently playing in the other thread, subtracted a couple seconds from the time and started it's mp3 at that time with ffplay.
So it would play all the mp3's in the folder sequentially and mixed.
It was a curiosity/challenge project but it was still a cool feature to fiddle with.
At some point in time I'd like to get into QT Creator and make a little front end for it.

User avatar
mad_ady
Posts: 9540
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, C4, N1, N2, H2, Go, Go Advance
Location: Bucharest, Romania
Has thanked: 604 times
Been thanked: 693 times
Contact:

Re: New project opportunity: Media player?

Post by mad_ady »

@L67GS except this thread is for the original Go, which runs on ESP32 and doesn't run linux.

L67GS
Posts: 548
Joined: Wed Apr 22, 2020 3:02 pm
languages_spoken: English, Jibberish, Pig Latin
ODROIDs: XU4, C1+,(3) C0's, and a whole big pile of accessories, VU7A Plus,, ect....
Location: Great Lakes Region, U.S.A
Has thanked: 154 times
Been thanked: 79 times
Contact:

Re: New project opportunity: Media player?

Post by L67GS »

mad_ady wrote:
Sat Jun 26, 2021 2:05 am
@L67GS except this thread is for the original Go, which runs on ESP32 and doesn't run linux.
Just for the sake of pointing out a neat feature that was pretty easy to code.

kelbot
Posts: 88
Joined: Thu Aug 29, 2019 12:05 pm
languages_spoken: english
ODROIDs: C2, HC2 x2, Go
Has thanked: 9 times
Been thanked: 3 times
Contact:

Re: New project opportunity: Media player?

Post by kelbot »

Yes! I'm very excited that you're working on this. ogo-shell is nice and I use it a lot but it would be very welcome to have an audio player with more fleshed out features. Hensch's list is good and I agree about preferring a simple and efficient interface. Perhaps adding features to ogo-shell would be the most effective way to accomplish a good media player since at least some of the important stuff has already been done?

I'll throw in my list separated into essential and nice to have.

Essential features:
- Shuffle mode (shuffle all songs in the library or within a folder and all subfolders)
- Progress Bar and ability to Seek
- Editable playlist/queue

Nice to Have:
- Output to Bluetooth Speaker/Headset
- Resume play at position from last exit (would be great for podcasts)
- Cover art and tags/metadata
- Internet Streams

I don't think building file uploading is necessary since there are already multiple firmwares for file management that are easy to boot into with the multi-boot firmware.

PS. Is there somewhere I can donate to support this effort?

Hensch
Posts: 5
Joined: Thu Nov 12, 2020 5:28 am
languages_spoken: english, german
ODROIDs: C1+ with HifiShield 2, C2, GO
Has thanked: 3 times
Been thanked: 1 time
Contact:

Re: New project opportunity: Media player?

Post by Hensch »

kelbot wrote:
Thu Jul 01, 2021 2:40 am

I don't think building file uploading is necessary since there are already multiple firmwares for file management that are easy to boot into with the multi-boot firmware.
You're right. I didn't check existing firmwares. Maybe there is a lightweight one for file management so we can upload our music files.

Yes, ogo-shell is probably the perfect draft for this. It can play several file formats, show pictures (for cover art) and supports external DAC.

ddrsoul
Posts: 31
Joined: Thu Feb 04, 2021 4:47 pm
languages_spoken: english
ODROIDs: Odroid go
Has thanked: 4 times
Been thanked: 0
Contact:

Re: New project opportunity: Media player?

Post by ddrsoul »

Hello, millim.
How is it going with your project?
Finally, I am ready to listen to some music.
Attachments
photo_2021-07-15_11-41-04.jpg
photo_2021-07-15_11-41-04.jpg (49.41 KiB) Viewed 191 times

millim
Posts: 59
Joined: Mon Jun 08, 2020 6:11 pm
languages_spoken: english
ODROIDs: Odroid GO
Has thanked: 2 times
Been thanked: 36 times
Contact:

Re: New project opportunity: Media player?

Post by millim »

ddrsoul wrote:
Thu Jul 15, 2021 5:42 pm
Hello, millim.
How is it going with your project?
Finally, I am ready to listen to some music.
Hi ddrsoul,

thank you for asking this :). Well, I have decided to go for the Nucleo motion player as a basis for the project. Because it has already a menu and setup GUI structure build in, easy to be adapted. Furthermore, it features a very nice 16bit color GUI with alpha blending support. Also it is very handy to add and modify icons and features a simple DSP. Porting it to the Odroid-Go was rather straight forward. (See the picture attached here) :

Image

I have added BT audio support (+ Internal Speaker and external DAC) might add SPDIF as well. As mentioned, my primary goal is to develop a MP3 player with headphone capabilities. Since the OG does not have a headphone jack (what I truly miss), BT is the only alternative, also nice getting across nasty cabling squabbling :) when working in the workshop, gardening, lumbering, etc. or just relaxing on the beach is a nice feature. In general an ipod alternative with BT support (in case one wants to be independent of the mobile phone, as I want to be in that case).

As mentioned, I have already invested a couple of hours to port the Nucleo motion player, added BT, Display sleep and button hold functions, also added boot to FW. It is not fully ready to share. I might share a FW file, when all nasty bugs are sorted out.

Unfortunately, I was not aware of squeezelite for the ESP32 since today :o . It would have been the right choice to start with.
https://github.com/sle118/squeezelite-esp32
https://www.youtube.com/watch?v=0bZc0yAf8CA

It looks that it also supports ILI9341 320x240 display. And I think the developers did a fantastic job:
"Now, to have all the decoding, resampling, equalizing, gain, display, spectrum/vu is a very (very) delicate equilibrium between use of internal /external RAM, tasks priorities and buffer handling. It is not perfect and the more you push the system to the limit, the higher the risk that some files would not play (see below). In general, the display will always have the lowest priority and you'll notice slowdown in scrolling and VU/Spectrum refresh rates. Now, even display thread has some critical section and impacts the capabilities."

As mentioned, I will focus on MP3 player from SDcard through Bluetooth with 44100kHz/16Bit format only based on Nucleo motion player. At the moment I will not invest any time on DAB radio, Wifi streaming, etc. My use-cases are outdoor, where I do not have WIFI coverage. Furthermore, It would exceed "fun level" and it is "above my pay rate" ;)

millim

kelbot
Posts: 88
Joined: Thu Aug 29, 2019 12:05 pm
languages_spoken: english
ODROIDs: C2, HC2 x2, Go
Has thanked: 9 times
Been thanked: 3 times
Contact:

Re: New project opportunity: Media player?

Post by kelbot »

Great work millim! Looks like you're off to a good start. What kind of features does the nucleo motion player have? I'm very excited about this!

millim
Posts: 59
Joined: Mon Jun 08, 2020 6:11 pm
languages_spoken: english
ODROIDs: Odroid GO
Has thanked: 2 times
Been thanked: 36 times
Contact:

Re: New project opportunity: Media player?

Post by millim »

kelbot wrote:
Sun Jul 18, 2021 12:25 am
Great work millim! Looks like you're off to a good start. What kind of features does the nucleo motion player have? I'm very excited about this!
hi kelbot,

just look at the intro of the original Nucleo Player:
https://www.youtube.com/watch?v=RlwP5DOwANs

The OG version will feature the music player (no video, since too slow on the OG, and 160x128 resolution, there is no point to do so). Everything else the same way as shown in the video plus:
- I have added audio device selection menu entry to the setup menu (Internal Speaker, DAC, and Bluetooth) already
- The BT feature supports device discovery and connect
- Keypad lock / display sleep (configurable in the setup menu)

- Will add battery status and volume level to the player window
- Will keep the 160x128 resolution, 95% anyways used with display off to save power, only impacting performance, and would be a lot of work.

- Might add playlist support, need to find easy way to fiddle this in. The player uses a handcrafted FAT system I am reusing, surprisingly it is working and it is really fast.
- Might add play/resume feature after power off. I need to add SPI FLASH file system to store config and status. The handcrafted FAT system does not support SDCARD writing.

I would have shared already a test version. But I experience SDCARD CRC errors sporadically when connected via Bluetooth. It has a specific pattern, I need to (try) to fix this first.

millim

kelbot
Posts: 88
Joined: Thu Aug 29, 2019 12:05 pm
languages_spoken: english
ODROIDs: C2, HC2 x2, Go
Has thanked: 9 times
Been thanked: 3 times
Contact:

Re: New project opportunity: Media player?

Post by kelbot »

millim wrote:
Sun Jul 18, 2021 5:00 am

hi kelbot,

just look at the intro of the original Nucleo Player:
https://www.youtube.com/watch?v=RlwP5DOwANs

The OG version will feature the music player (no video, since too slow on the OG, and 160x128 resolution, there is no point to do so). Everything else the same way as shown in the video plus:
- I have added audio device selection menu entry to the setup menu (Internal Speaker, DAC, and Bluetooth) already
- The BT feature supports device discovery and connect
- Keypad lock / display sleep (configurable in the setup menu)

- Will add battery status and volume level to the player window
- Will keep the 160x128 resolution, 95% anyways used with display off to save power, only impacting performance, and would be a lot of work.

- Might add playlist support, need to find easy way to fiddle this in. The player uses a handcrafted FAT system I am reusing, surprisingly it is working and it is really fast.
- Might add play/resume feature after power off. I need to add SPI FLASH file system to store config and status. The handcrafted FAT system does not support SDCARD writing.

I would have shared already a test version. But I experience SDCARD CRC errors sporadically when connected via Bluetooth. It has a specific pattern, I need to (try) to fix this first.

millim
Thanks for the details! Regarding the resolution, you mean you plan to leave it as it is in the photo you posted of the interface centered with black all around it? Could you just scale it up so it would fill the display without affecting performance?

Playlist support would definitely be nice. Resume would turn it into a really nice podcast player!

Whatever you end up doing it sounds like it will be pretty sweet to have regardless. Looking forward to trying it out, cheers!

millim
Posts: 59
Joined: Mon Jun 08, 2020 6:11 pm
languages_spoken: english
ODROIDs: Odroid GO
Has thanked: 2 times
Been thanked: 36 times
Contact:

Re: New project opportunity: Media player?

Post by millim »

kelbot wrote:
Sun Jul 18, 2021 9:05 am
Could you just scale it up so it would fill the display without affecting performance?
Well, agree would be really nice. But there is always a "but" ;). Here some technical details:
- With the current resolution, I can reuse all the clever buffer management of the Nucleo player. It just needs 40kbytes of RAM shared between display, audio and DSP. During playback it does partial display update of time and progress bar only, rest is used for audio streaming and DSP. You know, RAM is a "golden" resource on the ESP32.

- Full frame update on the OG needs about 33ms, there is no way to do it faster. Within that time SDCard reading is blocked (shared bus), MP3 frames need to be processed in about 20ms to experience real time playback, so there must be a SDcard call every 20ms. So this solution is not straight forward. This even holds for 2x2 scaling since the SPI can't be set faster than 40MHz. Either to buffer a lot of data to the PSRAM first, processing, rebuffer on display idle. Partial display update would also be here the only reliable solution.

- Need to revisit the buffer management. 320x240 Display buffer need to go to PSRAM, partial area that needs to be updated frequently, need to go to RAM, and it would need a balance between copy from FLASH, PSRAM and RAM for nice alpha blending experience and to keep reliable streaming performance.

For sure, would be a nice challenge to take :geek: .Maybe when the nights are getting shorter, I might think about it again ...

- And finally when Bluetooth comes into play (mentioned as the main driver for me doing that). All this needs to be so fine tuned, see the squeezelite project for details. So, if you have also some programming skills, I recommend enabling squeezelite on the OG 8-).

millim
These users thanked the author millim for the post:
kelbot (Wed Jul 21, 2021 11:36 am)

Post Reply

Return to “Projects”

Who is online

Users browsing this forum: No registered users and 1 guest