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
$cloud = new \Streaming\Clouds\Cloud('https://www.aminyazdanpanah.com/my_sweetie.mp4');
87
+
$from_cloud = ['cloud' => $cloud];
88
+
89
+
$video = $ffmpeg->openFromCloud($from_cloud);
85
90
```
86
91
87
92
A path to save the file, the method of request, and **[request options](http://docs.guzzlephp.org/en/stable/request-options.html)** can also be passed to the method.
**NOTE:** This package uses **[Guzzle](https://github.com/guzzle/guzzle)** to send and receive files. [Learn more](http://docs.guzzlephp.org/en/stable/index.html).
124
132
125
-
####3. From Amazon S3
133
+
#####From Amazon S3
126
134
Amazon S3 or Amazon Simple Storage Service is a service offered by **[Amazon Web Services (AWS)](https://aws.amazon.com/)** that provides object storage through a web service interface. [Learn more](https://en.wikipedia.org/wiki/Amazon_S3)
127
135
- For getting credentials, you need to have an AWS account or you can **[create one](https://portal.aws.amazon.com/billing/signup#/start)**.
128
136
@@ -136,14 +144,23 @@ $config = [
136
144
'secret' => 'my-secret-access-key',
137
145
]
138
146
];
139
-
$bucket = 'my-bucket-name';
140
-
$key = '/videos/my_sweetie.mp4';
141
147
142
-
$video = $ffmpeg->fromS3($config, $bucket, $key);
148
+
$aws_cloud = new \Streaming\Clouds\AWS($config);
149
+
$aws_cloud_download_options = [
150
+
'Bucket' => 'my-bucket-name',
151
+
'Key' => '/videos/my_sweetie.mp4'
152
+
];
153
+
154
+
$from_aws_cloud = [
155
+
'cloud' => $aws_cloud,
156
+
'options' => $aws_cloud_download_options
157
+
];
158
+
159
+
$video = $ffmpeg->openFromCloud($from_aws_cloud);
143
160
```
144
161
A path can also be passed to save the file on your local machine.
145
162
146
-
####4. From Google Cloud Storage
163
+
#####From Google Cloud Storage
147
164
**[Google Cloud Storage](https://console.cloud.google.com/storage)** is a RESTful online file storage web service for storing and accessing data on Google Cloud Platform infrastructure. The service combines the performance and scalability of Google's cloud with advanced security and sharing capabilities. It is an Infrastructure as a Service (IaaS), comparable to Amazon S3 online storage service. Contrary to Google Drive and according to different service specifications, Google Cloud Storage appears to be more suitable for enterprises. [Learn more](https://en.wikipedia.org/wiki/Google_Storage)
148
165
- For creating credentials, read the Cloud Storage Authentication found **[here](https://cloud.google.com/storage/docs/authentication)** or you can **[create it](https://console.cloud.google.com/apis/credentials)** directly (Select the "Service account key" option).
149
166
@@ -152,28 +169,93 @@ For downloading a file from Google Cloud Storage, you need to pass an associativ
152
169
$config = [
153
170
'keyFilePath' => '/path/to/credentials.json' // Alternativaely, you can authenticate by setting the environment variable. See https://cloud.google.com/docs/authentication/production#auth-cloud-implicit-php
A path can also be passed to save the file on your local machine.
161
188
162
189
163
-
####5. From Microsoft Azure Storage
190
+
#####From Microsoft Azure Storage
164
191
**[Azure Storage](https://azure.microsoft.com/en-us/features/storage-explorer/)** is Microsoft's cloud storage solution for modern data storage scenarios. Azure Storage offers a massively scalable object store for data objects, a file system service for the cloud, a messaging store for reliable messaging, and a NoSQL store. [Learn more](https://docs.microsoft.com/en-us/azure/storage/common/storage-introduction)
165
192
- To authenticate the service, please click **[here](https://docs.microsoft.com/en-us/azure/app-service/overview-authentication-authorization)**.
166
193
167
194
For downloading a file from Microsoft Azure Storage, you need to pass string connection, the name of your container, and the name of your file in the container to the `fromMAS` method:
**[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.
179
261
@@ -328,17 +410,13 @@ $hls->save();
328
410
```
329
411
**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 `save` method.
330
412
331
-
#### 2. To a Cloud
413
+
#### 2. To Clouds
414
+
415
+
##### To a Cloud
332
416
You can save your files to a cloud using the `saveToCloud` method.
You can save and upload entire packaged video files to **[Google Cloud Storage](https://console.cloud.google.com/storage)**. For uploading files, you need to have credentials.
You can save and upload the entire files to **[Microsoft Azure Storage](https://azure.microsoft.com/en-us/features/storage-explorer/)**. For uploading files, you need to have credentials.
**NOTE:** You can mix opening and saving options together. For instance, you can open a file on your local machine and save packaged files to a Cloud (or vice versa).
@@ -469,6 +598,8 @@ You can use these libraries to play your streams.
- DASH and HLS: **[ExoPlayer](https://github.com/google/ExoPlayer)**
601
+
-**Windows, Linux, and macOS**
602
+
- DASH and HLS: **[VLC media player](https://github.com/videolan/vlc)**
472
603
473
604
**NOTE:** You should pass a manifest of streams(e.g. `https://www.aminyazdanpanah.com/videos/dash/lesson-1/test.mpd` or `/videos/hls/lesson-2/test.m3u8` ) to these players.
0 commit comments