Java 中的视频/音频聊天

发布于 2024-11-28 03:02:46 字数 220 浏览 0 评论 0原文

我打算用Java实现视频/音频聊天应用程序,我想问你建议使用什么。 我们目前正在尝试 VLCj 库,这很棒,但 VLC 似乎不支持实时视频/音频流。延迟相当高(大约 1 秒)。我不确定延迟来自哪里(肯定是编码视频的问题),但是这么高的延迟对于聊天来说不太方便。虽然 VLC 是一个很棒的应用程序,但我找不到解决这个问题的解决方案。 因此,如果有人对使用什么有任何建议,或者如何配置 VLC 以降低延迟,我将非常感激。 谢谢。

I am planning to implement Video/Audio chat application in Java and I would like to ask you what do you suggest to use.
We are currently trying VLCj library, which is great but it seems that VLC does not support streaming of video/audio in real time. Latency is quite high (approx. 1s). I am not sure where the delay comes from (must be something about encoding video), but so high delay is not very convenient for chat. Although VLC is great application, I cannot find sollution to overcome this problem.
So if anyone have any suggestion what to use, or how to configure VLC to make latency lower i would be very grateful.
Thanks.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

一抹淡然 2024-12-05 03:02:46

我个人建议不要使用 JMF(Java 媒体框架)。它很旧,而且相当缺乏维护/死亡 - 谷歌一下,你会发现不仅仅是我建议转向清晰!

我从未以这种方式使用 VLCj 进行实时视频流传输,但如果您想继续沿着这条路线走下去,您可能想看看它是如何流式传输视频的。如果它是通过纠错来完成的,则可能有利于延迟所有帧以请求重复损坏的帧等,以提供完美的播放。实际上,对于流媒体,您需要即时播放,如果经常丢失一两帧,您可以忍受。我不太确定你如何在 VLCj 中设置该选项,但这是值得研究的事情。

除此之外,您可能想尝试一下 Xuggler - 它的工作级别比 VLCj 低得多,但这应该让您对正在发生的事情有更多的控制权(与 JMF 不同,它是一个很好的、积极维护的项目。)

I'd advise against JMF (Java media framework) personally. It's old and pretty unmaintained / dead - Google around and you'll see that it's not just me that advises steering clear!

I've never used VLCj for live video streaming in this way, but if you want to continue down this route you might want to see how it's streaming the video. If it's done over something with error correction it may favour delaying all the frames to request repeats for corrupt ones etc. to give perfect playback. In reality for streaming you want instantaneous playback and if a frame or 2 every so often gets dropped, you can live with it. I'm not quite sure how you'd set that option in VLCj but it's something to look into.

Apart from that you might want to give Xuggler a try - it works on a much lower level than VLCj but this should give you much more control over what's happening (and unlike JMF it's a good, actively maintained project.)

九厘米的零° 2024-12-05 03:02:46

您是否看过 Java 媒体框架?与 VLCj 相比,您可能需要编写矿石代码,但它会更多地在您自己的控制之下。

另外,关于 VLCj,您可以通过很多选项来获得您想要的结果。例如,如果您使用高压缩设置,则根据所使用的压缩,您可能启用了某些图片类型< /a> 表示延迟解码。

Have you had a look at the Java Media Framework? You will probably need to write ore code than VLCj, but it will be more under your own control.

Also, regarding VLCj, there are a lot of options that you can fiddle to have the results you want. For example, if you are using settings for high compression, depending on the compression used you might have enabled some picture types that delay decoding.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文