有没有办法将RTMP直播流从FMS4.5转换为BlackBerry应用的RTSP?我有一个FMS4.5服务器部署希望能够通过一个本地应用程序的BlackBerry用户直播,根据BlackBerry文件,唯一可以支持BlackBerry设备上的直播协议是超文本传输协议和实时传输协议。
BlackBerry Support for media streaming
发布于 2013-07-06 19:03:27
你可以在cgi中使用rtmpdump,然后写到stdout,不是rtsp,而是http。这就是我在没有闪存的情况下播放NBC上的rtmp流的方法。使用rtmp流作为参数调用该脚本。例如:
http://example.com/cgi-bin/nbc.cgi?nbcv=url-minus-domain/movie.mp4
#!/usr/bin/env python
import cgi
import subprocess
rtmpdump='/usr/local/bin/rtmpdump';
# use the quiet switch we are writing the video to stdout.
quiet='-q';
# swf verification
swfUrlswitch='-s';
swfUrl='http://www.nbc.com/assets/video/3-0/swf/NBCVideoApp.swf';
rtmpUrlswitch='-r';
rtmpbase= 'rtmp://cp81777.edgefcs.net/ondemand/';
# grab the argument
a=cgi.FieldStorage()
rtmpUrl=rtmpbase+a.getvalue('nbcv');
pargs=[rtmpdump,quiet,swfUrlswitch,swfUrl,rtmpUrlswitch,rtmpUrl]
# http headers
if rtmpUrl[-3:]=='mp4':
print 'Content-Type: video/x-mp4'
if rtmpUrl[-3:]=='flv':
print 'Content-Type: video/x-flv'
# make sure you print a blank line after the header.
print ''
# call rtmpdump
subprocess.Popen(pargs)https://stackoverflow.com/questions/11958945
复制相似问题