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
require 'vendor/autoload.php'; // if you use frameworks that require autoload, you do not need to require it
25
25
26
-
$path = ''/var/www/media/videos/test.mp4'';// the path to the video
26
+
$path = '/var/www/media/videos/test.mp4';// the path to the video
27
27
28
28
dash($path);// auto create dash MPD file based on original video
29
29
hls($path);// auto create HLS M3U8 file based on original video
@@ -39,8 +39,11 @@ This is how it works:
39
39
40
40
41
41
### DASH
42
-
You can create an MPD playlist to do [DASH](https://en.wikipedia.org/wiki/Dynamic_Adaptive_Streaming_over_HTTP).
42
+
**[Dynamic Adaptive Streaming over HTTP (DASH)](https://en.wikipedia.org/wiki/Dynamic_Adaptive_Streaming_over_HTTP)**, 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.
43
43
44
+
To create an MPD file use `DASH` method and export video into Dash.
45
+
46
+
44
47
As of version 1.1.0, the ```autoGenerateRepresentations``` method has been added. This method allows you to create a multi-representations MPD file automatically based on the video size and bit rate:
45
48
46
49
```php
@@ -53,7 +56,7 @@ AYazdanpanah\FFMpegStreaming\FFMpeg::create()// it can pass the configuration an
53
56
->save(); // it can pass a path to the method or it can be null
54
57
```
55
58
56
-
or you can add representation manually by using ```addRepresentation``` method:
59
+
Also you can add representation manually by using ```addRepresentation``` method:
57
60
58
61
```php
59
62
$rep_1 = (new Representation())->setKiloBitrate(800);
@@ -73,7 +76,9 @@ AYazdanpanah\FFMpegStreaming\FFMpeg::create()// it can pass the configuration an
73
76
For more information about [FFMpeg](https://ffmpeg.org/) and its dash options please [click here](https://ffmpeg.org/ffmpeg-formats.html#dash-2).
74
77
### HLS
75
78
76
-
Create an M3U8 playlist to do [HLS](https://en.wikipedia.org/wiki/HTTP_Live_Streaming).
79
+
**[HTTP Live Streaming (also known as HLS)](https://en.wikipedia.org/wiki/HTTP_Live_Streaming)** is an HTTP-based media streaming communications protocol implemented by [Apple Inc](https://www.apple.com/).
80
+
81
+
To create an M3U8 playlist to do HLS, just use `HLS` method.
77
82
78
83
As of version 1.1.0, the ```autoGenerateRepresentations``` method has been added. This method allows you to create a multi-formats M3U8 file automatically based on original video size and bit rate:
0 commit comments