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
You can pass a local path of video(or a supported resource) to the `open` method:
47
51
```python
48
52
video ='/var/www/media/videos/video.mp4'
49
53
```
50
54
55
+
For opening a file from a supported FFmpeg resource such as `http`, `ftp`, `pipe`, `rtmp` and etc. please see **[FFmpeg Protocols Documentation](https://ffmpeg.org/ffmpeg-protocols.html)**
56
+
57
+
**For example:**
58
+
```python
59
+
video ='https://www.aminyazdanpanah.com/PATH/TO/VIDEO.MP4'
60
+
```
61
+
51
62
#### 2. From Clouds
52
-
You can open a file from a cloud by passing a tuple of cloud configuration to the method.
53
-
54
-
In **[this page](https://video.aminyazdanpanah.com/python/start/clouds?r=open)**, you will find 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.
63
+
You can open a file from a cloud by passing an array of cloud configuration to the `openFromCloud` method.
55
64
65
+
In **[this page](https://video.aminyazdanpanah.com/python/start/clouds?r=open)**, you will find 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.
56
66
```python
57
67
video = (google_cloud, download_options, None)
58
68
```
59
69
60
-
61
70
### DASH
62
-
**[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)
63
-
71
+
**[Dynamic Adaptive Streaming over HTTP (DASH)](http://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)
64
72
65
73
Create DASH files:
66
74
```python
@@ -101,7 +109,7 @@ See **[DASH examples](https://github.com/aminyazdanpanah/python-ffmpeg-video-str
101
109
102
110
### HLS
103
111
**[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)
104
-
112
+
105
113
Create HLS files:
106
114
```python
107
115
import ffmpeg_streaming
@@ -166,7 +174,6 @@ See **[HLS examples](https://github.com/aminyazdanpanah/python-ffmpeg-video-stre
166
174
You can get realtime information about transcoding by passing a callable method to the `package` method:
@@ -212,10 +219,10 @@ It can also be null. The default path to save files is the input path.
212
219
.package(progress=progress)
213
220
)
214
221
```
215
-
**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.
222
+
**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.
216
223
217
224
#### 2. To Clouds
218
-
You can save your files to clouds by passing an array of clouds configuration to the `package` method.
225
+
You can save your files to a cloud by passing an array of cloud configuration to the `package` method.
219
226
220
227
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.
221
228
@@ -240,8 +247,10 @@ A path can also be passed to save a copy of files to your local machine.
240
247
progress=progress)
241
248
)
242
249
```
250
+
**NOTE:** This option(Save To Clouds) is only for **[VOD](https://en.wikipedia.org/wiki/Video_on_demand)** (it does not support live streaming).
See the **[example](https://github.com/aminyazdanpanah/python-ffmpeg-video-streaming/blob/master/examples/probe.py)** for more information.
257
266
267
+
### Live
268
+
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.
269
+
270
+
If you want to save stream files to your local machine, please use the `package` method.
**NOTE:** In the HLS streaming method, you should pass the master playlist to your player. So you should upload the master manifest to your server as well as other files.
294
+
295
+
Please see **[FFmpeg Protocols Documentation](https://ffmpeg.org/ffmpeg-protocols.html)** for more information.
296
+
297
+
### Conversion
298
+
You can convert your stream to a file or to another stream protocols. You should pass a manifest of a stream to the method:
- **[VLC media player](https://github.com/videolan/vlc)**
285
368
369
+
As you may know, **[IOS](https://www.apple.com/ios)** does not have native support for DASH. Although there are some libraries such as **[Viblast](https://github.com/Viblast/ios-player-sdk)** and **[MPEGDASH-iOS-Player](https://github.com/MPEGDASHPlayer/MPEGDASH-iOS-Player)** to support this technique, I have never tested them. So if you know any IOS player that supports DASH Stream and also works fine, please add it to the above list.
370
+
286
371
**NOTE:** You should pass a manifest of stream(e.g. `https://www.aminyazdanpanah.com/PATH_TO_STREAM_DIRECTORY/dash-stream.mpd` or `/PATH_TO_STREAM_DIRECTORY/hls-stream.m3u8` ) to these players.
0 commit comments