Skip to content

Commit 2b26cee

Browse files
deprecate cloud dependencies, bug fixes, and other minor improvements
1 parent ac35d81 commit 2b26cee

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

README.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,14 +141,21 @@ r_720p = Representation(width=1280, height=720, kilo_bitrate=2048)
141141
#### Encrypted HLS
142142
The encryption process requires some kind of secret (key) together with an encryption algorithm. HLS uses AES in cipher block chaining (CBC) mode. This means each block is encrypted using the ciphertext of the preceding block. [Learn more](https://en.wikipedia.org/wiki/Block_cipher_mode_of_operation)
143143

144-
You need to pass both `URL to the key` and `a path to save a random key on your local machine` to the `encryption` method:
144+
You must specify a path to save a random key to your local machine and also a URL(or a path) to access the key on your website(the key you will save must be accessible from your website). You must pass both these parameters to the `encryption` method:
145145

146146
```python
147+
#A path you want to save a random key to your server
148+
save_to = '/home/public_html/PATH_TO_KEY_DIRECTORY/random_key.key'
149+
150+
#A URL (or a path) to access the key on your website
151+
url = 'https://www.aminyazdanpanah.com/PATH_TO_KEY_DIRECTORY/random_key.key'
152+
# or url = '/PATH_TO_KEY_DIRECTORY/random_key.key'
153+
147154
import ffmpeg_streaming
148155
(
149156
ffmpeg_streaming
150157
.hls(video, hls_time=10, hls_allow_cache=1)
151-
.encryption('https://www.aminyazdanpanah.com/keys/enc.key', '/var/www/my_website_project/keys/enc.key')
158+
.encryption(url, save_to)
152159
.format('libx264')
153160
.auto_rep(heights=[480, 360, 240])
154161
.package('/var/www/media/videos/hls/hls-stream.m3u8')

0 commit comments

Comments
 (0)