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
[](https://packagist.org/packages/aminyazdanpanah/php-ffmpeg-video-streaming)
This library is a wrapper around **[PHP-FFMpeg](https://github.com/PHP-FFMpeg/PHP-FFMpeg)** and packages media content for online streaming such as DASH and HLS. You can also use **[DRM](https://en.wikipedia.org/wiki/Digital_rights_management)** for HLS packaging. There are several options to open a file from a cloud and save files to clouds as well.
11
-
-**[Full Documentation](https://video.aminyazdanpanah.com/)** is available describing all features and components.
12
-
-For using encryption and DRM, I **recommend** trying **[Shaka PHP](https://github.com/aminyazdanpanah/shaka-php)**, which is a great tool for this use case.
7
+
-**[Full Documentation](https://www.hadronepoch.org/op/php/ffmpeg-streaming/)** is available describing all features and components.
8
+
-**Your support is crucial to our ongoing work on open-source projects**. We kindly request that you consider exploring the **[available options](#support-us)** to assist us in this endeavor. Your encouragement and assistance will help us continue to deliver high-quality results in this important area. Thank you for your consideration and support.
13
9
14
10
**Contents**
15
11
-[Requirements](#requirements)
@@ -29,6 +25,7 @@ This library is a wrapper around **[PHP-FFMpeg](https://github.com/PHP-FFMpeg/PH
Visit **[this page](https://video.aminyazdanpanah.com/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.
98
+
Visit **[this page](https://www.hadronepoch.org/op/php/ffmpeg-streaming/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.
102
99
103
100
#### 3. Capture Webcam or Screen (Live Streaming)
104
101
You can pass the name of a supported, connected capture device(i.e. the name of a webcam, camera, screen and etc) to the `capture` method to stream a live media over network.
See **[DASH section](https://video.aminyazdanpanah.com/start?r=dash#dash)** in the documentation, for more examples.
137
+
See **[DASH section](https://www.hadronepoch.org/op/php/ffmpeg-streaming/start?r=dash#dash)** in the documentation, for more examples.
141
138
142
139
### HLS
143
140
**[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)
@@ -162,7 +159,7 @@ $video->hls()
162
159
->addRepresentations([$r_360p, $r_480p, $r_720p])
163
160
->save();
164
161
```
165
-
See **[HLS section](https://video.aminyazdanpanah.com/start?r=hls#hls)** in the documentation, for more examples such as Fragmented MP4, live from camera/screen and so on.
162
+
See **[HLS section](https://www.hadronepoch.org/op/php/ffmpeg-streaming/start?r=hls#hls)** in the documentation, for more examples such as Fragmented MP4, live from camera/screen and so on.
166
163
167
164
#### Encryption(DRM)
168
165
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)
@@ -177,7 +174,7 @@ The following code generates a key for all segment files.
177
174
$save_to = '/home/public_html/"PATH TO THE KEY DIRECTORY"/key';
178
175
179
176
//An URL (or a path) to access the key on your website
180
-
$url = 'https://www.aminyazdanpanah.com/?"PATH TO THE KEY DIRECTORY"/key';
177
+
$url = 'https://www.hadronepoch.org/?"PATH TO THE KEY DIRECTORY"/key';
181
178
// or $url = '/"PATH TO THE KEY DIRECTORY"/key';
182
179
183
180
$video->hls()
@@ -190,7 +187,7 @@ $video->hls()
190
187
##### Key Rotation
191
188
An integer as a "key rotation period" can also be passed to the `encryption` method (i.e. `encryption($save_to, $url, 10)`) to use a different key for each set of segments, rotating to a new key after this many segments. For example, if 10 segment files have been generated then it will generate a new key. If you set this value to **`1`**, each segment file will be encrypted with a new encryption key. This can improve security and allows for more flexibility.
192
189
193
-
See **[the example](https://video.aminyazdanpanah.com/start?r=enc-hls#hls-encryption)** for more information.
190
+
See **[the example](https://www.hadronepoch.org/op/php/ffmpeg-streaming/start?r=enc-hls#hls-encryption)** for more information.
194
191
195
192
**IMPORTANT:** It is very important to protect your key(s) on your website. For example, you can use a token(using a Get or Post HTTP method) to check if the user is eligible to access the key or not. You can also use a session(or cookie) on your website to restrict access to the key(s)(**It is highly recommended**).
196
193
@@ -271,7 +268,7 @@ A path can also be passed to save a copy of files to your local machine.
Visit **[this page](https://video.aminyazdanpanah.com/start/clouds?r=save)** to see 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.
271
+
Visit **[this page](https://www.hadronepoch.org/op/php/ffmpeg-streaming/start/clouds?r=save)** to see 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.
275
272
276
273
**NOTE:** This option(Save To Clouds) is only valid for **[VOD](https://en.wikipedia.org/wiki/Video_on_demand)** (it does not support live streaming).
@@ -414,7 +411,7 @@ You can use these libraries to play your streams.
414
411
415
412
## FAQs
416
413
**I created stream files and now what should I pass to a player?**
417
-
You must pass a **master playlist(manifest) URL**(e.x. `https://www.aminyazdanpanah.com/?"PATH TO STREAM DIRECTORY"/dash-stream.mpd` or `/PATH_TO_STREAM_DIRECTORY/hls-stream.m3u8` ) to a player.
414
+
You must pass a **master playlist(manifest) URL**(e.x. `https://www.hadronepoch.org/?"PATH TO STREAM DIRECTORY"/dash-stream.mpd` or `/PATH_TO_STREAM_DIRECTORY/hls-stream.m3u8` ) to a player.
418
415
See the demo page of these players for more information(**[hls.js Demo](https://hls-js.netlify.app/demo/)**, **[dash.js Demo](https://reference.dashif.org/dash.js/v3.1.2/samples/dash-if-reference-player/index.html)**, **[videojs Demo](https://videojs.com/advanced?video=elephantsdream)** and etc).
419
416
420
417
**My player does not show the quality selector button to change the video quality?**
@@ -426,15 +423,29 @@ If you save your stream content to a cloud(i.e. **[Amazon S3](https://aws.amazon
426
423
**Does [IOS](https://www.apple.com/ios) support the DASH stream?**
427
424
No, 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 maybe some of them will not work properly.
428
425
429
-
See [this page](https://video.aminyazdanpanah.com/start?r=faq#faq) for more FAQs.
426
+
See [this page](https://www.hadronepoch.org/op/php/ffmpeg-streaming/start?r=faq#faq) for more FAQs.
427
+
428
+
## Support Us
429
+
We greatly appreciate your support in our efforts to contribute to open-source projects. If you're able to, we kindly ask that you take a moment to check out the available options for assisting us. Your help would enable us to maintain our commitment to producing exceptional results. Thank you for your support.
430
+
431
+
### 1. purchasing a service or product
432
+
Our company offers a range of products and services, including video streaming, video-on-demand, video conferencing, and an HR assistance application. If you wish to purchase any of these offerings, kindly direct your inquiries to our email address at **contact@hadronepoch.org**. We will be updating **[our website](https://www.hadronepoch.org)** with further details in the near future.
433
+
434
+
### 2. sponsoring the project or org
435
+
Thank you for considering the option of sponsoring our organization. Your generous donations will greatly assist us in our efforts to enhance and expand our existing libraries, as well as build new ones. There are several options available for sponsorship, including clicking on the **[provided link](https://github.com/sponsors/hadronepoch)** or utilizing alternative methods such as **[crypto](https://hadronepoch.org/support)**, **[Patreon](https://patreon.com/HadronEpoch)**, **[Open Collective](https://opencollective.com/hadronepoch)**, and **[ko-fi](https://ko-fi.com/hadronepoch)**. Your support is greatly appreciated and will help us to continue our mission of providing valuable resources to the community.
436
+
437
+
### 3. Star and Share
438
+
If you find this project to be of value, kindly consider **[starring it](stargazers)** and **sharing it** with those in your network who may benefit from this type of software. Your support would be greatly appreciated and would help to increase visibility and accessibility of this project.
439
+
440
+
Thank you for your consideration.
430
441
431
442
## Contributing and Reporting Bugs
432
443
I'd love your help in improving, correcting, adding to the specification. Please **[file an issue](https://github.com/aminyazdanpanah/PHP-FFmpeg-video-streaming/issues)** or **[submit a pull request](https://github.com/aminyazdanpanah/PHP-FFmpeg-video-streaming/pulls)**.
433
444
- See **[Contributing File](https://github.com/aminyazdanpanah/PHP-FFmpeg-video-streaming/blob/master/CONTRIBUTING.md)** for more information.
434
445
- If you discover a security vulnerability within this package, please see **[SECURITY File](https://github.com/aminyazdanpanah/PHP-FFmpeg-video-streaming/blob/master/SECURITY.md)** for more information.
0 commit comments