Java RTP/HTTP 流

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/5818219/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-30 12:55:15  来源:igfitidea点击:

Java RTP/HTTP Streaming

javahttpstreamingrtpxuggle

提问by T D

i'm decoding and encoding a videofile via Xuggle to FLV-video format and send it via Sockets to my java server (not the entire file, only parts of it every X seconds). On the server-side I get the encoded file as ByteArrayInputStream. Is it possible to stream this ByteArrayInputStream via rtp or http-streaming? Or do i need a finished encoded file for that? I'm creating a video streaming server, where the client encodes the video file and sends it to the server in parts. This is already done. I'm now stuck on the server side, to stream the ByteArrayInputStream via RTP or HTTP, so I can watch it via VLC. Are there any good examples for it?

我正在通过 Xuggle 将视频文件解码和编码为 FLV 视频格式,并通过套接字将其发送到我的 Java 服务器(不是整个文件,每 X 秒只发送一部分)。在服务器端,我将编码文件作为 ByteArrayInputStream。是否可以通过 rtp 或 http-streaming 流式传输这个 ByteArrayInputStream?或者我需要一个完整的编码文件吗?我正在创建一个视频流服务器,客户端在其中对视频文件进行编码并将其分部分发送到服务器。这已经完成了。我现在被困在服务器端,通过 RTP 或 HTTP 流式传输 ByteArrayInputStream,所以我可以通过 VLC 观看它。有什么好的例子吗?

I've already tested to save the ByteArrayInputStream to file. This works but I don't wanna save the file on the server. I wanna stream it ;)

我已经测试过将 ByteArrayInputStream 保存到文件。这有效,但我不想将文件保存在服务器上。我想流式传输;)

Thank you

谢谢