bentasker / HLS-Stream-Creator

Simple Bash Script to take a media file, segment it and create an M3U8 playlist for serving using HLS
BSD 3-Clause "New" or "Revised" License
273 stars 101 forks source link

How come the encrypted files are still playable? #37

Open monir-zaman opened 4 years ago

monir-zaman commented 4 years ago

when I encrypt the streams with -e flag, the process completes without any error, however, the files still can be played with vlc.

samueleastdev commented 4 years ago

That’s because it can access the key to decrypt the segments you will probably want to put the key behind some kind of proxy.

bentasker commented 4 years ago

Yes.

A common approach is to encrypt the stream and then put the key itself on a server that requires authentication of some form - so segments can be fetched without auth overhead, but access to the key can still be controlled.

In the meantime if you want to confirm playback fails without the key, simply renaming the keyfile should be sufficient.