Realtime MP3 encoder 48kHz Stereo
Posted: Sun Feb 10, 2019 6:42 am
I have ported and optimised an MP3 compliant encoder to ESP32, just wondering if anyone is interested in the project. If so I will clean up the code and post it here.
Current status:
Encodes @48000Hz 16bit Stereo using between 37-43% on one core depending on where you choose to place buffers and tables
Memory:
30312bytes MALLOC_CAP_8BIT for global state
21904bytes MALLOC_CAP_8BIT encoding struct
2 * 9216bytes tables can be in IRAM
2 * 2304bytes buffers also can be in IRAM
Total: 75256
Quality: (From the Youtube Free Audio Library https://www.youtube.com/audiolibrary/music)
Captured streaming over wifi in Chrome 48kHz Joint Stereo 256kbps using Audacity saved as FLAC:
All Hail the Queen.flac
http://pc.cd/twDctalK
Alone Time.flac
http://pc.cd/n6KrtalK
In the Distance.flac
http://pc.cd/Kzq7
Mover.flac
http://pc.cd/T30rtalK
On the Windy Road.flac
http://pc.cd/5t8
Parisian Funk.flac
http://pc.cd/U9F
Names included so you can compare these with the original in the Youtube library.
Moving things into IRAM pushes performance to the 43% end, otherwise its around 37%.
By using MP3 as a format, I can stream audio to ANY web browser. All that I've tried work fine, including phones and tablets.
Current status:
Encodes @48000Hz 16bit Stereo using between 37-43% on one core depending on where you choose to place buffers and tables
Memory:
30312bytes MALLOC_CAP_8BIT for global state
21904bytes MALLOC_CAP_8BIT encoding struct
2 * 9216bytes tables can be in IRAM
2 * 2304bytes buffers also can be in IRAM
Total: 75256
Quality: (From the Youtube Free Audio Library https://www.youtube.com/audiolibrary/music)
Captured streaming over wifi in Chrome 48kHz Joint Stereo 256kbps using Audacity saved as FLAC:
All Hail the Queen.flac
http://pc.cd/twDctalK
Alone Time.flac
http://pc.cd/n6KrtalK
In the Distance.flac
http://pc.cd/Kzq7
Mover.flac
http://pc.cd/T30rtalK
On the Windy Road.flac
http://pc.cd/5t8
Parisian Funk.flac
http://pc.cd/U9F
Names included so you can compare these with the original in the Youtube library.
Moving things into IRAM pushes performance to the 43% end, otherwise its around 37%.
By using MP3 as a format, I can stream audio to ANY web browser. All that I've tried work fine, including phones and tablets.