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
+27-26Lines changed: 27 additions & 26 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -58,11 +58,10 @@ video = (google_cloud, download_options, None)
58
58
59
59
60
60
### DASH
61
-
**[Dynamic Adaptive Streaming over HTTP (DASH)](https://dashif.org/)**, also known as MPEG-DASH, is an adaptive bitrate streaming technique that enables high quality streaming of media content over the Internet delivered from conventional HTTP web servers.
61
+
**[Dynamic Adaptive Streaming over HTTP (DASH)](https://dashif.org/)**, also known as MPEG-DASH, is an adaptive bitrate streaming technique that enables high quality streaming of media content over the Internet delivered from conventional HTTP web servers.[Learn more](https://en.wikipedia.org/wiki/Dynamic_Adaptive_Streaming_over_HTTP)
62
62
63
-
Similar to Apple's HTTP Live Streaming (HLS) solution, MPEG-DASH works by breaking the content into a sequence of small HTTP-based file segments, each segment containing a short interval of playback time of content that is potentially many hours in duration, such as a movie or the live broadcast of a sports event. The content is made available at a variety of different bit rates, i.e., alternative segments encoded at different bit rates covering aligned short intervals of playback time. While the content is being played back by an MPEG-DASH client, the client uses a bit rate adaptation (ABR) algorithm to automatically select the segment with the highest bit rate possible that can be downloaded in time for playback without causing stalls or re-buffering events in the playback. The current MPEG-DASH reference client dash.js offers both buffer-based (BOLA) and hybrid (DYNAMIC) bit rate adaptation algorithms. Thus, an MPEG-DASH client can seamlessly adapt to changing network conditions and provide high quality playback with fewer stalls or re-buffering events. [Learn more](https://en.wikipedia.org/wiki/Dynamic_Adaptive_Streaming_over_HTTP)
See **[DASH examples](https://github.com/aminyazdanpanah/python-ffmpeg-video-streaming/tree/master/examples/dash)** for more information.
101
-
102
-
See also **[DASH options](https://ffmpeg.org/ffmpeg-formats.html#dash-2)** for more information about options.
99
+
See **[DASH examples](https://github.com/aminyazdanpanah/python-ffmpeg-video-streaming/tree/master/examples/dash)** and **[DASH options](https://ffmpeg.org/ffmpeg-formats.html#dash-2)** for more information.
103
100
104
101
### HLS
105
-
**[HTTP Live Streaming (also known as HLS)](https://developer.apple.com/streaming/)** is an HTTP-based adaptive bitrate streaming communications protocol implemented by Apple Inc. as part of its QuickTime, Safari, OS X, and iOS software. Client implementations are also available in Microsoft Edge, Firefox and some versions of Google Chrome. Support is widespread in streaming media servers.
102
+
**[HTTP Live Streaming (also known as HLS)](https://developer.apple.com/streaming/)** is an HTTP-based adaptive bitrate streaming communications protocol implemented by Apple Inc. as part of its QuickTime, Safari, OS X, and iOS software. Client implementations are also available in Microsoft Edge, Firefox and some versions of Google Chrome. Support is widespread in streaming media servers.[Learn more](https://en.wikipedia.org/wiki/HTTP_Live_Streaming)
106
103
107
-
HLS resembles MPEG-DASH in that it works by breaking the overall stream into a sequence of small HTTP-based file downloads, each download loading one short chunk of an overall potentially unbounded transport stream. A list of available streams, encoded at different bit rates, is sent to the client using an extended M3U playlist. [Learn more](https://en.wikipedia.org/wiki/HTTP_Live_Streaming)
108
-
109
-
Create HLS files based on original video(auto generate qualities).
104
+
Create HLS files:
110
105
```python
111
106
import ffmpeg_streaming
112
107
@@ -119,7 +114,7 @@ import ffmpeg_streaming
119
114
)
120
115
```
121
116
122
-
You can also create representations manually:
117
+
Generate representations manually:
123
118
```python
124
119
import ffmpeg_streaming
125
120
from ffmpeg_streaming import Representation
@@ -144,14 +139,15 @@ The encryption process requires some kind of secret (key) together with an encry
144
139
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:
145
140
146
141
```python
142
+
import ffmpeg_streaming
143
+
147
144
#A path you want to save a random key to your server
# or url = '/PATH_TO_KEY_DIRECTORY/random_key.key'
153
150
154
-
import ffmpeg_streaming
155
151
(
156
152
ffmpeg_streaming
157
153
.hls(video, hls_time=10, hls_allow_cache=1)
@@ -162,19 +158,26 @@ import ffmpeg_streaming
162
158
)
163
159
```
164
160
**NOTE:** It is very important to protect your key on your website using a token or a session/cookie(****It is highly recommended****).
165
-
See **[HLS examples](https://github.com/aminyazdanpanah/python-ffmpeg-video-streaming/tree/master/examples/hls)** for more information.
166
161
167
-
See also **[HLS options](https://ffmpeg.org/ffmpeg-formats.html#hls-2)** for more information about options.
162
+
See **[HLS examples](https://github.com/aminyazdanpanah/python-ffmpeg-video-streaming/tree/master/examples/hls)** and **[HLS options](https://ffmpeg.org/ffmpeg-formats.html#hls-2)** for more information.
168
163
169
164
### Progress
170
-
You can get realtime information about transcoding by passing callable methods to the `package`:
165
+
You can get realtime information about transcoding by passing a callable method to the `package` method:
You can pass a local path to the `package` method. If there was no directory in the path, then the package auto makes the directory.
@@ -214,10 +217,10 @@ It can also be null. The default path to save files is the input path.
214
217
.package(progress=progress)
215
218
)
216
219
```
217
-
**NOTE:** If you open a file from cloud and did not pass a path to save a file, you will have to pass a local path to the `package` 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 `package` method.
218
221
219
222
#### 2. To Clouds
220
-
You can save your files to clouds by passing a array of cloud configuration to the `package` method.
223
+
You can save your files to a cloud by passing an array of cloud configuration to the `package` method.
221
224
222
225
In **[this page](https://video.aminyazdanpanah.com/python/start/clouds?r=save)**, you will find some examples of saving files to **[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.
223
226
@@ -231,7 +234,7 @@ In **[this page](https://video.aminyazdanpanah.com/python/start/clouds?r=save)**
231
234
progress=progress)
232
235
)
233
236
```
234
-
A path can also be passed to save a copy of files on your local machine.
237
+
A path can also be passed to save a copy of files to your local machine.
235
238
```python
236
239
(
237
240
ffmpeg_streaming
@@ -243,13 +246,11 @@ A path can also be passed to save a copy of files on your local machine.
243
246
)
244
247
```
245
248
246
-
247
-
**NOTE:** You can open a file from your local machine(or a cloud) and save files to a local path or a cloud(or multiple clouds) or both.
0 commit comments