简体   繁体   English

通过 RTMP 从 Java OpenCV 流式传输

[英]streaming from Java OpenCV through RTMP

I have a JavaFX Application that uses OpenCV to get the frames from the camera.我有一个 JavaFX 应用程序,它使用 OpenCV 从相机获取帧。

I would like to send this stream to nginx-rtmp.我想将此 stream 发送到 nginx-rtmp。

I must be missing something (or the whole loginc of RTMP) but I can't seem to find a simple way to make the stream我一定遗漏了一些东西(或 RTMP 的整个登录),但我似乎找不到一种简单的方法来制作 stream

I already tested the nginx-rtmp with OBS Studio, and I have the frames, I'm missing the link to get the frames through the RTMP link.我已经用 OBS Studio 测试了 nginx-rtmp,并且我有框架,我缺少通过 RTMP 链接获取框架的链接。

Already found a couple of libraries (xuggler, gstreamer,humble-video...) but none of them seems to work or didn't find a way to implement them correctly已经找到了几个库(xuggler、gstreamer、humble-video...),但它们似乎都不起作用,或者没有找到正确实现它们的方法

Based on the discussion we had at the comments section, this is the summary:根据我们在评论部分的讨论,这是摘要:

FFmpeg is the Swiss army knife for all sort of video processing and streaming. FFmpeg是用于各种视频处理和流媒体的瑞士军刀。 In case you want the camera stream to be re-streamed as RTMP regardless what's you doing in OpenCV then that's also possible.如果您希望将相机 stream 重新流式传输为 RTMP,无论您在 OpenCV 中做什么,这也是可能的。

If that's the case then just google FFmpeg source-protocol dest-protocol .如果是这种情况,那么只需谷歌FFmpeg source-protocol dest-protocol

Regarding the Java version, you can invoke FFmpeg as command line from your Java code, otherwise its API support JAVA beside many other languages. Regarding the Java version, you can invoke FFmpeg as command line from your Java code, otherwise its API support JAVA beside many other languages.

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM