首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >将FMS RTMP Live流转换为BlackBerry的RTSP

将FMS RTMP Live流转换为BlackBerry的RTSP
EN

Stack Overflow用户
提问于 2012-08-15 02:56:40
回答 1查看 803关注 0票数 0

有没有办法将RTMP直播流从FMS4.5转换为BlackBerry应用的RTSP?我有一个FMS4.5服务器部署希望能够通过一个本地应用程序的BlackBerry用户直播,根据BlackBerry文件,唯一可以支持BlackBerry设备上的直播协议是超文本传输协议和实时传输协议。

BlackBerry Support for media streaming

EN

回答 1

Stack Overflow用户

发布于 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

代码语言:javascript
复制
#!/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)
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/11958945

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档