[vlc] encrypting MPEG-2 TS streams for multicast

steven wagner swagner at ilm.com
Tue Dec 21 23:49:47 CET 2004


I seem to recall, on one of these lists, a post asking for ways to 
encrypt or otherwise control access to a multicast stream.  Since this 
post will be archived and hopefully indexed by major search engines, I 
hope this nugget of information is useful to someone else.  The features 
involved don't appear to be documented, but it's possible (likely, in 
fact :) ) that I didn't look in the right place.

After reading the source and some experimentation, I've found it's 
possible, using the CSA code in the MPEG-TS muxer/demuxer modules.  It 
looks like this code is mainly intended to facilitate decrypting MPEG-2 
streams from DVB satellite cards.

Add "--sout-ts-csa-ck=<sixteen-digit string for key>" on the encoder 
command line (tested with 0.7.2 on Windows).

For example:

"C:\Program Files\VideoLAN\VLC\vlc.exe"  dshow:// :dshow-vdev="Hauppauge 
WinTV PVR PCI II Capture" :dshow-adev="" :no-dshow-config 
:sout=#duplicate{dst=std{access=udp,mux=ts,url=224.16.1.2:1241}} --ttl 
12 -vvv --sout-ts-csa-ck=1234567890123456

Connecting to the stream with a vanilla client should yield many, MANY 
unreadable packets when the client is run with full verbosity.

Add "--ts-csa-ck=<same key>" on the decoder command line (appears to 
only work in 0.8.* and up).

For example:

/usr/local/bin/vlc udp://@224.16.1.2:1241 --ts-csa-ck "1234567890123456" 
-vvv


I've tested this on an MPEG-2 stream originating from a hardware encoder 
on a Win2k box to Linux clients.  Your mileage may (will?) vary.  
Obviously this won't help people who want to encrypt an AVI or an Ogg...

As far as setting the key, changing it on the fly and communicating it 
to the clients ... you're on your own there.  I'm trying to see if it's 
possible to change the key via the web or telnet interfaces on the 
encoding end.

Hope this proves useful to someone...

-- 
This is the vlc mailing-list, see http://www.videolan.org/vlc/
To unsubscribe, please read http://www.videolan.org/support/lists.html



More information about the vlc mailing list