我发现自己的处境很奇怪。我正在尝试使用这教程配置流服务器,但不幸的是没有成功。目前,我有最新版本的rtmpd服务器(版本号: 784),可以找到这里。我按照教程上的说明安装了它。到目前为止,问题是我无法用flowplayer示例测试服务器。
配置文件:
configuration=
{
daemon=false,
pathSeparator="/",
logAppenders=
{
{
name="console appender",
type="coloredConsole",
level=6
},
{
name="file appender",
type="file",
level=6,
fileName="/opt/crtmpserver/logs/crtmpserver.log",
}
},
applications=
{
rootDirectory="applications",
{
description="FLV Playback",
name="flvplayback",
protocol="dynamiclinklibrary",
default=true,
aliases=
{
"simpleLive",
"vod",
"live",
"WeeklyQuest",
"SOSample",
"oflaDemo",
},
acceptors =
{
{
ip="0.0.0.0",
port=1935,
protocol="inboundRtmp"
},
{
ip="0.0.0.0",
port=6666,
protocol="inboundLiveFlv",
waitForMetadata=true,
},
{
ip="0.0.0.0",
port=9999,
protocol="inboundTcpTs"
},
},
externalStreams =
{
{
uri="rtsp://user:pass@link-to-stream",
localStreamName="pidg",
forceTcp=true,
},
},
validateHandshake=true,
keyframeSeek=true,
seekGranularity=1.5, --in seconds, between 0.1 and 600
clientSideBuffer=12, --in seconds, between 5 and 30
--generateMetaFiles=true, --this will generate seek/meta files on application startup
--renameBadFiles=false,
mediaFolder="/opt/crtmpserver/media"
},
}
}指向rtsp流的链接可以工作,并且已经用ffplay和vlc进行了测试。
误差
我知道,当我试图连接到这条溪流的时候:
/thelib/src/netio/epoll/iohandlermanager.cpp:120 Handlers count changed: 3->4 IOHT_TCP_CARRIER
/thelib/src/netio/epoll/tcpacceptor.cpp:185 Client connected: 127.0.0.1:50947 -> 127.0.0.1:1935
/thelib/src/application/baseclientapplication.cpp:257 Stream NR(1) with name `` registered to application `flvplayback` from protocol IR(4)
/thelib/src/application/baseclientapplication.cpp:268 Stream NR(1) with name `` unregistered from application `flvplayback` from protocol IR(4)
/thelib/src/application/baseclientapplication.cpp:257 Stream NR(2) with name `` registered to application `flvplayback` from protocol IR(4)
/thelib/src/protocols/rtmp/basertmpappprotocolhandler.cpp:1043 Play request for stream name `pidg`. Start: -2; length: -1
/thelib/src/protocols/rtmp/basertmpappprotocolhandler.cpp:2164 No live streams found: `pidg` or `pidg`
/thelib/src/mediaformats/readers/streammetadataresolver.cpp:207 Stream name pidg not found in any storage
/thelib/src/protocols/rtmp/basertmpappprotocolhandler.cpp:1075 We are going to wait for the live stream `pidg`
/thelib/src/application/baseclientapplication.cpp:268 Stream NR(2) with name `` unregistered from application `flvplayback` from protocol IR(4)
/thelib/src/application/baseclientapplication.cpp:257 Stream ONR4R(3) with name `pidg` registered to application `flvplayback` from protocol IR(4)流器
守则是:
<script>
$f("rtmp_player", "http://releases.flowplayer.org/swf/flowplayer-3.2.18.swf", {
clip: {
url : 'pidg',
live : true,
provider: 'rtmp',
},
plugins: {
rtmp: {
url: 'flowplayer.rtmp-3.2.13.swf',
netConnectionUrl: 'rtmp://127.0.0.1/flvplayback' ,
subscribe:true,
}
}
});
</script>我试图使它类似于教程,因为我不能在这一点上共享流。
我花了不少时间自己解决这个问题,你能帮帮我吗?
编辑:
经过一些测试后,我发现问题在于服务器没有流到外部流!
发布于 2014-07-12 10:58:38
我对纯rtmpd解决方案感兴趣,但不幸的是,我没有时间提供一个解决方案,所以我决定切换到libav进行编码,并将其流到127.0.0.1:6666。我使用的命令是:
avconv -options -i rtsp_link -options -f flv metadata -title='cam' -streamName='cam' 'tcp://127.0.0.1:6666'我成功地从rtmp://127.0.0.1/live/cam链接上播放了它。
如果有人设法提供了一个纯粹的rtmpd解决方案,我会很高兴地接受它而不是我的答案,但是现在,我会接受我的解决方案,以防其他人在同样的问题上陷入困境。
https://stackoverflow.com/questions/24581247
复制相似问题