Toggle navigation
首页
问答
文章
积分商城
专家
专区
更多专区...
文档中心
返回主站
搜索
提问
会员
中心
登录
注册
DIY综合交流区
关才网络收音机使用的流媒体传输协议
发布于 2010-02-24 15:08:39 浏览:14827
订阅该版
关才网络收音机使用的流媒体传输协议 有HTTP,RTSP,MMS;但网上似乎很难搜索到相关的有用内容。 GOOGLE.cn搜索出来的结果都是中文的。没多少有实际价值的东西了。。 [s:183] 想问下最初在实现网络播放功能的时候,查询了哪些相关的资料? 是不是HTTP数据流要查看HTTP协议相关的内容?? -------------------------------------------------------------------- 刚才没想明白,搜HTTP流媒体协议,怪不得什么都没有。 下载附件 [MMS流媒体协议.part1.rar](https://oss-club.rt-thread.org/uploads/1057_6dbad7a045f3edbe69f353fd3a4dc528.rar) 下载附件 [MMS流媒体协议.part2.rar](https://oss-club.rt-thread.org/uploads/1057_d109b16c21849ab75a16cb4528a614a6.rar) 下载附件 [MMS流媒体协议.part3.rar](https://oss-club.rt-thread.org/uploads/1057_7a2c41e0da84eb1ce0f83119bfc9f7d9.rar) 下载附件 [MMS流媒体协议.part4.rar](https://oss-club.rt-thread.org/uploads/1057_a38579b19f57c5b637e99715b68658d2.rar) 下载附件 [MMS流媒体协议.part5.rar](https://oss-club.rt-thread.org/uploads/1057_22cd1f0512e595c8bae2d6e45e38e2c4.rar) 下载附件 [MMS流媒体协议.part6.rar](https://oss-club.rt-thread.org/uploads/1057_0965aa4973773340cc4213d8205813f6.rar)
查看更多
9
个回答
默认排序
按发布时间排序
bernard
2010-02-24
这家伙很懒,什么也没写!
是的,资料非常少。 RSTP是有正规的规范的。MMS一般和wma挂钩,而shoutcast一般和mp3、ogg挂钩。这两者协议都不多,不过shoutcast协议非常简单,所以网上有些介绍的(都是英文的吧)。 shoutcast和http有少许差别,体现在发过去的请求,而传回来的音频流中的tag信息上。
inkfish
2010-02-24
这家伙很懒,什么也没写!
那我该怎么进行下去。我现在看到这部分,卡在这上面了。
bernard
2010-02-24
这家伙很懒,什么也没写!
shoutcast协议: **Intro** Not much is available about how our streaming technology works, more specifically MP3 streaming. When you get right down to it, it is actually very simple to understand. You will especially understand it if you know anything about HTTP's Protocol, which is simply a communication method for a client to a server. This article is mainly geared for those hard core into this stuff or those who want to develop applications similar to those utilized at this site. **Tools used** The tools used for streaming are quite simple: [list] Source (usually a dsp in a player) [/*:m] Server (dispatches the source's mp3 stream to the client) [/*:m] Client (is used to listen to the audio coming down from the server[/*:m][/list:u] **Source to Server** In order for a server to allow connections from a client, it needs a source. When a source connection is made then the server will pass the data along to the clients when they connect. The dialog goes something like this (I will use SHOUTcast as the example) 1. The source makes a connection to the service port (shoutcast's is the port +1) 2. The source then sends the password like so password 3. If the password is correct, the server will reply with OK2 icy-caps:11 , this basically informs the source that the server has authorized the dsp to be the source and it is ready for data. If the password is incorrect, the server sends invalid password . 4. If the source receives the OK2, it then begins sending information about the stream to the server. Usually in this form: ``` icy-name:Unnamed Server icy-genre:Unknown Genre icy-pub:1 icy-br:56 icy-url:http://www.shoutcast.com icy-irc:%23shoutcast icy-icq:0 icy-aim:N%2FA ``` Then The source will begin sending the mp3 encoded stream [list] icy-name is the name of the stations[/*:m] icy-genre is the genre that the station resides in[/*:m] icy-pub is basically a switch to either allow the server to publish itself in the directory or not (1 meaning yes and 0 meaning no)[/*:m] icy-br is the bitrate of the stream[/*:m] icy-url is the homepage for the stream[/*:m] icy-irc is yp shoutcast specific (used for contact information)[/*:m] icy-icq is yp shoutcast specific (used for contact information)[/*:m] icy-aim is yp shoutcast specific (used for contact information)[/*:m][/list:u] You can also pass this optional data: ``` content-type: mime/type icy-reset: 1 icy-prebuffer: ?? ``` content-type is the data type to expect from this stream. (HTTP spec header) icy-reset tells the server whether it should clear out the buffer. (necessary for NSV/NSA streams. icy-prebuffer, we aren't quite certain what this is for, how to use it or even whether it works, but it exists. The optional params are not necessarily passed to the client, content-type is of course but as for the others it is not clear. This is just a simple walk through of how the source communicates with the server. No other information is passed on this port as far as I am aware. Title streaming from source to server This is a simple one, the server receives the title of the song and the URL of the page simply by having the source make the URL call ``` http://www.host.com:portnumber/admin.cgi?pass=Server%20Password&mode=updinfo&song=Song%20Goes%20here&url=http://someurl.com ``` When this gets called by the source or a browser even, the title of the song changes in the clients which support shoutcast style title streaming. This communication always happens on the public port (by default 8000) never on the service port as it is used for strictly sending the stream to the server. You also must make sure that when you make your HTTP calls that it comes from a browser or program that specifies the User-Agent: header as Mozilla. **Client to Server** The Client to Server communication is handle in a similar fashion to the way that a browser communicates with a webpage server. This is known as the HTTP protocol. However SHOUTcast and icecast do not handle in exactly the same manner, the headers are different. I have yet to pin point exactly what is so different. I think it may have something to do with the notification error, as it is HTTP/1.0 200 OK on all web servers using HTTP, this may confuse some clients and causes the headers to not exist. 1. The client connects to the server and sends information about itself, if it can handle title streaming it sends and extra field like so: ``` icy-metadata:1 ``` In addition to the normal headers sent. This tag signifies that the client has the ability to stream the title streaming tags from the stream, therefore the server will send the extra title information, if this were not possible, some clients would hiccup when the title information is sent 2. The server then responds with ``` ICY 200 OK (signifying that the server was successful) icy-notice1:
This stream requires
Winamp
(redundant notice) icy-notice2:SHOUTcast Distributed Network Audio Server/posix v1.x.x
(tells the client what server it is and version)SHOUTcast Specific icy-name:Unnamed Server (Name of the server) icy-genre:Unknown Genre (what genre the server falls under) icy-url:http://www.shoutcast.com (homepage for the server) Content-Type:audio/mpeg (Content type of the stream to follow) icy-pub:1 (whether the server is public or not) icy-br:56 (bitrate of the server) icy-metaint:8192 (if icy-metadata:1 was signified this was shown I will discuss this further later) (end of header) ``` 3. At this point the server begins sending the audio data. SHOUTcast Meta Title Streaming Earlier we discussed how the server gets the title of the song from the source, but we didn't quite get into how the client gets the title of the song. When the client signifies that it is title streaming compatible, the shoutcast server adds an extra header tag set like so ``` icy-metaint:8192 ``` this tells the client exactly how many bytes of data to read out of the stream before it can expect the beginning of the Meta-Data (which is where the title is stored) It also always starts counting at the beginning of the stream (not the header) After this the client then reads 1 byte, this byte tells the client how large the Meta-Data Tag is divided by 16, so if the byte was 4 then the client would know that the meta-data tag was 64 bytes long. But, you ask, not all titles are going to equal 64 bytes or 48 bytes etc...? Well the simple answer is that SHOUTcast places blanks or " " in the unused space until it equals the length, after that is read, then it is back to the mpeg data to start the process all over again. Pretty simple huh? In Closing I am sure that this technology will change, and I will try my best to keep this article up to the specs as I know them. If you find anything incorrect in this article, or any oversights, then please email me Feel free to leave a comment if you feel that I have missed something. Do not reply with questions. Questions should go in the Audio Streaming forum. Questions will be split from this thread and moved to appropriate forums.
litguy
2010-07-12
这家伙很懒,什么也没写!
貌似没有考虑支持 RTSP 协议的网络电台
HJJNOW
2010-11-30
这家伙很懒,什么也没写!
什么时候支持mms协议啊? 即使wma软解不了,大不了我外挂VS1053 --------------------------------------------------- 因为我喜欢的广东音乐之声是mms
HJJNOW
2012-01-30
这家伙很懒,什么也没写!
突然想起,上网搜了一下 早在2008年,微软已经公开了MMS协议,可以直接下载[MS-MMSP].pdf 而 mplayer源码MPlayer-1.0rc2.tar.bz2里面的asf_mmst_streaming.c就是解码了。 可惜我还没搞懂 radio 希望有心人能整合进去,外挂VS1053解码WMA也行。 现在的单片机包括M3好没见到搞定MMS的, 跑linux的大板ARM9/11/A8倒是直接使用mplayer就行了 ----------------------------- 现在的网络电台以mms为主
HJJNOW
2012-01-30
这家伙很懒,什么也没写!
附上相关资料 [MS-MMSP].pdf 微软的MMS协议文档 MPlayer-1.0rc2.tar.bz2 mplayer源码 MMS 协议概述.rtf MMSprotocol.doc MMS流媒体下载原理.txt 论坛限制2MB,只能分包了 [attach]871[/attach] [attach]872[/attach] [attach]873[/attach] [attach]874[/attach] [attach]875[/attach] [attach]876[/attach]
nyszx
2013-01-03
这家伙很懒,什么也没写!
我比较关心rtsp协议,因为我发现我喜欢的电台都是这个协议的,就是资料太少了,我也在抓包分析此协议,还在研究中。国内电台似乎主要就是MMS、RTSP的,还有少量的HTTP的。缺少这些协议的资料~顺便说一下,关于MMS协议,走的是wma格式,我觉得可以用VS1003硬解可以实现吧,再或者全部采用硬解,MP3也硬解,不用wm9878,两个价格差不了多少,而且我焊接wm9878都是先吹在补焊再吹才能成功,水平比较菜,VS1003就比较简单了。
撰写答案
登录
注册新账号
关注者
0
被浏览
14.8k
关于作者
inkfish
这家伙很懒,什么也没写!
提问
3
回答
2
被采纳
0
关注TA
发私信
相关问题
1
[项目]搞个开源的硬件项目
2
硬件计划贴,及时更新,欢迎提意见
3
软件计划贴,及时更新,欢迎提意见::WMA,MOUNT,LWIP等问题急需解决.
4
MMS协议
5
定点的wma解压库-libwma
6
QQ群记录 [20090821]
7
STM32网络收音机PCB报名征集
8
第一版调试记录
9
第二版硬件讨论
10
RADIO项目相关模块规格--欢迎大家自己做板时规格与此兼容,减少重复劳动
推荐文章
1
RT-Thread应用项目汇总
2
玩转RT-Thread系列教程
3
国产MCU移植系列教程汇总,欢迎查看!
4
机器人操作系统 (ROS2) 和 RT-Thread 通信
5
五分钟玩转RT-Thread新社区
6
【技术三千问】之《玩转ART-Pi》,看这篇就够了!干货汇总
7
关于STM32H7开发板上使用SDIO接口驱动SD卡挂载文件系统的问题总结
8
STM32的“GPU”——DMA2D实例详解
9
RT-Thread隐藏的宝藏之completion
10
【ART-PI】RT-Thread 开启RTC 与 Alarm组件
最新文章
1
【24嵌入式设计大赛】基于RT-Thread星火一号的智慧家居系统
2
RT-Thread EtherKit开源以太网硬件正式发布
3
如何在master上的BSP中添加配置yml文件
4
使用百度AI助手辅助编写一个rt-thread下的ONVIF设备发现功能的功能代码
5
RT-Thread 发布 EtherKit开源以太网硬件!
热门标签
RT-Thread Studio
串口
Env
LWIP
SPI
AT
Bootloader
Hardfault
CAN总线
FinSH
ART-Pi
USB
DMA
文件系统
RT-Thread
SCons
RT-Thread Nano
线程
MQTT
STM32
RTC
FAL
rt-smart
ESP8266
I2C_IIC
WIZnet_W5500
UART
ota在线升级
PWM
cubemx
freemodbus
flash
packages_软件包
BSP
潘多拉开发板_Pandora
定时器
ADC
GD32
flashDB
socket
中断
Debug
编译报错
msh
SFUD
keil_MDK
rt_mq_消息队列_msg_queue
ulog
C++_cpp
at_device
本月问答贡献
踩姑娘的小蘑菇
7
个答案
3
次被采纳
a1012112796
15
个答案
2
次被采纳
张世争
9
个答案
2
次被采纳
rv666
5
个答案
2
次被采纳
用户名由3_15位
13
个答案
1
次被采纳
本月文章贡献
程序员阿伟
9
篇文章
2
次点赞
hhart
3
篇文章
4
次点赞
大龄码农
1
篇文章
5
次点赞
RTT_逍遥
1
篇文章
2
次点赞
ThinkCode
1
篇文章
1
次点赞
回到
顶部
发布
问题
分享
好友
手机
浏览
扫码手机浏览
投诉
建议
回到
底部