Skip to content

Commit f5eb406

Browse files
committed
Merge remote-tracking branch 'origin/master'
# Conflicts: # README.md
2 parents 98e80be + cd04006 commit f5eb406

File tree

1 file changed

+40
-12
lines changed

1 file changed

+40
-12
lines changed

README.md

Lines changed: 40 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,13 @@
88

99
This package provides an integration with FFmpeg for Laravel 5.1 and higher. The storage of the files is handled by [Laravel's Filesystem](http://laravel.com/docs/5.1/filesystem).
1010

11+
## Features
12+
* Super easy wrapper around [PHP-FFMpeg](https://github.com/PHP-FFMpeg/PHP-FFMpeg)
13+
* Still able to use advanced features like filters
14+
* Integration with [Laravel's Filesystem](http://laravel.com/docs/5.1/filesystem), [configuration system](https://laravel.com/docs/5.1#configuration) and [logging handling](https://laravel.com/docs/5.1/errors)
15+
* Compatible with Laravel 5.1 and up
16+
* PHP 7.0 only
17+
1118
## Installation
1219

1320
You can install the package via composer:
@@ -43,7 +50,7 @@ php artisan vendor:publish --provider="Pbmedia\LaravelFFMpeg\FFMpegServiceProvid
4350

4451
## Usage
4552

46-
Convert an audio track:
53+
Convert an audio or video file:
4754

4855
``` php
4956
FFMpeg::fromDisk('songs')
@@ -54,17 +61,6 @@ FFMpeg::fromDisk('songs')
5461
->save('yesterday.aac');
5562
```
5663

57-
Create a frame from a video:
58-
59-
``` php
60-
FFMpeg::fromDisk('videos')
61-
->open('steve_howe.mp4')
62-
->getFrameFromSeconds(10)
63-
->export()
64-
->toDisk('thumnails')
65-
->save('FrameAt10sec.png');
66-
```
67-
6864
You can add filters through a ```Closure``` or by using PHP-FFMpeg's Filter objects:
6965

7066
``` php
@@ -112,8 +108,40 @@ FFMpeg::open('my_movie.mov')
112108
->toDisk('s3')
113109
->inFormat(new \FFMpeg\Format\Video\X264)
114110
->save('my_movie.mkv');
111+
112+
// you could even discard the 'toDisk()' method,
113+
// now the converted file will be saved to
114+
// the same disk as the source!
115+
->export()
116+
->inFormat(new FFMpeg\Format\Video\WebM)
117+
->save('my_movie.webm')
118+
```
119+
120+
Create a frame from a video:
121+
122+
``` php
123+
FFMpeg::fromDisk('videos')
124+
->open('steve_howe.mp4')
125+
->getFrameFromSeconds(10)
126+
->export()
127+
->toDisk('thumnails')
128+
->save('FrameAt10sec.png');
129+
130+
// Instead of the 'getFrameFromSeconds()' method, you could
131+
// also use the 'getFrameFromString()' or the
132+
// 'getFrameFromTimecode()' methods:
133+
134+
$media = FFMpeg::open('steve_howe.mp4');
135+
$frame = $media->getFrameFromString('00:00:13.37');
136+
137+
// or
138+
139+
$timecode = new FMpeg\Coordinate\TimeCode(...);
140+
$frame = $media->getFrameFromTimecode($timecode);
141+
115142
```
116143

144+
>>>>>>> origin/master
117145
## Changelog
118146

119147
Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

0 commit comments

Comments
 (0)