据我了解,xuggle 从 3.4 版开始内置了 rtmp 支持,因此他们弃用了 red5 适配器。因此,为了流式传输到正在运行的 red5 实例,我在堆栈溢出中进行了一些搜索,发现了这个问题:
如何从 Java 应用程序内传输实时视频?
我按原样保留了代码,然后将其粘贴到我的 Netbeans 项目中。然而,这不起作用。我玩了一段时间,然后决定观察客户端(在我的机器上)和 red5 服务器之间的消息交换。
以下是交流:
http://i53.tinypic.com/34e4z5x.jpg
你可能会注意到,在 MI2 中,我的客户端已经调用了它的releaseStream(stream1)
这发生在代码块中:
int retVal = container.open(url, IContainer.Type.WRITE, containerFormat_live, true, false);
当我深入研究交换时,我注意到:
http://i53.tinypic .com/rwnn8y.jpg
这让我怀疑我是否没有向服务器发布错误的 Flash 版本。但我该如何纠正呢?
有人得到了使用 xuggler 3.4 和 red5 0.9.1 的示例吗?
As I understand xuggle has built in rtmp support as of version 3.4 and as a result they deprecated the red5 adapter. So in order to stream to a running red5 instance, I searched a bit in stack overflow and found this question:
How to transmit live video from within a Java application?
I took the code as it is and just pasted it into my Netbeans Project. However, it doesn't work. I played around it a while and then decided to observe the messages exchange between the client (on my machine) and the red5 server.
Here is the exchange:
http://i53.tinypic.com/34e4z5x.jpg
You might notice that in MI2 my client has already called its releaseStream(stream1)
This happens in the code block:
int retVal = container.open(url, IContainer.Type.WRITE, containerFormat_live, true, false);
As I dug deeper into the exchange I noticed:
http://i53.tinypic.com/rwnn8y.jpg
And that made me wonder if I wasn't advertising a wrong flash version to the server. But how am I supposed to correct that?
Anybody got that example working with xuggler 3.4 and red5 0.9.1 ?
发布评论
评论(1)
我建议使用 Xuggler 4.x(树尖)并使用 librtmp 进行编译,因为这可以解决很多 RTMP 问题。
I'd recommend using Xuggler 4.x (tip of tree) and compiling with librtmp as that fixes A LOT of RTMP problems.