arduino-audio-tools icon indicating copy to clipboard operation
arduino-audio-tools copied to clipboard

download mp3 from url to sd

Open aqildad-create opened this issue 3 years ago • 5 comments
trafficstars

your example which play mp3 from SD card is working but now further i Need example which download mp3 from URL to SD card .

Do you have any relevant example or how can we achieve this ?

aqildad-create avatar Aug 05 '22 10:08 aqildad-create

No I don't by I would expect that you can just copy from a URLStream to a File and don't forget to close the file at the end....

pschatzmann avatar Aug 05 '22 10:08 pschatzmann

how to copy URLStream to a file ? Which example is this ?

aqildad-create avatar Aug 05 '22 10:08 aqildad-create

There is no example: I suggest that you read a tutorial about Arduino and Files first. You can try to copy using the StreamCopy class with copy() or copyAll() or simply by calling readBytes(uint8_t buffer, size_t len) and write(uint8_t buffer, size_t len) in a loop...

pschatzmann avatar Aug 05 '22 10:08 pschatzmann

Is this possible with ESP32 to copy mp3 file from Mysql Data base (WEBSERVER ) ?

and how ? Any relevant example ?

aqildad-create avatar Aug 05 '22 12:08 aqildad-create

I am neither providing MySQL nor basic ESP32 support. Please use Google to find the answer yourself! There you should find e.g. https://esp32io.com/tutorials/esp32-mysql

pschatzmann avatar Aug 05 '22 12:08 pschatzmann