Digging HDMI Out Of UDP Packets

[Danman] was looking for a way to get the HDMI output from a camera to a PC so it could be streamed over the Internet. This is a task usually done with HDMI capture cards, either PCI or even more expensive USB 3.0 HDMI capture boxes. In his searches, [danman] sumbled across an HDMI extender that transmitted HDMI signals over standard Ethernet. Surely there must be a way to capture this data and turn it back.

The extender boxes [danman] found at everyone’s favorite chinese reseller were simple – just an Ethernet port, HDMI jack, and a power connector – and cheap – just $70 USD. After connecting the two boxes to his network and setting up his camera, [danman] listened in to the packets being set with Wireshark. The basic protocol was easy enough to grok, but thanks to the Chinese engineers and an IP header that was the wrong length, [danman] had to listen to the raw socket.

Once everything was figured out, [danman] was able to recover raw frames from the HDMI extenders, recover the audio, and stream everything to his PC with VLC. All the code is available, and if you’re looking for a way to stream HDMI to multiple locations on a network, you won’t find a better solution that’s this cheap.

24 thoughts on “Digging HDMI Out Of UDP Packets

    1. Wow… it wouldn’t be nearly as bad if it were not the exact same article.. oh wait, yes it would.

      How about a HaD article on how to use your own search box for research?

  1. I don’t know why they bothered with IP. You could just transport the data with raw Ethernet frames. It wouldn’t route, but if you’re just transporting (crappy) video from one box to another, it doesn’t really need to.

    I almost once upon a time designed a “phone line extender” that would let you extend a phone line over Ethernet. Yes, you could just use the cat5/3 wires directly for POTS, but then it wouldn’t be able to do Ethernet. My solution would have allowed any bridged network configuration. I never got around to it, and by now POTS is basically obsolete.

      1. You could do 100BaseT ethernet as it also only uses 2 pairs. Years ago when I worked in the casinos, we’d use splitters to drive two devices off one CAT5 line until engineering could pull more to the port (they had a 4week turn-around, so hence our work around).

    1. I checked ebay for the hardware being discussed; and at least some of the vendors are selling senders and receivers separately; and have copy suggesting that you can get an ‘HDMI splitter/broadcast’ effect by putting one transmitter on the same switch as multiple receivers. I suspect that these things are dumb as rocks and not very configurable; so they probably don’t scale with any particular sophistication; but being usable point-to-point or broadcast is a potentially handy feature(especially since the typical point-to-point only boxes don’t compress at all, or at least not as badly; but use some not-even-ethernet link that can’t be routed, switched, or split. If the quality is going to be worse, you might at least take advantage of the versatility.)

  2. Great post! I am more than happy with mpeg4/2 quality so this hack, even with lossy quality is awesome!

    BTW, what about $70 android boxes with HDMI input (Tronsmart Pavo M9 4K, UGOOS UT3+ TV, etc).. is there any reason an open source server (like tvheadend) couldn’t be ported to do the same thing (stream hdmi video over ethernet)? Granted you would still need an external HD/ATSC tuner..

    I’ve seen commercial solutions, but they are all much more expensive than the $70 extender boxes:
    dvblink, vdr, simple.tv , hdhomerun, tablo, eyetv, slingboxm2 / Slingbox PRO-HD SB300-100, nextpvr, tivo roamio) etc

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s