简体   繁体   English

通过网络从Xbox Kinect流式传输视频

[英]Stream video from Xbox Kinect over network

I am trying to stream a video from an Xbox Kinect over LAN. 我正在尝试通过LAN从Xbox Kinect流式传输视频。 I wrote a socket class that will send at about 25 mega bits per second with a good connection and about 1 mega bit per second with a bad connection. 我编写了一个套接字类,每秒发送大约25兆位,连接良好,每秒大约1兆位,连接错误。 This will be on a robot so I will shoot for 1Mbps and I would like to get 15 FPS with minimal lag. 这将是一个机器人,所以我将以1Mbps的速度拍摄,我希望获得15 FPS,并且延迟最小。 Getting the YUV format from the camera (http://msdn.microsoft.com/en-us/library/jj131027.aspx) it needs 4 bits per pixel. 从相机获取YUV格式(http://msdn.microsoft.com/en-us/library/jj131027.aspx)它需要每像素4位。 I will cut the resolution to 320 x 240. So let me do the math for a frame (320 * 240 * 4 / 1024 / 1024) = 0.29296875 Mbs which means I can stream at 3.4 FPS if I'm can only send at 1Mbps. 我将分辨率降低到320 x 240.所以让我算一帧(320 * 240 * 4/1024/1024)= 0.29296875 Mbs,这意味着如果我只能以1Mbps发送,我可以以3.4 FPS流式传输。 So I need to reduce the byte array to about a fifth of the size. 所以我需要将字节数组减少到大小的五分之一。 I've looked into this before but it actually takes longer to compress the byte array, send it and then decompress the array than it does to just send the raw data. 我之前已经研究过这个问题,但实际上需要更长时间来压缩字节数组,发送它然后解压缩数组而不是发送原始数据。 Is there a good algorithm that's fast enough to do this? 是否有一个很好的算法,足以做到这一点?

Aren't they called video codecs? 他们不是被称为视频编解码器吗?

You'll be missing out if you don't treat the data as video... it's much more compressible than raw data. 如果您不将数据视为视频,那么您将会错失...它比原始数据更具可压缩性。 There are many codecs around for all sorts of applications. 各种各样的应用程序都有很多编解码器。 The choice is usually a compromise between processing cost and bandwidth. 选择通常是处理成本和带宽之间的折衷。 It all depends on how much heavy lifting your robot can do before booting the data over the network. 这一切都取决于机器人在通过网络启动数据之前可以做多少繁重的工作。

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

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