Relaying a video stream?

About encoding, codec settings, muxers and filter usage
Prutser
Blank Cone
Blank Cone
Posts: 20
Joined: 11 Jun 2004 11:52
Location: The Netherlands

Relaying a video stream?

Postby Prutser » 11 Jun 2004 18:54

I've got the following scenario:

At one LAN I have a vlc that offers its video on its built-in webserver on LAN 1. Then I have a client that connects to vlc and tunnels the stream to a component on another LAN. There I offer the stream using a standalone webserver with a servlet. The servlet simply copies the stream to the connected HTTP clients. Note that the video stream is relayed to LAN 2 regardless of whether or not there are active clients there.

The problem is that windows media player can't figure out the stream format when connecting to the custom webserver at the 2nd LAN. I suppose this is due to the fact that the new client is never directly connected to the vlc at LAN 1, so its asf muxer doesn't see a new connection and hence doesn't send the leading meta data about the stream. Vlc fails as well (which seems logical if indeed they require leading stream info that is normally sent by the asf muxer on connection creation).

I know I could use mpeg-ts and send the video stream in UDP packets that each carry meta data, but windows media player can't read UDP packets. Also, when I simply concatenate the UDP packets and send them to WMP over HTTP, it still doesn;t get it (vlc works fine then btw). So since mpeg-ts isn't an option (I need WMP support) and I don't want every client to connect to the source vlc (I need to relay the stream to other LANs instead), is there anything I can do?

Could I generate the "stream header" myself in my servlet and send it to each new client that connects?

regards,
Erik

zorglub
Cone that earned his stripes
Cone that earned his stripes
Posts: 482
Joined: 21 Nov 2003 02:53
Location: Paris - France
Contact:

Postby zorglub » 14 Jun 2004 15:51

Hello,

I don't know if this is possible for you, but WMP can support UDP and MPEG-TS using the Moonlight codec.

Else, instead of using a servlet to relay the stream, you could use another vlc that gets the stream from the first one, and re-exports it throught HTTP.

This way, this second vlc will send the ASF headers whenever a new client connects.

Hope that helps,
Zorglub
Clément Stenac

Prutser
Blank Cone
Blank Cone
Posts: 20
Joined: 11 Jun 2004 11:52
Location: The Netherlands

Postby Prutser » 14 Jun 2004 16:20

Hi Zorglub,

We have used moonlight, but we found the installation too messy for complete non-technical people. They don't understand the necessity (you know how customers are ;-) )
Also, moonlight is commercial stuff and you end up with that very annoying bouncing logo all over your screen.

We're really looking for ways to use WMP on the client. Not that we love it soo much (on the contrary), but users demand it.

The relay servlet is our central distribution system. In fact it goes beyond a single servlet. Think of it as a fully resilient, generic data distribution network. Among other stuff, we hooked up vlc as a video source.

Vlc on the server (as the source) is a killer-app. It reads everything for us and, using its stream output features, is easily connected to our distribution middleware. On the client we need WMP however. It's a customer thing.. :evil:

We've tried to mimic the asf header by storing the very first 8kb of the stream in the servlet. One would expect this to contain the stream info. Then when a new client connects to the servlet, we first send this 8kb and then multiplex the real stream to it. Unfortunately this (tremendously ugly) hack doesn't work. Neither vlc, nor WMP are able to read over the glitch that connects the first 8kb to the rest of the live stream.

Is there any other way we (and possibly others) could relay vlc's output over existing middleware systems?

regards,
Erik

Prutser
Blank Cone
Blank Cone
Posts: 20
Joined: 11 Jun 2004 11:52
Location: The Netherlands

How about this?

Postby Prutser » 14 Jun 2004 16:37

Something just came to mind!

I don't know what the mpeg-ts format exactly looks like, but let's assume it defines individual packets, each with a header part and a body part. Assuming that the header contains asf stream info, could we simply read the packets, strip off the headers and concatenate the remaining bodies into a WMP-compatible video stream?

If the above assumptions hold I can image one could use a "server-side" vlc that outputs mpeg-ts to an existing middleware product and then on the client LAN (the servlet in our example) reassemble the mpeg-ts packets into a normal video stream, stripping the headers off every packet, except the first one.

Am I thinking in the right direction or is this a hopeless exercise right from the start?

regards,
Erik

Prutser
Blank Cone
Blank Cone
Posts: 20
Joined: 11 Jun 2004 11:52
Location: The Netherlands

Well?

Postby Prutser » 24 Jun 2004 17:43

Could this possibly work? Anyone here with more indepth knowledge of this stuff?

omi

Replicating stream

Postby omi » 17 Jul 2004 16:24

Hi

just try something like
vlc {udp,http}://box:port --sout '#transcode{put something here}:std{access=whatever,mux=.......,url=.........}'

That works


Return to “VLC stream-output (sout)”

Who is online

Users browsing this forum: No registered users and 7 guests