使用 UDP/数据包注入通过 wifi 进行视频传输
嘿 Stackoverflow 社区 :)
我正在研究使用 wifi 将相机从 RC 设备流式传输视频到计算机中。
在考虑了所有选项后,我只剩下两个:
- 使用 UDP 传输数据包中的视频
- ,在接收设备上使用数据包注入和数据包嗅探。
我想知道每种方法的优缺点是什么(针对视频传输的特定目的)? 环顾四周后,我发现这两种方式都有很多实现,但没有地方说明为什么一种方式比另一种方式更好。
有几件事我没有提到:
- 我知道 UDP 没有纠错功能,这会使视频变得奇怪 - 我不关心视频的质量,只要它可以被识别即可。 我不想使用基于连接的协议(TPC 等)- 我不想在断开连接时等待握手。
谢谢 :)
Hey Stackoverflow community :)
Im looking into making a camera stream video from a an RC device into a computer using wifi.
After considering all of the options I had Im left with two:
- use UDP to transfer video in packets
- use packet injection and packet sniffing on the receiving device.
I was wondering what are the pros and cons of each method (for that specific purpose of video transmission)?
after looking around I found many implementations for both ways but nowhere have they specified why one is better than the other.
few things that I have not mentioned:
- I know UDP does not have error correction which can make the video weird- I dont care about the quality of the video as long as it will be recognizeable.
I dont want to use connection based protocol (TPC, etc)- I dont want to wait for handshake when I get disconnected.
thanks :)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我正在尝试做类似的事情。我对此的看法基本上是,当您在监控模式下使用 wifi 卡(即使用数据包嗅探/注入)时,您实际上不需要连接到该网络。通常,您仍然需要作为客户端连接到接入点,然后才能通过该连接使用 UDP 进行通信。但是,在这种情况下,UDP 消息将路由到 Wifi 卡,并且数据包会在不与任何客户端关联的情况下注入出去。然后,任何“客户端”只需在同一通道上嗅探或监听即可获得传输。因此,UDP 的好处不仅不会检查丢失的帧等,而且在这种情况下,您不需要连接到网络来获取数据包。
就我而言,这是更好的选择,因为基本上在前一种情况下您将需要连接到 AP,并且通常需要接收器端功能更强大的硬件(关联部分需要更大的范围,因为您需要发回消息本质上是通过 TCP 来连接)。
仅供参考,这是我正在使用的链接/存储库,它也是我正在谈论的内容的参考
https://docs.px4.io/master/en/tutorials/video_streaming_wifi_broadcast。 html
https://github.com/svpcom/wifibroadcast
我正在使用现成的“解决方案”短期内,Accsoon Cineye Air 基本上通过 WiFi 传输 HDMI 300 英尺视线。你需要一部 Android 手机才能接收它,基本上我使用 Vysor 应用程序(付费版本为 40 美元)将屏幕镜像到我的桌面。它可以工作,但延迟仍然比我想要的要多:从 cineeye 起至少有 60 毫秒,所以你可以驾驶它四处走动,但它不如 DJI 快,大约 30-40 毫秒),这是我的目标。
I'm trying to do a similar thing. My take on this is basically when you use the wifi cards in monitor mode (i.e. using packet sniffing/injection) you don't actually need to be connected to that network. Typically, you still need to be connected to an Access point as a client then you can communicate using UDP through that connection. But, in this case, the UDP messages are routed to the Wifi cards and the packets are injected out without being associated with any client. Then, any 'client' just has to sniff or listen on that same channel to get the transmission. So the benefit is not only does UDP not check for lost frames/etc, but also in this case you don't need to be connected to the network to get the packets.
In my case, this is preferable, since basically you will need to connect to the AP in the former case and that would require more capable hardware on the receiver side typically (more range is needed for the association part since you need to send messages back over TCP essentially to get it connected).
FYI here are the links/repos I am using and it also is a reference to what I am talking about
https://docs.px4.io/master/en/tutorials/video_streaming_wifi_broadcast.html
https://github.com/svpcom/wifibroadcast
I am using an off the shelf 'solution' in the short term, the Accsoon Cineye Air, which basically transmits HDMI 300ft line of sight over WiFi. You need an android phone to receive it, and basically I'm using the Vysor application (paid version is $40) to mirror the screen to my desktop. It works, but the latency is still more than I want : 60ms at least from the cineeye, so you can drive it around but its not as quick as DJI which is around 30-40ms ), which is my goal.