How to create an audio file metadata header if I am streaming data to icecast?

牧云@^-^@ 提交于 2019-12-11 07:55:08

问题


How do I send the metadata header to the icecast server ? I am recording in AAC and streaming it to the icecast server through ios but the file shows corrupt . I suspect that the metadata needs to be added to be able to play a file. How do i send the metadata ? SHould i send it as a string ? What should be the format ?


回答1:


The metadata is not required for a stream to function. If your data is corrupt, you are either encoding it wrong or are sending the wrong Content-Type header.

That being said, once you get your stream working, if you would like to send metadata, this is done out-of-band of the actual audio stream. Metadata is updated with a simple HTTP request to the Icecast server.

http://icecast.example.com/admin/metadata?pass=hackme&mode=updinfo&mount=/mountpoint&song=Your%20Metadata

You can find more info in my answer here: https://stackoverflow.com/a/9985297/362536



来源:https://stackoverflow.com/questions/17832833/how-to-create-an-audio-file-metadata-header-if-i-am-streaming-data-to-icecast

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!