earlephilhower / ESP8266Audio

Arduino library to play MOD, WAV, FLAC, MIDI, RTTTL, MP3, and AAC files on I2S DACs or with a software emulated delta-sigma DAC on the ESP8266 and ESP32
GNU General Public License v3.0
2.01k stars 432 forks source link

TS files #527

Closed lidense closed 2 years ago

lidense commented 2 years ago

I'm trying to build an app to read radio streams. One of the radios I'm interested in streams TS: every 10 seconds it streams a TS file when I save this and read it with player this is what mplayer says: TS file format detected. NO VIDEO! AUDIO AAC(pid=256) NO SUBS (yet)! PROGRAM N. 1 Load subtitles in ./ UDIO: 32000 Hz, 2 ch, floatle, 0.0 kbit/0.00% (ratio: 0->256000) Selected audio codec: [ffaac] afm: ffmpeg (FFmpeg AAC (MPEG-2/MPEG-4 Audio)) and the file plays. So I understand this is an aac format but when I used the AudioGeneratorAAC I get a decoding error. I suppose this is because I must first extract the audio from TS? Please advise

earlephilhower commented 2 years ago

Yes. TS needs to be demuxed into the AAC stream before use. The current code has no understanding of MPEG2 bitstreams, unfortunately. If you want to add an input filter then a PR would always be welcome. :)

lidense commented 2 years ago

OK thanks, I will try to see if I can find some code around to help me with the demux

lidense commented 1 year ago

Hi there, I'm back to my project. Can you please confirm that the esp8266 audio library will allow me to build an Arduino sketch for a double core esp32 to play a webradio that uses HLS (.ts files). Thanks.

lidense commented 1 year ago

Can you please explain how to demux a .ts file into aac? Im trying to build a HLS webradio. Thanks