netcat and videolan

1.7k views Asked by At

I have:

  • one pc with videolan installed (windows 7) 192.168.1.2,
  • one pc with linux ubuntu 11.4 installed 192.168.1.12,

I've try to send a video via UDP (in videolan) from windows 7 to in linux-pc throught port 8081

in linux I've run netcat listening on port 8081 and redirect to file, (netcat -lu 8081 >file.avi) (my goal is to redirect to a serial in embeded linux snapgear, by the way now I need to rediret to a file)

but don't works and I can figure out how config all, netcat don't write every byte sent on 8081?

thanks

update:

my problem is that I dunno address of source, take a look at the following scenario:

linux pc send stream to a serial, and other pc send to that pc a stream. linux pc is alway in listening and don't know the address of source / sources,

this is my problem I dunno how to send with VLC, I know how send vlc to vlc (and it works) but I dunno how send to 192.168.1.12:8081

thanks again

2

There are 2 answers

1
lxgr On BEST ANSWER

Your setup will probably not work: AVI is not designed to be streamed as-is over an unreliable transport layer protocol.

When you use VLC, it probably uses an encapsulation format like an MPEG transport stream or RTP, which you would have to properly decode before saving the contents to a file.

Even if you really manage to just stream the raw AVI file via UDP, you will run into problems because of packet loss and reordering - AVI is simply not designed to withstand that kind of errors.

You should either switch to a reliable transport protocol like HTTP (and even then use something else than AVI - it's really not designed for streaming), or use some other protocol to encapsulate your media, like an MPEG transport stream or RTP.

4
teGuy On

Please check your IP-Adresses. Do they really have the same?

Does the netcat work for other protocols? You may test it with the dns-port and nslookup on windows.