You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.md
+13-15
Original file line number
Diff line number
Diff line change
@@ -53,7 +53,7 @@ import ffmpeg_streaming
53
53
There are several ways to open a resource.
54
54
55
55
#### 1. From a FFmpeg supported resource
56
-
You can pass a local path of video(or a supported resource) to the `open` method:
56
+
You can pass a local path of video(or a supported resource) to the `input` method:
57
57
```python
58
58
video = ffmpeg_streaming.input('/var/media/video.mp4')
59
59
```
@@ -66,7 +66,7 @@ video = ffmpeg_streaming.input('https://www.aminyazdanpanah.com/?"PATH TO A VIDE
66
66
```
67
67
68
68
#### 2. From Clouds
69
-
You can open a file from a cloud by passing an array of cloud configuration to the `openFromCloud` method.
69
+
You can open a file from a cloud by passing an instance of a cloud configuration to the `input` method.
70
70
71
71
```python
72
72
from ffmpeg_streaming import S3
@@ -77,10 +77,10 @@ video = ffmpeg_streaming.input(s3, bucket_name="bucket-name", key="video.mp4")
77
77
Visit **[this page](https://video.aminyazdanpanah.com/python/start/clouds?r=open)** to see some examples of opening a file from **[Amazon S3](https://aws.amazon.com/s3)**, **[Google Cloud Storage](https://console.cloud.google.com/storage)**, **[Microsoft Azure Storage](https://azure.microsoft.com/en-us/features/storage-explorer/)**, and a custom cloud.
78
78
79
79
#### 3. Capture Webcam or Screen (Live Streaming)
80
-
You can pass a name of the supported, connected capture device(i.e. name of webcam, camera, screen and etc) to the `capture` method to stream a live media over network.
80
+
You can pass a name of the supported, connected capture device(i.e. name of webcam, camera, screen and etc) to the `input` method to stream a live media over network.
81
81
82
82
```python
83
-
video= ffmpeg_streaming.input('CAMERA NAME OR SCREEN NAME', capture=True)
83
+
capture= ffmpeg_streaming.input('CAMERA NAME OR SCREEN NAME', capture=True)
84
84
```
85
85
To list the supported, connected capture devices, see **[FFmpeg Capture Webcam](https://trac.ffmpeg.org/wiki/Capture/Webcam)** and **[FFmpeg Capture Desktop](https://trac.ffmpeg.org/wiki/Capture/Desktop)**.
@@ -174,7 +174,7 @@ See **[the example](https://video.aminyazdanpanah.com/python/start?r=enc-hls#hls
174
174
##### DRM
175
175
However FFmpeg supports AES encryption for HLS packaging, which you can encrypt your content, it is not a full **[DRM](https://en.wikipedia.org/wiki/Digital_rights_management)** solution. If you want to use a full DRM solution, I recommend trying **[FairPlay Streaming](https://developer.apple.com/streaming/fps/)** solution which then securely exchange keys, and protect playback on devices.
176
176
177
-
**[Apple’s FairPlay](https://developer.apple.com/streaming/fps/)**is a recommended DRM system, but you can use other DRM systems such as **[Microsoft's PlayReady](https://www.microsoft.com/playready/overview/)** and **[Google’s Widevine](https://www.widevine.com/)**.
177
+
**Besides [Apple’s FairPlay](https://developer.apple.com/streaming/fps/)** DRM system, you can also use other DRM systems such as **[Microsoft's PlayReady](https://www.microsoft.com/playready/overview/)** and **[Google’s Widevine](https://www.widevine.com/)**.
178
178
179
179
### Transcoding
180
180
You can get realtime information about the transcoding using the following code.
It can also be null. The default path to save files is the input path.
212
-
```python
211
+
It can also be None. The default path to save files is the input path.
212
+
```python
213
213
from ffmpeg_streaming import Formats
214
214
215
215
hls = video.hls(Formats.h264())
216
216
hls.auto_generate_representations()
217
217
218
218
hls.output()
219
219
```
220
-
**NOTE:** If you open a file from a cloud and do not pass a path to save the file to your local machine, you will have to pass a local path to the `save` method.
220
+
**NOTE:** If you open a file from a cloud and do not pass a path to save the file to your local machine, you will have to pass a local path to the `output` method.
221
221
222
222
#### 2. To Clouds
223
-
You can save your files to a cloud by passing an array of cloud configuration to the `save` method.
223
+
You can save your files to a cloud by passing an instance of a `CloudManager` to the `output` method.
You can pass a url(or a supported resource like `ftp`) to live method to upload all the segments files to the HTTP server(or other protocols) using the HTTP PUT method, and update the manifest files every refresh times.
247
+
You can pass a url(or a supported resource like `ftp`) to the `output` method to upload all the segments files to the HTTP server(or other protocols) using the HTTP PUT method, and update the manifest files every refresh times.
248
248
249
-
If you want to save stream files to your local machine, use the `save` method.
**NOTE:** In the HLS format, you must upload the master playlist to the server manually. (Upload the `/var/www/stream/live-master-manifest.m3u8` file to the `http://YOUR-WEBSITE.COM`)
257
+
**NOTE:** In the HLS format, you must upload the master playlist to the server manually.
259
258
260
259
See **[FFmpeg Protocols Documentation](https://ffmpeg.org/ffmpeg-protocols.html)** for more information.
0 commit comments