├── .gitignore
├── .travis.yml
├── LICENSE
├── README.md
├── composer.json
├── config
└── ffmpeg.php
├── phpunit.xml
├── sonus.sublime-project
├── sonus.sublime-workspace
├── src
├── Classes
│ └── FFMPEG.php
├── Facade
│ └── FfmpegFacade.php
├── Helpers.php
└── Provider
│ └── FfmpegServiceProvider.php
└── tests
├── .gitkeep
├── HelpersTest.php
└── SonusTest.php
/.gitignore:
--------------------------------------------------------------------------------
1 | /vendor
2 | composer.phar
3 | composer.lock
4 | .DS_Store
5 | sonus.sublime-workspace
6 | *.sublime-workspace
--------------------------------------------------------------------------------
/.travis.yml:
--------------------------------------------------------------------------------
1 | language: php
2 |
3 | php:
4 | - 5.4
5 | - 5.5
6 | - 5.6
7 | - hhvm
8 |
9 | matrix:
10 | allow_failures:
11 | - php: 5.6
12 | - php: hhvm
13 |
14 | before_script:
15 | - curl -s http://getcomposer.org/installer | php
16 | - php composer.phar install --dev
17 |
18 | script: phpunit
19 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2014 Rafael Sampaio
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # FFMPEG (Laravel 5 Package)
2 | [](https://packagist.org/packages/linkthrow/ffmpeg)
3 |
4 |
5 | **** NOTE ****
6 | This is a duplicate of https://github.com/closca/FFMPEG. I have duplicated because the original package was not working with the latest Laravel psr-4 loaders and hasn't been updated for a while!
7 |
8 | FFMPEG is a tool designed to leverage the power of **Laravel 5** and **(C library FFMPEG)** to perform tasks such as:
9 |
10 | * Audio/Video conversion
11 | * Video thumbnail generation
12 | * Metadata manipulation
13 |
14 | ## Quick Start
15 |
16 | ### Setup
17 |
18 | Update your `composer.json` file and add the following under the `require` key
19 |
20 | "linkthrow/ffmpeg": "dev-master"
21 |
22 | Run the composer update command:
23 |
24 | $ composer update
25 |
26 | In your `config/app.php` add `'LinkThrow\Ffmpeg\Provider\FfmpegServiceProvider'` to the end of the `$providers` array
27 |
28 | 'providers' => array(
29 |
30 | 'Illuminate\Foundation\Providers\ArtisanServiceProvider',
31 | 'Illuminate\Auth\AuthServiceProvider',
32 | ...
33 | 'LinkThrow\Ffmpeg\Provider\FfmpegServiceProvider',
34 |
35 | ),
36 |
37 | Still under `config/app.php` add `'FFMPEG' => 'LinkThrow\Ffmpeg\Facade\FfmpegFacade'` to the `$aliases` array
38 |
39 | 'aliases' => array(
40 |
41 | 'App' => 'Illuminate\Support\Facades\App',
42 | 'Artisan' => 'Illuminate\Support\Facades\Artisan',
43 | ...
44 | 'FFMPEG' => 'LinkThrow\Ffmpeg\Facade\FfmpegFacade',
45 |
46 | ),
47 |
48 | Run the `artisan` command below to publish the configuration file
49 |
50 | $ php artisan vendor:publish
51 |
52 | Navigate to `app/config/ffmpeg.php` and update all four parameters
53 |
54 | ### Examples
55 |
56 | Here is a simple example of a file being converted from FLAC to AAC:
57 |
58 | FFMPEG::convert()->input('foo.flac')->bitrate(128)->output('bar.aac')->go();
59 |
60 | FFMPEG can also convert video files:
61 |
62 | FFMPEG::convert()->input('foo.avi')->bitrate(300, 'video')->output('bar.flv')->go();
63 |
64 | FFMPEG can also return media information as an array or json
65 |
66 | FFMPEG::getMediaInfo('foo.mov');
67 |
68 | FFMPEG can also easily generate smart movie thumbnails like this
69 |
70 | FFMPEG::getThumbnails('foo.mp4', 'foo-thumb', 5); // Yields 5 thumbnails
71 |
72 | FFMPEG can also thumbnify your movie (create thumbs for a short preview)
73 |
74 | FFMPEG::thumbnify('foo.mp4', 'foo-thumb', 40, '400'); // Yields 40 thumbnails (every 10 seconds) and video has 400 secs
75 |
76 | Although FFMPEG contains several preset parameters, you can also pass your own
77 |
78 | FFMPEG::convert()->input('foo.flac')->output('bar.mp3')->go('-b:a 64k -ac 1');
79 |
80 | ### Tracking progress
81 |
82 | Make sure the `progress` and `tmp_dir` options are set correctly in the config.php file
83 |
84 | 'progress' => true,
85 | ...
86 | 'tmp_dir' => '/Applications/ffmpeg/tmp/'
87 |
88 | Pass the progress method when initiating a conversion
89 |
90 | FFMPEG::convert()->input('foo.avi')->output('bar.mp3')->progress('uniqueid')->go();
91 |
92 | Now you can write a controller action to return the progress for the job id you passed and call it using any flavor of JavaScript you like
93 |
94 | public function getJobProgress($id)
95 | {
96 | return FFMPEG::getProgress('uniqueid');
97 | }
98 |
99 |
100 | ### Security and Compatibility
101 |
102 | FFMPEG uses PHP's [shell_exec](http://us3.php.net/shell_exec) function to perform ffmpeg and ffprobe commands. This command is disabled if you are running PHP 5.3 or below and [safe mode](http://us3.php.net/manual/en/features.safe-mode.php) is enabled.
103 |
104 | Please make sure that ffmpeg and ffprobe are at least the following versions:
105 |
106 | * ffmpeg: 2.1.*
107 | * ffprobe: 2.0.*
108 |
109 | Also, remember that filepaths must be relative to the location of FFMPEG on your system. To ensure compatibility, it is good practice to pass the full path of the input and output files. Here's an example working in Laravel:
110 |
111 | $file_in = Input::file('audio')->getRealPath();
112 | $file_out = '\path\to\my\file.mp3';
113 | FFMPEG::convert()->input($file_in)->output($file_out)->go();
114 |
115 | Lastly, FFMPEG will only convert to formats which ffmpeg supports. To check if your version of ffmpeg is configured to encode or decode a specific format you can run the following commands using `php artisan tinker`
116 |
117 | var_dump(FFMPEG::canEncode('mp3'));
118 | var_dump(FFMPEG::canDecode('mp3'));
119 |
120 | To get a list of all supported formats you can run
121 |
122 | var_dump(FFMPEG::getSupportedFormats());
123 |
124 | ## Troubleshooting
125 |
126 | Please make sure the following statements are true before opening an issue:
127 |
128 | 1) I am able to access FFMPEG on terminal using the same path I defined in the FFMPEG configuration file
129 |
130 | 2) I have checked the error logs for the webserver and found no FFMPEG output messages
131 |
132 | Usually all concerns are taken care of by following these two steps. If you still find yourself having issues you can always open a trouble ticket.
133 |
134 |
135 | ## License
136 |
137 | FFMPEG is free software distributed under the terms of the MIT license.
138 |
139 | ## Aditional information
140 |
141 | Any questions, feel free to contact me.
142 |
143 | Any issues, please [report here](https://github.com/closca/FFMPEG/issues)
144 |
--------------------------------------------------------------------------------
/composer.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "linkthrow/ffmpeg",
3 | "description": "A laravel audio and video conversion, thumbnail generator and metadata editor package powered by ffmpeg",
4 | "keywords": ["laravel", "ffmpeg", "ffprobe", "converter"],
5 | "license": "MIT",
6 | "authors": [
7 | {
8 | "name": "Hussan Choudhry",
9 | "email": "hussan@uselinkthrow.com"
10 | },
11 | {
12 | "name": "Rafael Sampaio",
13 | "email": "rafaelsampaio@live.com"
14 | },
15 | {
16 | "name": "Closca Costel",
17 | "email": "closca.costel@gmail.com"
18 | }
19 | ],
20 | "require": {
21 | "php": ">=5.4.0"
22 | },
23 | "require-dev": {
24 | "phpunit/phpunit": "4.1.*"
25 | },
26 | "autoload": {
27 | "psr-4": {
28 | "LinkThrow\\Ffmpeg\\": "src"
29 | },
30 | "files": [
31 | "src/Classes/FFMPEG.php",
32 | "src/Helpers.php"
33 | ]
34 | },
35 | "minimum-stability": "dev"
36 | }
37 |
--------------------------------------------------------------------------------
/config/ffmpeg.php:
--------------------------------------------------------------------------------
1 | '',
22 |
23 | /*
24 | |--------------------------------------------------------------------------
25 | | ffprobe System Path
26 | |--------------------------------------------------------------------------
27 | |
28 | | We need to know the fully qualified system path to where ffprobe
29 | | lives on this server. If you paste this path into your shell or
30 | | command prompt you should get output from ffprobe.
31 | |
32 | */
33 |
34 | 'ffprobe' => '',
35 |
36 | /*
37 | |--------------------------------------------------------------------------
38 | | Progress monitoring
39 | |--------------------------------------------------------------------------
40 | |
41 | | FFMPEG supports outputing progress to HTTP. Problem is, PHP can't really
42 | | handle chunked POST requests. Therefore the solution is to output progress
43 | | to a text file and track the job by reading it live.
44 | |
45 | | If you would like to let your users know of the progress on active running
46 | | conversions set this flag to true.
47 | |
48 | */
49 |
50 | 'progress' => false,
51 |
52 | /*
53 | |--------------------------------------------------------------------------
54 | | Temporary Directory
55 | |--------------------------------------------------------------------------
56 | |
57 | | In order to monitor the progress of running tasks Sonus will need to write
58 | | temporary files during the encoding progress. Please set a directory where
59 | | these can be written to, but make sure PHP is able to read and write to it.
60 | |
61 | | Make sure that your path has a trailing slash!
62 | |
63 | | Examples:
64 | | Windows: 'C:/ffmpeg/tmp/'
65 | | Mac OSX: '/Applications/MAMP/ffmpeg/tmp/'
66 | | Linux: '/var/www/tmp/'
67 | |
68 | */
69 |
70 | 'tmp_dir' => ''
71 | );
72 |
--------------------------------------------------------------------------------
/phpunit.xml:
--------------------------------------------------------------------------------
1 |
2 |
13 |
14 |
15 | ./tests/
16 |
17 |
18 |
--------------------------------------------------------------------------------
/sonus.sublime-project:
--------------------------------------------------------------------------------
1 | {
2 | "folders":
3 | [
4 | {
5 | "follow_symlinks": true,
6 | "path": "."
7 | }
8 | ]
9 | }
10 |
--------------------------------------------------------------------------------
/sonus.sublime-workspace:
--------------------------------------------------------------------------------
1 | {
2 | "auto_complete":
3 | {
4 | "selected_items":
5 | [
6 | [
7 | "tou",
8 | "touser"
9 | ],
10 | [
11 | "mode",
12 | "models"
13 | ],
14 | [
15 | "filter",
16 | "filterleft"
17 | ],
18 | [
19 | "fit",
20 | "filterleft"
21 | ],
22 | [
23 | "act",
24 | "active"
25 | ],
26 | [
27 | "type",
28 | "typeFilter"
29 | ],
30 | [
31 | "parseMe",
32 | "parseMediaUrls"
33 | ],
34 | [
35 | "char",
36 | "chargebacks"
37 | ],
38 | [
39 | "charge",
40 | "chargebacks"
41 | ],
42 | [
43 | "array_p",
44 | "array_push"
45 | ],
46 | [
47 | "the",
48 | "therow"
49 | ],
50 | [
51 | "teh",
52 | "therow"
53 | ],
54 | [
55 | "model_",
56 | "model_id"
57 | ],
58 | [
59 | "Stud",
60 | "StudioCompany"
61 | ],
62 | [
63 | "studio",
64 | "studio_company"
65 | ],
66 | [
67 | "comp",
68 | "companyState"
69 | ],
70 | [
71 | "cell",
72 | "cellspacing Attr"
73 | ],
74 | [
75 | "message",
76 | "message"
77 | ],
78 | [
79 | "mess",
80 | "message"
81 | ],
82 | [
83 | "for",
84 | "fordate"
85 | ],
86 | [
87 | "mes",
88 | "message"
89 | ],
90 | [
91 | "messa",
92 | "messages"
93 | ],
94 | [
95 | "last",
96 | "lastDate"
97 | ],
98 | [
99 | "c",
100 | "colspan Attr"
101 | ],
102 | [
103 | "sec",
104 | "securitySettings"
105 | ],
106 | [
107 | "value_bo",
108 | "value_bonus"
109 | ],
110 | [
111 | "curre",
112 | "currentValueBonus"
113 | ],
114 | [
115 | "curren",
116 | "currentValueMember"
117 | ],
118 | [
119 | "curr",
120 | "currentValueModel"
121 | ],
122 | [
123 | "bonus",
124 | "bonus_member_transaction"
125 | ],
126 | [
127 | "depositTransaction",
128 | "depositTransactionDetails"
129 | ],
130 | [
131 | "dif",
132 | "dif_bonus_member_transaction"
133 | ],
134 | [
135 | "value",
136 | "value_member_transaction"
137 | ],
138 | [
139 | "discoun",
140 | "discounted_credits"
141 | ],
142 | [
143 | "from",
144 | "from_album_id"
145 | ],
146 | [
147 | "de",
148 | "depositTransactionDetails"
149 | ],
150 | [
151 | "comiso",
152 | "comision_transactions"
153 | ],
154 | [
155 | "aut",
156 | "austDay"
157 | ],
158 | [
159 | "depos",
160 | "depositTransactionDetails"
161 | ],
162 | [
163 | "depositTran",
164 | "depositTransaction"
165 | ],
166 | [
167 | "member",
168 | "member_transactions"
169 | ],
170 | [
171 | "depositT",
172 | "depositsTransactions"
173 | ],
174 | [
175 | "deposit",
176 | "depositTransaction"
177 | ],
178 | [
179 | "dep",
180 | "DepositsTransactions"
181 | ],
182 | [
183 | "deo",
184 | "depositTransaction"
185 | ],
186 | [
187 | "image",
188 | "imagePosition"
189 | ],
190 | [
191 | "ima",
192 | "imagePosition"
193 | ],
194 | [
195 | "time",
196 | "timestamps"
197 | ],
198 | [
199 | "profile",
200 | "profile_url"
201 | ],
202 | [
203 | "Messa",
204 | "MessageBlock"
205 | ],
206 | [
207 | "find",
208 | "findByUID"
209 | ],
210 | [
211 | "porn",
212 | "pornstar_li"
213 | ],
214 | [
215 | "q",
216 | "queries"
217 | ],
218 | [
219 | "com",
220 | "companycertficateState"
221 | ],
222 | [
223 | "modelVote",
224 | "modelvotes"
225 | ],
226 | [
227 | "contes",
228 | "contest_id"
229 | ],
230 | [
231 | "alb",
232 | "album_profile_photos"
233 | ],
234 | [
235 | "tip",
236 | "tipvalue"
237 | ],
238 | [
239 | "model",
240 | "modeluid"
241 | ],
242 | [
243 | "Album",
244 | "AlbumProfilePhoto"
245 | ],
246 | [
247 | "Alb",
248 | "AlbumPhoto"
249 | ],
250 | [
251 | "ALb",
252 | "AlbumProfilePhoto"
253 | ],
254 | [
255 | "stat",
256 | "status_code"
257 | ],
258 | [
259 | "with",
260 | "withTrashed"
261 | ],
262 | [
263 | "delete",
264 | "deleted_to"
265 | ],
266 | [
267 | "las",
268 | "last_query"
269 | ],
270 | [
271 | "contest",
272 | "contest"
273 | ],
274 | [
275 | "Ajax",
276 | "ajaxScrool"
277 | ],
278 | [
279 | "conte",
280 | "contests"
281 | ],
282 | [
283 | "contets",
284 | "contests"
285 | ],
286 | [
287 | "ran",
288 | "ranksObj"
289 | ],
290 | [
291 | "ranks",
292 | "ranksObj"
293 | ],
294 | [
295 | "ma",
296 | "maxSkip"
297 | ],
298 | [
299 | "rank",
300 | "ranking"
301 | ],
302 | [
303 | "ra",
304 | "ranks"
305 | ],
306 | [
307 | "aja",
308 | "ajaxGetHomeModels"
309 | ],
310 | [
311 | "user",
312 | "user_id"
313 | ],
314 | [
315 | "start",
316 | "start_from"
317 | ],
318 | [
319 | "star",
320 | "start_from"
321 | ],
322 | [
323 | "ep",
324 | "epoch_digest"
325 | ],
326 | [
327 | "sir",
328 | "sorted_string"
329 | ],
330 | [
331 | "str_re",
332 | "str_replace"
333 | ],
334 | [
335 | "re",
336 | "remote_address_class"
337 | ],
338 | [
339 | "atte",
340 | "depositAttempt"
341 | ],
342 | [
343 | "Depo",
344 | "DepositsAttempts"
345 | ],
346 | [
347 | "packa",
348 | "package_code"
349 | ],
350 | [
351 | "leve",
352 | "level_id"
353 | ],
354 | [
355 | "User",
356 | "UserSecuritySettings"
357 | ],
358 | [
359 | "request",
360 | "request_change_account_email_original_token"
361 | ],
362 | [
363 | "reques",
364 | "request_change_account_email_new_token"
365 | ],
366 | [
367 | "rec",
368 | "recovery_email_token"
369 | ],
370 | [
371 | "recovery",
372 | "recovery_email"
373 | ],
374 | [
375 | "secyr",
376 | "security_settings"
377 | ],
378 | [
379 | "recover",
380 | "recovery_email"
381 | ],
382 | [
383 | "suc",
384 | "Successful"
385 | ],
386 | [
387 | "Us",
388 | "UserSavedDevices"
389 | ],
390 | [
391 | "device",
392 | "device_key"
393 | ],
394 | [
395 | "Model",
396 | "ModelController"
397 | ],
398 | [
399 | "pornstar_",
400 | "pornstar_url_ref"
401 | ],
402 | [
403 | "validation",
404 | "validationObject"
405 | ],
406 | [
407 | "back",
408 | "backdrop"
409 | ],
410 | [
411 | "profil",
412 | "profile_complete"
413 | ],
414 | [
415 | "cm",
416 | "complet_profile"
417 | ],
418 | [
419 | "album",
420 | "album_path"
421 | ],
422 | [
423 | "profilepho",
424 | "profilephoto"
425 | ],
426 | [
427 | "new",
428 | "new_password"
429 | ],
430 | [
431 | "cons",
432 | "contest"
433 | ],
434 | [
435 | "strto",
436 | "strtotime"
437 | ],
438 | [
439 | "create",
440 | "created_at"
441 | ],
442 | [
443 | "or",
444 | "orWhere"
445 | ],
446 | [
447 | "sele",
448 | "selectPeriod"
449 | ],
450 | [
451 | "year",
452 | "year_start"
453 | ],
454 | [
455 | "curret",
456 | "current_year"
457 | ],
458 | [
459 | "current",
460 | "current_year"
461 | ],
462 | [
463 | "true",
464 | "true_private_minute"
465 | ],
466 | [
467 | "priva",
468 | "private_minute"
469 | ],
470 | [
471 | "gener",
472 | "general_settings"
473 | ],
474 | [
475 | "step",
476 | "step_year"
477 | ],
478 | [
479 | "period",
480 | "period_feed"
481 | ],
482 | [
483 | "month",
484 | "month_name"
485 | ],
486 | [
487 | "ste",
488 | "step_month"
489 | ],
490 | [
491 | "get",
492 | "getFinance"
493 | ],
494 | [
495 | "profile_",
496 | "profile_photos"
497 | ],
498 | [
499 | "redirect",
500 | "Redirect"
501 | ],
502 | [
503 | "exi",
504 | "exists"
505 | ],
506 | [
507 | "full",
508 | "full_path"
509 | ],
510 | [
511 | "ip_addre",
512 | "ip_address_used"
513 | ],
514 | [
515 | "phto",
516 | "photoIDState"
517 | ]
518 | ]
519 | },
520 | "buffers":
521 | [
522 | {
523 | "file": "src/Closca/Sonus/Helpers.php",
524 | "settings":
525 | {
526 | "buffer_size": 1257,
527 | "line_ending": "Windows"
528 | }
529 | },
530 | {
531 | "file": "tests/SonusTest.php",
532 | "settings":
533 | {
534 | "buffer_size": 2983,
535 | "line_ending": "Windows"
536 | }
537 | },
538 | {
539 | "file": "tests/HelpersTest.php",
540 | "settings":
541 | {
542 | "buffer_size": 922,
543 | "line_ending": "Windows"
544 | }
545 | },
546 | {
547 | "file": "src/Closca/Sonus/Facade.php",
548 | "settings":
549 | {
550 | "buffer_size": 313,
551 | "line_ending": "Windows"
552 | }
553 | },
554 | {
555 | "file": "src/Closca/Sonus/SonusServiceProvider.php",
556 | "settings":
557 | {
558 | "buffer_size": 720,
559 | "line_ending": "Windows"
560 | }
561 | },
562 | {
563 | "file": "README.md",
564 | "settings":
565 | {
566 | "buffer_size": 5305,
567 | "line_ending": "Windows"
568 | }
569 | },
570 | {
571 | "file": "src/Closca/Sonus/Sonus.php",
572 | "settings":
573 | {
574 | "buffer_size": 19432,
575 | "line_ending": "Windows"
576 | }
577 | }
578 | ],
579 | "build_system": "",
580 | "command_palette":
581 | {
582 | "height": 392.0,
583 | "selected_items":
584 | [
585 | ],
586 | "width": 392.0
587 | },
588 | "console":
589 | {
590 | "height": 126.0,
591 | "history":
592 | [
593 | ]
594 | },
595 | "distraction_free":
596 | {
597 | "menu_visible": true,
598 | "show_minimap": false,
599 | "show_open_files": false,
600 | "show_tabs": false,
601 | "side_bar_visible": false,
602 | "status_bar_visible": false
603 | },
604 | "expanded_folders":
605 | [
606 | "/C/xampp/htdocs/sonus",
607 | "/C/xampp/htdocs/sonus/public",
608 | "/C/xampp/htdocs/sonus/src",
609 | "/C/xampp/htdocs/sonus/src/Closca",
610 | "/C/xampp/htdocs/sonus/src/Closca/Sonus",
611 | "/C/xampp/htdocs/sonus/src/config",
612 | "/C/xampp/htdocs/sonus/src/controllers",
613 | "/C/xampp/htdocs/sonus/src/lang",
614 | "/C/xampp/htdocs/sonus/src/migrations",
615 | "/C/xampp/htdocs/sonus/src/views"
616 | ],
617 | "file_history":
618 | [
619 | "/C/xampp/htdocs/sonus/src/config/config.php",
620 | "/C/xampp/htdocs/sonus/sonus.sublime-project",
621 | "/C/xampp/htdocs/sonus/src/Closca/Sonus/Sonus.php",
622 | "/C/xampp/htdocs/sonus/src/Closca/Sonus/Facade.php",
623 | "/C/xampp/htdocs/foc/vendor/rafasamp/sonus/src/Rafasamp/Sonus/Helpers.php",
624 | "/C/xampp/htdocs/foc/public/templates/frontend/default/model/partials_ajax/new_video.blade.php",
625 | "/C/xampp/htdocs/foc/app/models/Video.php",
626 | "/C/xampp/htdocs/foc/app/storage/videos/models/1/video_9.wmv",
627 | "/C/xampp/htdocs/foc/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/ordered-read-streams/.travis.yml",
628 | "/C/xampp/htdocs/foc/app/controllers/model/ModelVideoGalleryController.php",
629 | "/C/xampp/htdocs/foc/vendor/symfony/finder/Symfony/Component/Finder/Expression/ValueInterface.php",
630 | "/C/xampp/htdocs/foc/.idea/vcs.xml",
631 | "/C/xampp/htdocs/foc/vendor/rafasamp/sonus/tests/SonusTest.php",
632 | "/C/xampp/htdocs/foc/vendor/mustache/mustache/test/fixtures/examples/section_objects/section_objects.mustache",
633 | "/C/xampp/htdocs/foc/app/models/Studio.php",
634 | "/C/xampp/htdocs/foc/vendor/nikic/php-parser/test/code/parser/stmt/namespace/outsideStmt.test",
635 | "/C/xampp/htdocs/foc/app/controllers/OusideWwwRootImage.php",
636 | "/C/xampp/htdocs/foc/node_modules/gulp-uglify/node_modules/uglify-js/lib/output.js",
637 | "/C/xampp/htdocs/foc/app/config/app.php",
638 | "/C/xampp/htdocs/foc/app/models/AlbumProfilePhoto.php",
639 | "/C/xampp/htdocs/foc/backups/auction-page.html",
640 | "/C/xampp/htdocs/foc/app/controllers/AwardsController.php",
641 | "/C/xampp/htdocs/foc/vendor/monolog/monolog/src/Monolog/Processor/UidProcessor.php",
642 | "/C/xampp/htdocs/foc/app/models/User.php",
643 | "/C/xampp/htdocs/foc/app/models/VideoGalleryPermissions.php",
644 | "/C/xampp/htdocs/foc/app/models/VideoGallery.php",
645 | "/C/xampp/htdocs/foc/app/filters.php",
646 | "/C/xampp/htdocs/foc/app/helpers/FocHelper.php",
647 | "/C/xampp/htdocs/foc/public/templates/frontend/default/model/profile.blade.php",
648 | "/C/xampp/htdocs/foc/public/templates/frontend/default/js/libs/uploads.js",
649 | "/C/xampp/htdocs/foc/vendor/way/generators/src/Way/Generators/Generators/templates/migration/migration-up.txt",
650 | "/C/xampp/htdocs/foc/node_modules/gulp-uglify/package.json",
651 | "/C/xampp/htdocs/foc/node_modules/gulp-uglify/node_modules/uglify-js/node_modules/optimist/example/xup.js",
652 | "/C/xampp/htdocs/foc/app/routes.php",
653 | "/C/xampp/htdocs/foc/public/templates/frontend/default/studio/partials_ajax/models_model_management.blade.php",
654 | "/C/xampp/htdocs/foc/public/templates/frontend/default/studio/models-management.blade.php",
655 | "/C/xampp/htdocs/foc/app/models/Model.php",
656 | "/C/xampp/htdocs/foc/app/controllers/model/ModelAccountSettingsController.php",
657 | "/C/xampp/htdocs/foc/public/templates/frontend/default/member/contest/awards.blade.php",
658 | "/C/xampp/htdocs/foc/public/templates/frontend/default/model/publics/partials/profile_sidebar.blade.php",
659 | "/C/xampp/htdocs/foc/public/templates/frontend/default/js/libs/studio.js",
660 | "/C/xampp/htdocs/foc/app/controllers/studio/StudioController.php",
661 | "/C/xampp/htdocs/foc/public/templates/frontend/default/model/edit_account_settings.blade.php",
662 | "/C/xampp/htdocs/foc/public/templates/frontend/default/model/partials_settings/finance.blade.php",
663 | "/C/xampp/htdocs/foc/public/templates/frontend/default/model/edit_account_settings_studio.blade.php",
664 | "/C/xampp/htdocs/foc/app/database/migrations/2014_12_24_022201_modify2_video_gallery_table.php",
665 | "/C/xampp/htdocs/foc/public/templates/frontend/default/model/partials/profile_sidebar.blade.php",
666 | "/C/xampp/htdocs/foc/public/templates/frontend/default/model/messages/messageContent.blade.php",
667 | "/C/xampp/htdocs/foc/public/templates/frontend/default/member/messages/messageContent.blade.php",
668 | "/C/xampp/htdocs/foc/public/templates/frontend/default/member/messages/messages.blade.php",
669 | "/C/xampp/htdocs/foc/public/templates/frontend/default/member/partials/tickets_sidebar.blade.php",
670 | "/C/xampp/htdocs/foc/public/templates/frontend/default/member/partials/profile_sidebar.blade.php",
671 | "/C/xampp/htdocs/foc/public/templates/frontend/default/tickets/partials/sidebar.blade.php",
672 | "/C/xampp/htdocs/foc/vendor/swiftmailer/swiftmailer/lib/swift_init.php",
673 | "/C/xampp/htdocs/foc/vendor/doctrine/annotations/tests/Doctrine/Tests/Common/Annotations/Fixtures/AnnotationWithRequiredAttributesWithoutContructor.php",
674 | "/C/xampp/htdocs/foc/vendor/doctrine/dbal/lib/Doctrine/DBAL/Event/SchemaIndexDefinitionEventArgs.php",
675 | "/C/xampp/htdocs/foc/app/models/Message.php",
676 | "/C/xampp/htdocs/foc/public/templates/frontend/default/member/edit_account_settings.blade.php",
677 | "/C/xampp/htdocs/foc/public/templates/frontend/default/member/settings.blade.php",
678 | "/C/xampp/htdocs/foc/vendor/nesbot/carbon/tests/IssetTest.php",
679 | "/C/xampp/htdocs/foc/vendor/predis/predis/tests/Predis/Command/SetUnionTest.php",
680 | "/C/xampp/htdocs/foc/node_modules/gulp/node_modules/minimist/test/stop_early.js",
681 | "/C/xampp/htdocs/foc/app/controllers/model/ModelsToMembersController.php",
682 | "/C/xampp/htdocs/foc/app/models/ModelStatus.php",
683 | "/C/xampp/htdocs/foc/vendor/symfony/routing/Symfony/Component/Routing/Tests/Fixtures/special_route_name.yml",
684 | "/C/xampp/htdocs/foc/vendor/filp/whoops/src/Whoops/Resources/views/layout.html.php",
685 | "/C/xampp/htdocs/foc/app/models/StudioCompany.php",
686 | "/C/xampp/htdocs/foc/app/models/SearchTags.php",
687 | "/C/xampp/htdocs/foc/phpunit.xml",
688 | "/C/xampp/htdocs/foc/public/templates/frontend/default/emails/account_confirmation.blade.php",
689 | "/C/xampp/htdocs/foc/public/templates/frontend/default/emails/change_email_confirmation.blade.php",
690 | "/C/xampp/htdocs/foc/public/templates/frontend/default/emails/password_reminder.blade.php",
691 | "/C/xampp/htdocs/foc/public/templates/frontend/default/emails/register.blade.php",
692 | "/C/xampp/htdocs/foc/public/templates/frontend/default/emails/system/contact.blade.php",
693 | "/C/xampp/htdocs/foc/public/templates/frontend/default/emails/studio/account_confirmation.blade.php",
694 | "/C/xampp/htdocs/foc/public/templates/frontend/default/emails/studio/change_email.blade.php",
695 | "/C/xampp/htdocs/foc/public/templates/frontend/default/emails/studio/change_email_new.blade.php",
696 | "/C/xampp/htdocs/foc/public/templates/frontend/default/emails/studio/new_password.blade.php",
697 | "/C/xampp/htdocs/foc/public/templates/frontend/default/emails/studio/recovery_email_confirmation.blade.php",
698 | "/C/xampp/htdocs/foc/public/templates/frontend/default/emails/studio/unregistered_device.blade.php",
699 | "/C/xampp/htdocs/foc/public/templates/frontend/default/emails/model/account_confirmation.blade.php",
700 | "/C/xampp/htdocs/foc/public/templates/frontend/default/emails/model/change_email.blade.php",
701 | "/C/xampp/htdocs/foc/public/templates/frontend/default/emails/model/change_email_new.blade.php",
702 | "/C/xampp/htdocs/foc/public/templates/frontend/default/emails/model/new_password.blade.php",
703 | "/C/xampp/htdocs/foc/public/templates/frontend/default/emails/model/recovery_email_confirmation.blade.php",
704 | "/C/xampp/htdocs/foc/public/templates/frontend/default/emails/model/register.blade.php",
705 | "/C/xampp/htdocs/foc/public/templates/frontend/default/emails/model/unregistered_device.blade.php",
706 | "/C/xampp/htdocs/foc/public/templates/frontend/default/emails/member/unregistered_device.blade.php",
707 | "/C/xampp/htdocs/foc/public/templates/frontend/default/emails/member/register.blade.php",
708 | "/C/xampp/htdocs/foc/public/templates/frontend/default/emails/member/recovery_email_confirmation.blade.php",
709 | "/C/xampp/htdocs/foc/public/templates/frontend/default/emails/member/new_password.blade.php",
710 | "/C/xampp/htdocs/foc/public/templates/frontend/default/emails/member/change_email_new.blade.php",
711 | "/C/xampp/htdocs/foc/public/templates/frontend/default/emails/member/change_email.blade.php",
712 | "/C/xampp/htdocs/foc/public/templates/frontend/default/emails/member/calendar.blade.php",
713 | "/C/xampp/htdocs/foc/public/templates/frontend/default/emails/member/account_confirmation.blade.php",
714 | "/C/xampp/htdocs/foc/app/views/emails/tickets/comment.blade.php",
715 | "/C/xampp/htdocs/foc/app/views/emails/tickets/new.blade.php",
716 | "/C/xampp/htdocs/foc/app/controllers/member/MemberFriendsController.php",
717 | "/C/xampp/htdocs/foc/app/models/LogFOC.php",
718 | "/C/xampp/htdocs/foc/public/templates/frontend/default/model/contests/contest-model-url.blade.php",
719 | "/C/xampp/htdocs/foc/public/templates/frontend/default/member/contest/partial/partial.blade.php",
720 | "/C/xampp/htdocs/foc/public/templates/frontend/default/member/contest/contest-model.blade.php",
721 | "/C/xampp/htdocs/foc/app/controllers/HomePageController.php",
722 | "/C/xampp/htdocs/foc/public/templates/frontend/default/homepage/partials/elements.blade.php",
723 | "/C/xampp/htdocs/foc/public/templates/frontend/default/homepage/partials/element_1x1.blade.php",
724 | "/C/xampp/htdocs/foc/public/templates/frontend/default/homepage/partials/element_2x1.blade.php",
725 | "/C/xampp/htdocs/foc/public/templates/frontend/default/homepage/partials/element_2x2.blade.php",
726 | "/C/xampp/htdocs/foc/public/templates/frontend/default/homepage/partials/element_3x2.blade.php",
727 | "/C/xampp/htdocs/foc/public/templates/frontend/default/js/libs/contest.js",
728 | "/C/xampp/htdocs/foc/app/config/mail.php",
729 | "/C/xampp/htdocs/foc/app/controllers/member/MemberContestController.php",
730 | "/C/xampp/htdocs/foc/CONTRIBUTING.md",
731 | "/C/xampp/htdocs/foc/app/config/packages/buonzz/laravel-4-freegeoip/config.php",
732 | "/C/xampp/htdocs/foc/app/models/CommentPhoto.php",
733 | "/C/xampp/htdocs/foc/app/config/cache.php",
734 | "/C/xampp/htdocs/foc/public/templates/frontend/default/member/contest/partial/voted.blade.php",
735 | "/C/xampp/htdocs/foc/app/models/Album.php",
736 | "/C/xampp/htdocs/foc/app/controllers/member/MemberAccountSettingsController.php",
737 | "/C/xampp/htdocs/foc/.idea/scopes/scope_settings.xml",
738 | "/C/xampp/htdocs/foc/public/templates/frontend/default/js/libs/settings.js",
739 | "/C/xampp/htdocs/foc/public/templates/frontend/default/js/libs.min/settings.min.js",
740 | "/C/xampp/htdocs/foc/app/models/SystemSettings.php",
741 | "/C/xampp/htdocs/foc/public/templates/frontend/default/css/model-settings.css",
742 | "/C/xampp/htdocs/foc/app/models/DetailsSettings.php",
743 | "/C/xampp/htdocs/foc/app/models/GeneralSettings.php",
744 | "/C/xampp/htdocs/foc/vendor/symfony/css-selector/Symfony/Component/CssSelector/Exception/SyntaxErrorException.php",
745 | "/C/xampp/htdocs/foc/app/controllers/member/MemberFundsController.php",
746 | "/C/xampp/htdocs/foc/app/controllers/model/ModelMessagesController.php"
747 | ],
748 | "find":
749 | {
750 | "height": 34.0
751 | },
752 | "find_in_files":
753 | {
754 | "height": 90.0,
755 | "where_history":
756 | [
757 | ]
758 | },
759 | "find_state":
760 | {
761 | "case_sensitive": false,
762 | "find_history":
763 | [
764 | "json",
765 | "thumb",
766 | "convert",
767 | "Rafasamp",
768 | "getProbePath",
769 | "getConverterPath",
770 | "onfig::get('sonus::ffmpeg')",
771 | "ffmpeg",
772 | "Config::get('sonus::ffmpeg')",
773 | "getProbePath",
774 | "duration",
775 | "dura",
776 | "This video is not available",
777 | "ajaxGetSessionIncome",
778 | "data",
779 | "\">",
780 | "Votes",
781 | "votes",
782 | "'.',\"'\"",
783 | "'.',' '",
784 | "genera",
785 | "securit",
786 | "ajax-action",
787 | "model-box-fav",
788 | "favourite-",
789 | "orderHomepage",
790 | "sugestions",
791 | "new",
792 | ",",
793 | "price",
794 | "skype_price",
795 | "model.",
796 | "edit_account_settings_studio",
797 | "edit_account_settings",
798 | "decode",
799 | "contest",
800 | "transa",
801 | "for($i=$start_from;$i<=$until+48*60*60;$i+=24*60*60)",
802 | "earning",
803 | "clo",
804 | "logout",
805 | "register.device",
806 | "portraitpho",
807 | "securi",
808 | "cen",
809 | "studio.",
810 | "studio-",
811 | "studio",
812 | "certificateCompany_exist",
813 | "idportraitphoto_exist",
814 | "studio_company",
815 | "StudioCompany",
816 | "step",
817 | "\n
\n Gift package: GOLD | \n 84.03 | \n 15.97 | \n
",
818 | "studi",
819 | "studio",
820 | "st",
821 | "(){\n",
822 | "uid",
823 | "/api/messsages/from/",
824 | "aut",
825 | "Company",
826 | "© Flashoncam.com, All Rights Reserved
",
827 | "registe",
828 | "geo",
829 | "}\n",
830 | "geo",
831 | "",
832 | "geo",
833 | "geoip",
834 | "{{asset($assets)}}",
835 | "http://www.officeweb.ro",
836 | "step",
837 | "2",
838 | "user_password",
839 | "2s",
840 | "email",
841 | "ip",
842 | "$member_balance->discounted_credits=$member_balance->discounted_credits-$price;",
843 | "=",
844 | " = ",
845 | " =",
846 | " = ",
847 | "= ",
848 | "epoch",
849 | "$depositTransaction=self::depositTransactions($member_transactions,$model_transactions,$comision_transactions,$rate);",
850 | "else",
851 | "depositTransactions",
852 | "self::ajaxAddFunds();",
853 | "return self::ajaxAddFunds();",
854 | "contest-miss-timer",
855 | "contest",
856 | "epoch",
857 | "depositTransactions",
858 | "depositTransactions\n",
859 | "depositTransaction",
860 | "$member_transactions->type=$type;",
861 | "ip",
862 | "gd",
863 | "upload",
864 | "face",
865 | "facede",
866 | "marcomed",
867 | "reset",
868 | "/**\n",
869 | "reset",
870 | "friends",
871 | "",
872 | "profilephotoState",
873 | "Auth::logout();",
874 | "logout",
875 | " Auth::logout()",
876 | "member.",
877 | "->where(function ($query)\n {\n $query->whereExists(function($query_pers )\n {\n $query_pers->select(DB::raw(1))\n ->from('album_profile_photos')\n ->whereRaw('album_profile_photos.user_id = models.id')\n ->whereRaw('album_profile_photos.profile_photo = 1')\n ->where(function($subq){\n $subq->whereExists(function($status){\n $status->select(DB::raw(1))\n ->from('status')\n ->whereRaw('status.table_name=\"album_profile_photos\"')\n ->whereRaw('status.row_id=album_profile_photos.id')\n ->whereRaw('status.show=\"'.Status::APPROVED.'\"')\n ->whereRaw('status.user_id=album_profile_photos.user_id');\n });\n });\n });\n })",
878 | "block",
879 | "step3",
880 | "getImage",
881 | "pornstar",
882 | "pornstar_li",
883 | "pornstar",
884 | "PENDING",
885 | "details",
886 | "general",
887 | "form_step2",
888 | "studio_form_step2",
889 | "step1",
890 | "whereStatus",
891 | "pending"
892 | ],
893 | "highlight": true,
894 | "in_selection": false,
895 | "preserve_case": false,
896 | "regex": false,
897 | "replace_history":
898 | [
899 | "Closca",
900 | "'.',\",\"",
901 | "'.',\"'\"",
902 | "'.',' ')",
903 | "foc-friend-icon",
904 | "\",\"",
905 | "© Prakrist Services LTD, All Rights Reserved. FlashOnCam SM is a service mark of Prakrist Services LTD
",
906 | "{{asset($assets)}}",
907 | "=",
908 | "$depositTransaction=self::depositTransactions($member_transactions,$model_transactions,$comision_transactions,$rate,$price);",
909 | "esportcenter",
910 | "->where(function ($query)\n {\n $query->whereExists(function($query_pers )\n {\n $query_pers->select(DB::raw(1))\n ->from('album_profile_photos')\n ->whereRaw('album_profile_photos.user_id = models.id')\n ->whereRaw('album_profile_photos.profile_photo = 1')\n ->where(function($subq){\n $subq->whereExists(function($status){\n $status->select(DB::raw(1))\n ->from('status')\n ->whereRaw('status.table_name=\"album_profile_photos\"')\n ->whereRaw('status.row_id=album_profile_photos.id')\n ->whereRaw('status.show=\"'.Status::APPROVED.'\"')\n ->whereRaw('status.user_id=album_profile_photos.user_id');\n });\n });\n });\n })\n ->whereExists(function ($query){\n $query->select(DB::raw(1))\n ->from('users')\n ->whereRaw('users.id=models.id')\n ->whereRaw('users.suspended IS NULL');\n })",
911 | "form_step2",
912 | "studio_form_step2",
913 | "$details_settings->",
914 | "//return self::ajaxAddFunds();",
915 | "contact",
916 | "
",
917 | "/ajax/member-login-popup?redirectr=awards",
918 | " @if($contest->active==1)\n @include (\"member/contest/partial/voted\")\n @endif",
919 | "",
920 | "@if($noloader==NULL)\n \n @endif",
921 | "->where('status','=',1)\n ->where('profile_complete','=',1)",
922 | "'credits' => $memberUpdated->member_balance->credits+$memberUpdated->member_balance->discounted_credits.' Credits',\n 'snapshots' => $memberUpdated->member_balance->snapshots.' Snapshots',\n 'peek' => $memberUpdated->member_balance->peek.' Peek Minutes'",
923 | "'credits' => $memberUpdated->member_balance->credits.' Credits',\n 'bonus_credits' => $memberUpdated->member_balance->discounted_credits.' Bonus Credits',\n 'snapshots' => $memberUpdated->member_balance->snapshots.' Snapshots',\n 'peek' => $memberUpdated->member_balance->peek.' Peek Minutes',",
924 | "'memberbalance' => array(\n 'credits' => $memberUpdated->member_balance->credits,\n 'bonus_credits' => $memberUpdated->member_balance->discounted_credits,\n 'snapshots' => $memberUpdated->member_balance->snapshots,\n 'peek' => $memberUpdated->member_balance->peek,\n ) ",
925 | "//let's make the perfect json response\n $memberUpdated=Member::find($this->member->id);",
926 | "//let's make the perfect json response\n $memberUpdated=Member::find($this->member->id)",
927 | "snapshots",
928 | "'memberbalance' => array(\n 'credits' => $this->member->member_balance->credits,\n 'bonus_credits' => $this->member->member_balance->discounted_credits,\n 'shapshots' => $this->member->member_balance->shapshots,\n 'peek' => $this->member->member_balance->peek,\n ) ",
929 | "'memberbalance' => array(\n 'credits' => $this->member->member_balance->credits,\n 'bonus_credits' => $this->member->member_balance->discounted_credits,\n 'shapshots' => $this->member->member_balance->shapshots,\n 'peek' => $this->member->member_balance->peek\n )\n ));",
930 | "'balance' => $this->member->member_balance",
931 | "if(Auth::user()->isFriend($model->id)",
932 | "@if(Auth::user()->isFriend($model->id))",
933 | "{{$dataFeed->total}} ",
934 | "",
935 | "models.models",
936 | "",
937 | "3x2",
938 | "2x2",
939 | "2x1"
940 | ],
941 | "reverse": false,
942 | "show_context": true,
943 | "use_buffer2": true,
944 | "whole_word": false,
945 | "wrap": true
946 | },
947 | "groups":
948 | [
949 | {
950 | "selected": 6,
951 | "sheets":
952 | [
953 | {
954 | "buffer": 0,
955 | "file": "src/Closca/Sonus/Helpers.php",
956 | "semi_transient": false,
957 | "settings":
958 | {
959 | "buffer_size": 1257,
960 | "regions":
961 | {
962 | },
963 | "selection":
964 | [
965 | [
966 | 489,
967 | 489
968 | ]
969 | ],
970 | "settings":
971 | {
972 | "syntax": "Packages/PHP/PHP.tmLanguage",
973 | "tab_size": 4,
974 | "translate_tabs_to_spaces": true
975 | },
976 | "translation.x": 0.0,
977 | "translation.y": 0.0,
978 | "zoom_level": 1.0
979 | },
980 | "stack_index": 4,
981 | "type": "text"
982 | },
983 | {
984 | "buffer": 1,
985 | "file": "tests/SonusTest.php",
986 | "semi_transient": false,
987 | "settings":
988 | {
989 | "buffer_size": 2983,
990 | "regions":
991 | {
992 | },
993 | "selection":
994 | [
995 | [
996 | 11,
997 | 17
998 | ]
999 | ],
1000 | "settings":
1001 | {
1002 | "syntax": "Packages/PHP/PHP.tmLanguage",
1003 | "tab_size": 4,
1004 | "translate_tabs_to_spaces": true
1005 | },
1006 | "translation.x": 0.0,
1007 | "translation.y": 0.0,
1008 | "zoom_level": 1.0
1009 | },
1010 | "stack_index": 5,
1011 | "type": "text"
1012 | },
1013 | {
1014 | "buffer": 2,
1015 | "file": "tests/HelpersTest.php",
1016 | "semi_transient": false,
1017 | "settings":
1018 | {
1019 | "buffer_size": 922,
1020 | "regions":
1021 | {
1022 | },
1023 | "selection":
1024 | [
1025 | [
1026 | 412,
1027 | 412
1028 | ]
1029 | ],
1030 | "settings":
1031 | {
1032 | "syntax": "Packages/PHP/PHP.tmLanguage",
1033 | "tab_size": 4,
1034 | "translate_tabs_to_spaces": true
1035 | },
1036 | "translation.x": 0.0,
1037 | "translation.y": 0.0,
1038 | "zoom_level": 1.0
1039 | },
1040 | "stack_index": 6,
1041 | "type": "text"
1042 | },
1043 | {
1044 | "buffer": 3,
1045 | "file": "src/Closca/Sonus/Facade.php",
1046 | "semi_transient": false,
1047 | "settings":
1048 | {
1049 | "buffer_size": 313,
1050 | "regions":
1051 | {
1052 | },
1053 | "selection":
1054 | [
1055 | [
1056 | 313,
1057 | 313
1058 | ]
1059 | ],
1060 | "settings":
1061 | {
1062 | "syntax": "Packages/PHP/PHP.tmLanguage"
1063 | },
1064 | "translation.x": 0.0,
1065 | "translation.y": 0.0,
1066 | "zoom_level": 1.0
1067 | },
1068 | "stack_index": 3,
1069 | "type": "text"
1070 | },
1071 | {
1072 | "buffer": 4,
1073 | "file": "src/Closca/Sonus/SonusServiceProvider.php",
1074 | "semi_transient": false,
1075 | "settings":
1076 | {
1077 | "buffer_size": 720,
1078 | "regions":
1079 | {
1080 | },
1081 | "selection":
1082 | [
1083 | [
1084 | 653,
1085 | 653
1086 | ]
1087 | ],
1088 | "settings":
1089 | {
1090 | "syntax": "Packages/PHP/PHP.tmLanguage",
1091 | "translate_tabs_to_spaces": false
1092 | },
1093 | "translation.x": 0.0,
1094 | "translation.y": 0.0,
1095 | "zoom_level": 1.0
1096 | },
1097 | "stack_index": 1,
1098 | "type": "text"
1099 | },
1100 | {
1101 | "buffer": 5,
1102 | "file": "README.md",
1103 | "semi_transient": false,
1104 | "settings":
1105 | {
1106 | "buffer_size": 5305,
1107 | "regions":
1108 | {
1109 | },
1110 | "selection":
1111 | [
1112 | [
1113 | 1865,
1114 | 1865
1115 | ]
1116 | ],
1117 | "settings":
1118 | {
1119 | "syntax": "Packages/Markdown/Markdown.tmLanguage",
1120 | "tab_size": 4,
1121 | "translate_tabs_to_spaces": true
1122 | },
1123 | "translation.x": 0.0,
1124 | "translation.y": 477.0,
1125 | "zoom_level": 1.0
1126 | },
1127 | "stack_index": 2,
1128 | "type": "text"
1129 | },
1130 | {
1131 | "buffer": 6,
1132 | "file": "src/Closca/Sonus/Sonus.php",
1133 | "semi_transient": false,
1134 | "settings":
1135 | {
1136 | "buffer_size": 19432,
1137 | "regions":
1138 | {
1139 | },
1140 | "selection":
1141 | [
1142 | [
1143 | 18580,
1144 | 18580
1145 | ]
1146 | ],
1147 | "settings":
1148 | {
1149 | "syntax": "Packages/PHP/PHP.tmLanguage",
1150 | "tab_size": 4,
1151 | "translate_tabs_to_spaces": true
1152 | },
1153 | "translation.x": 0.0,
1154 | "translation.y": 9379.0,
1155 | "zoom_level": 1.0
1156 | },
1157 | "stack_index": 0,
1158 | "type": "text"
1159 | }
1160 | ]
1161 | }
1162 | ],
1163 | "incremental_find":
1164 | {
1165 | "height": 34.0
1166 | },
1167 | "input":
1168 | {
1169 | "height": 0.0
1170 | },
1171 | "layout":
1172 | {
1173 | "cells":
1174 | [
1175 | [
1176 | 0,
1177 | 0,
1178 | 1,
1179 | 1
1180 | ]
1181 | ],
1182 | "cols":
1183 | [
1184 | 0.0,
1185 | 1.0
1186 | ],
1187 | "rows":
1188 | [
1189 | 0.0,
1190 | 1.0
1191 | ]
1192 | },
1193 | "menu_visible": true,
1194 | "output.find_results":
1195 | {
1196 | "height": 0.0
1197 | },
1198 | "project": "sonus.sublime-project",
1199 | "replace":
1200 | {
1201 | "height": 62.0
1202 | },
1203 | "save_all_on_build": true,
1204 | "select_file":
1205 | {
1206 | "height": 0.0,
1207 | "selected_items":
1208 | [
1209 | [
1210 | "sonus.php",
1211 | "src\\Closca\\Sonus\\Sonus.php"
1212 | ],
1213 | [
1214 | "video.",
1215 | "app\\models\\Video.php"
1216 | ],
1217 | [
1218 | "sonus",
1219 | "vendor\\rafasamp\\sonus\\src\\Rafasamp\\Sonus\\Sonus.php"
1220 | ],
1221 | [
1222 | "route",
1223 | "app\\routes.php"
1224 | ],
1225 | [
1226 | "outsidewww",
1227 | "app\\controllers\\OusideWwwRootImage.php"
1228 | ],
1229 | [
1230 | "app.php",
1231 | "app\\config\\local\\app.php"
1232 | ],
1233 | [
1234 | "uploadi",
1235 | "app\\controllers\\UploadifiveController.php"
1236 | ],
1237 | [
1238 | "videoga",
1239 | "app\\controllers\\model\\ModelVideoGalleryController.php"
1240 | ],
1241 | [
1242 | "flason",
1243 | "app\\config\\flashoncam.php"
1244 | ],
1245 | [
1246 | "sidebar",
1247 | "public\\templates\\frontend\\default\\model\\publics\\partials\\profile_sidebar.blade.php"
1248 | ],
1249 | [
1250 | "awards",
1251 | "public\\templates\\frontend\\default\\member\\contest\\awards.blade.php"
1252 | ],
1253 | [
1254 | "side",
1255 | "public\\templates\\frontend\\default\\model\\partials\\profile_sidebar.blade.php"
1256 | ],
1257 | [
1258 | "modelaccou",
1259 | "app\\controllers\\model\\ModelAccountSettingsController.php"
1260 | ],
1261 | [
1262 | "settings.bla",
1263 | "public\\templates\\frontend\\default\\model\\edit_account_settings.blade.php"
1264 | ],
1265 | [
1266 | "model",
1267 | "app\\models\\Model.php"
1268 | ],
1269 | [
1270 | "modelsma",
1271 | "public\\templates\\frontend\\default\\studio\\models-management.blade.php"
1272 | ],
1273 | [
1274 | "routes",
1275 | "app\\routes.php"
1276 | ],
1277 | [
1278 | "studio",
1279 | "app\\controllers\\studio\\StudioController.php"
1280 | ],
1281 | [
1282 | "studio.js",
1283 | "public\\templates\\frontend\\default\\js\\libs\\studio.js"
1284 | ],
1285 | [
1286 | "mail",
1287 | "app\\config\\mail.php"
1288 | ],
1289 | [
1290 | "contest.js",
1291 | "public\\templates\\frontend\\default\\js\\libs\\contest.js"
1292 | ],
1293 | [
1294 | "settings.blade",
1295 | "public\\templates\\frontend\\default\\member\\settings.blade.php"
1296 | ],
1297 | [
1298 | "memberacc",
1299 | "app\\controllers\\member\\MemberAccountSettingsController.php"
1300 | ],
1301 | [
1302 | "memberfri",
1303 | "app\\controllers\\member\\MemberFriendsController.php"
1304 | ],
1305 | [
1306 | "award",
1307 | "public\\templates\\frontend\\default\\member\\contest\\awards.blade.php"
1308 | ],
1309 | [
1310 | "elements",
1311 | "public\\templates\\frontend\\default\\homepage\\partials\\elements.blade.php"
1312 | ],
1313 | [
1314 | "messagecont",
1315 | "public\\templates\\frontend\\default\\model\\messages\\messageContent.blade.php"
1316 | ],
1317 | [
1318 | "modelmess",
1319 | "app\\controllers\\model\\ModelMessagesController.php"
1320 | ],
1321 | [
1322 | "messages",
1323 | "public\\templates\\frontend\\default\\member\\messages\\messages.blade.php"
1324 | ],
1325 | [
1326 | "cac",
1327 | "app\\config\\cache.php"
1328 | ],
1329 | [
1330 | "studiocontr",
1331 | "app\\controllers\\studio\\StudioController.php"
1332 | ],
1333 | [
1334 | "album",
1335 | "app\\models\\Album.php"
1336 | ],
1337 | [
1338 | "log",
1339 | "app\\models\\LogFOC.php"
1340 | ],
1341 | [
1342 | "mes",
1343 | "app\\models\\Message.php"
1344 | ],
1345 | [
1346 | "membermess",
1347 | "app\\controllers\\member\\MemberMessagesController.php"
1348 | ],
1349 | [
1350 | "homepa",
1351 | "app\\controllers\\HomePageController.php"
1352 | ],
1353 | [
1354 | "earnin",
1355 | "public\\templates\\frontend\\default\\studio\\earnings.blade.php"
1356 | ],
1357 | [
1358 | "logfoc",
1359 | "app\\models\\LogFOC.php"
1360 | ],
1361 | [
1362 | "fochel",
1363 | "app\\helpers\\FocHelper.php"
1364 | ],
1365 | [
1366 | "modelcotnro",
1367 | "app\\controllers\\model\\ModelController.php"
1368 | ],
1369 | [
1370 | "modelvot",
1371 | "app\\models\\ModelVotes.php"
1372 | ],
1373 | [
1374 | "awar",
1375 | "app\\controllers\\AwardsController.php"
1376 | ],
1377 | [
1378 | "membervot",
1379 | "app\\models\\MembersToModelVotes.php"
1380 | ],
1381 | [
1382 | "modelcontr",
1383 | "app\\controllers\\model\\ModelContestController.php"
1384 | ],
1385 | [
1386 | "modelcontro",
1387 | "app\\controllers\\model\\ModelController.php"
1388 | ],
1389 | [
1390 | "accounts",
1391 | "app\\controllers\\model\\ModelAccountSettingsController.php"
1392 | ],
1393 | [
1394 | "studiocontro",
1395 | "app\\controllers\\studio\\StudioController.php"
1396 | ],
1397 | [
1398 | "earning",
1399 | "public\\templates\\frontend\\default\\studio\\earnings.blade.php"
1400 | ],
1401 | [
1402 | "modelgaller",
1403 | "app\\controllers\\model\\ModelGalleryController.php"
1404 | ],
1405 | [
1406 | "header.bl",
1407 | "public\\templates\\frontend\\default\\header.blade.php"
1408 | ],
1409 | [
1410 | "unreg",
1411 | "public\\templates\\frontend\\default\\emails\\model\\unregistered_device.blade.php"
1412 | ],
1413 | [
1414 | "initial",
1415 | "public\\templates\\frontend\\default\\model\\initial_informations.blade.php"
1416 | ],
1417 | [
1418 | "recovery_email_confirmation",
1419 | "public\\templates\\frontend\\default\\emails\\model\\recovery_email_confirmation.blade.php"
1420 | ],
1421 | [
1422 | "member.",
1423 | "app\\models\\Member.php"
1424 | ],
1425 | [
1426 | "member",
1427 | "app\\controllers\\member\\MemberFundsController.php"
1428 | ],
1429 | [
1430 | "modelaccout",
1431 | "app\\controllers\\model\\ModelAccountSettingsController.php"
1432 | ],
1433 | [
1434 | "membercontro",
1435 | "app\\controllers\\member\\MemberController.php"
1436 | ],
1437 | [
1438 | "emails/",
1439 | "public\\templates\\frontend\\default\\emails\\change_email_confirmation.blade.php"
1440 | ],
1441 | [
1442 | "studio.cs",
1443 | "public\\templates\\frontend\\default\\css\\studio.css"
1444 | ],
1445 | [
1446 | "mail.",
1447 | "app\\config\\local\\mail.php"
1448 | ],
1449 | [
1450 | "wizza",
1451 | "public\\templates\\frontend\\default\\studio\\wizzard.blade.php"
1452 | ],
1453 | [
1454 | "stu",
1455 | "app\\models\\Studio.php"
1456 | ],
1457 | [
1458 | "mode",
1459 | "app\\models\\Model.php"
1460 | ],
1461 | [
1462 | "fi",
1463 | "app\\filters.php"
1464 | ],
1465 | [
1466 | "config",
1467 | "app\\config\\packages\\buonzz\\laravel-4-freegeoip\\config.php"
1468 | ],
1469 | [
1470 | "filter",
1471 | "app\\filters.php"
1472 | ],
1473 | [
1474 | "flash",
1475 | "app\\config\\flashoncam.php"
1476 | ],
1477 | [
1478 | "edit_account_settings",
1479 | "public\\templates\\frontend\\default\\model\\edit_account_settings.blade.php"
1480 | ],
1481 | [
1482 | "studioc",
1483 | "app\\controllers\\studio\\StudioController.php"
1484 | ],
1485 | [
1486 | "user",
1487 | "app\\models\\User.php"
1488 | ],
1489 | [
1490 | "modelacc",
1491 | "app\\controllers\\model\\ModelAccountSettingsController.php"
1492 | ],
1493 | [
1494 | "cach",
1495 | "app\\config\\cache.php"
1496 | ],
1497 | [
1498 | "header",
1499 | "public\\templates\\frontend\\default\\header.blade.php"
1500 | ],
1501 | [
1502 | "messageper",
1503 | "public\\templates\\frontend\\default\\member\\messages\\messagePeriod.blade.php"
1504 | ],
1505 | [
1506 | "messagescontr",
1507 | "app\\controllers\\model\\ModelMessagesController.php"
1508 | ],
1509 | [
1510 | "messa",
1511 | "app\\models\\Message.php"
1512 | ],
1513 | [
1514 | "chatjs",
1515 | "public\\templates\\frontend\\default\\js\\libs\\chat.js"
1516 | ],
1517 | [
1518 | "apicontr",
1519 | "app\\controllers\\ApiController.php"
1520 | ],
1521 | [
1522 | "securityset",
1523 | "app\\models\\UserSecuritySettings.php"
1524 | ],
1525 | [
1526 | "membercontr",
1527 | "app\\controllers\\member\\MemberController.php"
1528 | ],
1529 | [
1530 | "setting",
1531 | "public\\templates\\frontend\\default\\member\\settings.blade.php"
1532 | ],
1533 | [
1534 | "geoip",
1535 | "vendor\\buonzz\\laravel-4-freegeoip\\src\\Buonzz\\GeoIP\\GeoIP.php"
1536 | ],
1537 | [
1538 | "apicontro",
1539 | "app\\controllers\\ApiController.php"
1540 | ],
1541 | [
1542 | "membertr",
1543 | "app\\models\\MemberTransactions.php"
1544 | ],
1545 | [
1546 | "memberf",
1547 | "app\\controllers\\member\\MemberFundsController.php"
1548 | ],
1549 | [
1550 | "profile_photo_modal_ajax_response",
1551 | "public\\templates\\frontend\\default\\model\\publics\\partials\\profile_photo_modal_ajax_response.blade.php"
1552 | ],
1553 | [
1554 | "membertom",
1555 | "app\\controllers\\member\\MembersToModelsController.php"
1556 | ],
1557 | [
1558 | "foche",
1559 | "app\\helpers\\FocHelper.php"
1560 | ],
1561 | [
1562 | "outsideww",
1563 | "app\\controllers\\OusideWwwRootImage.php"
1564 | ],
1565 | [
1566 | "memberfunds",
1567 | "app\\controllers\\member\\MemberFundsController.php"
1568 | ],
1569 | [
1570 | "contescontr",
1571 | "app\\controllers\\member\\MemberContestController.php"
1572 | ],
1573 | [
1574 | "contest.blade",
1575 | "public\\templates\\frontend\\default\\member\\contest\\contest-model.blade.php"
1576 | ],
1577 | [
1578 | "privacy",
1579 | "public\\templates\\frontend\\default\\cms\\privacy.blade.php"
1580 | ],
1581 | [
1582 | "cmscontr",
1583 | "app\\controllers\\CmsController.php"
1584 | ],
1585 | [
1586 | "short",
1587 | "app\\controllers\\ShortUrlController.php"
1588 | ],
1589 | [
1590 | "memberfund",
1591 | "app\\controllers\\member\\MemberFundsController.php"
1592 | ],
1593 | [
1594 | "fundscontr",
1595 | "app\\controllers\\member\\MemberFundsController.php"
1596 | ],
1597 | [
1598 | "gallery",
1599 | "app\\controllers\\model\\ModelGalleryController.php"
1600 | ],
1601 | [
1602 | "friend",
1603 | "public\\templates\\frontend\\default\\member\\friends.blade.php"
1604 | ],
1605 | [
1606 | "wizard",
1607 | "public\\templates\\frontend\\default\\studio\\wizzard.blade.php"
1608 | ],
1609 | [
1610 | "chat.blade",
1611 | "public\\templates\\frontend\\default\\model\\chat.blade.php"
1612 | ],
1613 | [
1614 | "comment.blade",
1615 | "public\\templates\\frontend\\default\\model\\partials_ajax\\comment.blade.php"
1616 | ],
1617 | [
1618 | "home",
1619 | "app\\controllers\\HomePageController.php"
1620 | ],
1621 | [
1622 | "homepage",
1623 | "app\\controllers\\HomePageController.php"
1624 | ],
1625 | [
1626 | "message",
1627 | "app\\models\\Message.php"
1628 | ],
1629 | [
1630 | "modelmessa",
1631 | "app\\controllers\\model\\ModelMessagesController.php"
1632 | ],
1633 | [
1634 | "membermessage",
1635 | "app\\controllers\\member\\MemberMessagesController.php"
1636 | ],
1637 | [
1638 | "suspe",
1639 | "public\\templates\\frontend\\default\\model\\suspended.blade.php"
1640 | ],
1641 | [
1642 | "suspend",
1643 | "public\\templates\\frontend\\default\\member\\suspended.blade.php"
1644 | ],
1645 | [
1646 | "modelcotnrol",
1647 | "app\\controllers\\model\\ModelController.php"
1648 | ],
1649 | [
1650 | "register_s",
1651 | "public\\templates\\frontend\\default\\studio\\register_studio.blade.php"
1652 | ],
1653 | [
1654 | "cahc",
1655 | "app\\config\\cache.php"
1656 | ],
1657 | [
1658 | "abserver",
1659 | "app\\observers.php"
1660 | ],
1661 | [
1662 | "commentp",
1663 | "app\\models\\CommentPhoto.php"
1664 | ],
1665 | [
1666 | "outsi",
1667 | "app\\controllers\\OusideWwwRootImage.php"
1668 | ],
1669 | [
1670 | "lang/",
1671 | "app\\lang\\en\\app.php"
1672 | ],
1673 | [
1674 | "logf",
1675 | "app\\models\\LogFOC.php"
1676 | ],
1677 | [
1678 | "mail.p",
1679 | "app\\config\\local\\mail.php"
1680 | ],
1681 | [
1682 | "contract_modal",
1683 | "public\\templates\\frontend\\default\\studio\\partials_ajax\\contract_modal.blade.php"
1684 | ],
1685 | [
1686 | "modelc",
1687 | "app\\controllers\\model\\ModelController.php"
1688 | ],
1689 | [
1690 | "accout",
1691 | "app\\controllers\\model\\ModelAccountSettingsController.php"
1692 | ],
1693 | [
1694 | "addmodel",
1695 | "public\\templates\\frontend\\default\\studio\\add-model.blade.php"
1696 | ],
1697 | [
1698 | "initia",
1699 | "public\\templates\\frontend\\default\\model\\initial_informations.blade.php"
1700 | ],
1701 | [
1702 | "friend_buttons",
1703 | "public\\templates\\frontend\\default\\model\\publics\\partials\\friend_buttons.blade.php"
1704 | ],
1705 | [
1706 | "messagecontr",
1707 | "app\\controllers\\model\\ModelMessagesController.php"
1708 | ],
1709 | [
1710 | "messages.blade.p",
1711 | "public\\templates\\frontend\\default\\model\\messages\\messages.blade.php"
1712 | ],
1713 | [
1714 | "search_re",
1715 | "public\\templates\\frontend\\default\\model\\messages\\partials\\search_results.blade.php"
1716 | ],
1717 | [
1718 | "search_res",
1719 | "public\\templates\\frontend\\default\\model\\messages\\partials\\search_results.blade.php"
1720 | ]
1721 | ],
1722 | "width": 0.0
1723 | },
1724 | "select_project":
1725 | {
1726 | "height": 500.0,
1727 | "selected_items":
1728 | [
1729 | [
1730 | "focad",
1731 | "C:\\xampp\\htdocs\\focadmin\\focadmin.sublime-project"
1732 | ],
1733 | [
1734 | "foc",
1735 | "C:\\xampp\\htdocs\\focadmin\\focadmin.sublime-project"
1736 | ],
1737 | [
1738 | "rasi",
1739 | "C:\\xampp\\htdocs\\rasi\\Rasi\\rasi.sublime-project"
1740 | ],
1741 | [
1742 | "routes",
1743 | "C:\\xampp\\htdocs\\focadmin\\app\\routes.sublime-workspace"
1744 | ],
1745 | [
1746 | "onfa",
1747 | "C:\\xampp\\htdocs\\onfaktura\\onfaktura.sublime-project"
1748 | ],
1749 | [
1750 | "ras",
1751 | "C:\\xampp\\htdocs\\rasi\\rasi.sublime-workspace"
1752 | ],
1753 | [
1754 | "",
1755 | "C:\\xampp\\htdocs\\rasi\\rasi.sublime-workspace"
1756 | ],
1757 | [
1758 | "onfakt",
1759 | "C:\\xampp\\htdocs\\onfaktura\\onfaktura.sublime-project"
1760 | ],
1761 | [
1762 | "onfak",
1763 | "C:\\xampp\\htdocs\\onfaktura\\onfaktura.sublime-project"
1764 | ],
1765 | [
1766 | "js",
1767 | "C:\\xampp\\htdocs\\JSC\\jsc.sublime-project"
1768 | ],
1769 | [
1770 | "foca",
1771 | "C:\\xampp\\htdocs\\focadmin\\focadmin.sublime-project"
1772 | ],
1773 | [
1774 | "jc",
1775 | "C:\\xampp\\htdocs\\JSC\\jsc.sublime-project"
1776 | ],
1777 | [
1778 | "onf",
1779 | "C:\\xampp\\htdocs\\onfaktura\\onfaktura.sublime-project"
1780 | ],
1781 | [
1782 | "jsc",
1783 | "C:\\xampp\\htdocs\\JSC\\jsc.sublime-project"
1784 | ],
1785 | [
1786 | "cron",
1787 | "C:\\xampp\\htdocs\\cronwork\\cronwor;.sublime-project"
1788 | ],
1789 | [
1790 | "\\",
1791 | "C:\\xampp\\htdocs\\focadmin\\focadmin.sublime-project"
1792 | ],
1793 | [
1794 | "cr",
1795 | "C:\\xampp\\htdocs\\cronwork\\cronwor;.sublime-project"
1796 | ],
1797 | [
1798 | "admin",
1799 | "C:\\xampp\\htdocs\\focadmin\\focadmin.sublime-project"
1800 | ]
1801 | ],
1802 | "width": 380.0
1803 | },
1804 | "select_symbol":
1805 | {
1806 | "height": 0.0,
1807 | "selected_items":
1808 | [
1809 | ],
1810 | "width": 0.0
1811 | },
1812 | "selected_group": 0,
1813 | "settings":
1814 | {
1815 | },
1816 | "show_minimap": false,
1817 | "show_open_files": true,
1818 | "show_tabs": true,
1819 | "side_bar_visible": true,
1820 | "side_bar_width": 94.0,
1821 | "status_bar_visible": true,
1822 | "template_settings":
1823 | {
1824 | }
1825 | }
1826 |
--------------------------------------------------------------------------------
/src/Classes/FFMPEG.php:
--------------------------------------------------------------------------------
1 |
12 | */
13 |
14 | class FFMPEG
15 | {
16 | /**
17 | * Returns full path of ffmpeg
18 | * @return string
19 | */
20 | protected static function getConverterPath()
21 | {
22 | return Config::get('ffmpeg.ffmpeg');
23 | }
24 |
25 | /**
26 | * Returns full path of ffprobe
27 | * @return string
28 | */
29 | protected static function getProbePath()
30 | {
31 | return Config::get('ffmpeg.ffprobe');
32 | }
33 |
34 | /**
35 | * Returns full path for progress temp files
36 | * @return [type] [description]
37 | */
38 | protected static function getTempPath()
39 | {
40 | return Config::get('ffmpeg.tmp_dir');
41 | }
42 |
43 | /**
44 | * Returns installed ffmpeg version
45 | * @return array
46 | */
47 | public static function getConverterVersion()
48 | {
49 | // Run terminal command to retrieve version
50 | $command = self::getConverterPath().' -version';
51 | $output = shell_exec($command);
52 |
53 | // PREG pattern to retrive version information
54 | $ouput = preg_match("/ffmpeg version (?P[0-9]{0,3}).(?P[0-9]{0,3}).(?P[0-9]{0,3})/", $output, $parsed);
55 |
56 | // Verify output
57 | if ($output === false || $output == 0)
58 | {
59 | return false;
60 | }
61 |
62 | // Assign array with variables
63 | $version = array(
64 | 'major' => $parsed['major'],
65 | 'minor' => $parsed['minor'],
66 | 'rev' => $parsed['revision']
67 | );
68 |
69 | return $version;
70 | }
71 |
72 | /**
73 | * Returns all formats ffmpeg supports
74 | * @return array
75 | */
76 | public static function getSupportedFormats()
77 | {
78 | // Run terminal command
79 | $command = self::getConverterPath().' -formats';
80 | $output = shell_exec($command);
81 |
82 | // PREG pattern to retrive version information
83 | $output = preg_match_all("/(?P(D\s|\sE|DE))\s(?P\S{3,11})\s/", $output, $parsed);
84 |
85 | // Verify output
86 | if ($output === false || $output == 0)
87 | {
88 | return false;
89 | }
90 |
91 | // Combine the format and mux information into an array
92 | $formats = array_combine($parsed['format'], $parsed['mux']);
93 |
94 | return $formats;
95 | }
96 |
97 | /**
98 | * Returns all audio formats ffmpeg can encode
99 | * @return array
100 | */
101 | public static function getSupportedAudioEncoders()
102 | {
103 | // Run terminal command
104 | $command = self::getConverterPath().' -encoders';
105 | $output = shell_exec($command);
106 |
107 | // PREG pattern to retrive version information
108 | $output = preg_match_all("/[A]([.]|\w)([.]|\w)([.]|\w)([.]|\w)([.]|\w)\s(?P\S{3,20})\s/", $output, $parsed);
109 |
110 | // Verify output
111 | if ($output === false || $output == 0)
112 | {
113 | return false;
114 | }
115 |
116 | return $parsed['format'];
117 | }
118 |
119 | /**
120 | * Returns all video formats ffmpeg can encode
121 | * @return array
122 | */
123 | public static function getSupportedVideoEncoders()
124 | {
125 | // Run terminal command
126 | $command = self::getConverterPath().' -encoders';
127 | $output = shell_exec($command);
128 |
129 | // PREG pattern to retrive version information
130 | $output = preg_match_all("/[V]([.]|\w)([.]|\w)([.]|\w)([.]|\w)([.]|\w)\s(?P\S{3,20})\s/", $output, $parsed);
131 |
132 | // Verify output
133 | if ($output === false || $output == 0)
134 | {
135 | return false;
136 | }
137 |
138 | return $parsed['format'];
139 | }
140 |
141 | /**
142 | * Returns all audio formats ffmpeg can decode
143 | * @return array
144 | */
145 | public static function getSupportedAudioDecoders()
146 | {
147 | // Run terminal command
148 | $command = self::getConverterPath().' -decoders';
149 | $output = shell_exec($command);
150 |
151 | // PREG pattern to retrive version information
152 | $output = preg_match_all("/[A]([.]|\w)([.]|\w)([.]|\w)([.]|\w)([.]|\w)\s(?P\w{3,20})\s/", $output, $parsed);
153 |
154 | // Verify output
155 | if ($output === false || $output == 0)
156 | {
157 | return false;
158 | }
159 |
160 | return $parsed['format'];
161 | }
162 |
163 | /**
164 | * Returns all video formats ffmpeg can decode
165 | * @return array
166 | */
167 | public static function getSupportedVideoDecoders()
168 | {
169 | // Run terminal command
170 | $command = self::getConverterPath().' -decoders';
171 | $output = shell_exec($command);
172 |
173 | // PREG pattern to retrive version information
174 | $output = preg_match_all("/[V]([.]|\w)([.]|\w)([.]|\w)([.]|\w)([.]|\w)\s(?P\w{3,20})\s/", $output, $parsed);
175 |
176 | // Verify output
177 | if ($output === false || $output == 0)
178 | {
179 | return false;
180 | }
181 |
182 | return $parsed['format'];
183 | }
184 |
185 | /**
186 | * Returns boolean if ffmpeg is able to encode to this format
187 | * @param string $format ffmpeg format name
188 | * @return boolean
189 | */
190 | public static function canEncode($format)
191 | {
192 | $formats = array_merge(self::getSupportedAudioEncoders(), self::getSupportedVideoEncoders());
193 |
194 | // Return boolean if they can be encoded or not
195 | if(!in_array($format, $formats))
196 | {
197 | return false;
198 | } else {
199 | return true;
200 | }
201 | }
202 |
203 | /**
204 | * Returns boolean if ffmpeg is able to decode to this format
205 | * @param string $format ffmpeg format name
206 | * @return boolean
207 | */
208 | public static function canDecode($format)
209 | {
210 | // Get an array with all supported encoding formats
211 | $formats = array_merge(self::getSupportedAudioDecoders(), self::getSupportedVideoDecoders());
212 |
213 | // Return boolean if they can be encoded or not
214 | if(!in_array($format, $formats))
215 | {
216 | return false;
217 | } else {
218 | return true;
219 | }
220 | }
221 |
222 | /**
223 | * Returns array with file information
224 | * @param string $input file input
225 | * @param string $type output format
226 | * @return array, json, xml, csv
227 | */
228 | public static function getMediaInfo($input, $type = null)
229 | {
230 | // Just making sure everything goes smooth
231 | if (substr($input, 0, 2) == '-i')
232 | {
233 | $input = substr($input, 3);
234 | }
235 |
236 | switch ($type)
237 | {
238 | case 'json':
239 | $command = self::getProbePath().' -v quiet -print_format json -show_format -show_streams -pretty -i '.$input.' 2>&1';
240 | $output = shell_exec($command);
241 | $output = json_decode($output, true);
242 | break;
243 |
244 | case 'xml':
245 | $command = self::getProbePath().' -v quiet -print_format xml -show_format -show_streams -pretty -i '.$input.' 2>&1';
246 | $output = shell_exec($command);
247 | break;
248 |
249 | case 'csv':
250 | $command = self::getProbePath().' -v quiet -print_format csv -show_format -show_streams -pretty -i '.$input.' 2>&1';
251 | $output = shell_exec($command);
252 | break;
253 |
254 | default:
255 | $command = self::getProbePath().' -v quiet -print_format json -show_format -show_streams -pretty -i '.$input.' 2>&1';
256 | $output = shell_exec($command);
257 | $output = json_decode($output, true);
258 | break;
259 | }
260 |
261 | return $output;
262 | }
263 |
264 | /**
265 | * Retrieves video thumbnails
266 | * @param string $input video input
267 | * @param string $output output filename
268 | * @param integer $count number of thumbnails to generate
269 | * @param string $format thumbnail format
270 | * @param string $arg user arguments
271 | * @return boolean
272 | */
273 | public static function getThumbnails($input, $output, $count = 5, $format = 'png', $arg = null)
274 | {
275 | // Round user input
276 | $count = round($count);
277 |
278 | // Return false if user requests 0 frames or round function fails
279 | if ($count < 1)
280 | {
281 | return false;
282 | }
283 |
284 | if (is_null($arg))
285 | {
286 | $arg = '-vf "select=gt(scene\,0.5)" -frames:v '.$count.' -vsync vfr';
287 | }
288 |
289 | // Execute thumbnail generator command
290 | $command = self::getConverterPath().' -i '.$input.' '.$arg.' '.$output.'-%02d.'.$format;
291 | shell_exec($command);
292 | return true;
293 | }
294 |
295 | /**
296 | * Retrieves video thumbnails
297 | * @param string $input video input
298 | * @param string $output output filename
299 | * @param integer $count number of thumbnails to generate
300 | * @param integer $duration video duration
301 | * @param string $format thumbnail format
302 | * @return boolean
303 | */
304 | public static function thumbnify($input,$output, $count=5, $duration, $format = 'png')
305 | {
306 | //Get the timings for thumbs
307 | $total=$duration/$count;
308 | $total=round($total);
309 |
310 | // Return false if user requests 0 frames or round function fails
311 | if ($count < 1)
312 | {
313 | return false;
314 | }
315 |
316 | // Execute thumbnail generator command
317 | $command = self::getConverterPath().' -i '.$input.' -vf fps=fps=1/'.$total.' '.$output.'-%02d.'.$format;
318 | shell_exec($command);
319 | return true;
320 | }
321 |
322 |
323 | /**
324 | * Input files
325 | * @var array
326 | */
327 | protected $input = array();
328 |
329 | /**
330 | * Output files
331 | * @var array
332 | */
333 | protected $output = array();
334 |
335 | /**
336 | * Contains the combination of all parameters set by the user
337 | * @var array
338 | */
339 | protected $parameters = array();
340 |
341 | /**
342 | * Contains the job progress id
343 | * @var string
344 | */
345 | protected $progress;
346 |
347 | /**
348 | * Returns object instance for chainable methods
349 | * @return object
350 | */
351 | public static function convert()
352 | {
353 | $ffmpeg = new ffmpeg;
354 | return $ffmpeg;
355 | }
356 |
357 | /**
358 | * Sets the progress ID
359 | * @param string $var progress id
360 | * @return null
361 | */
362 | public function progress($var)
363 | {
364 | // If value is null pass current timestamp
365 | if (is_null($var))
366 | {
367 | $this->progress = date('U');
368 | return $this;
369 | } else {
370 | $this->progress = $var;
371 | return $this;
372 | }
373 | }
374 |
375 | /**
376 | * Adds an input file
377 | * @param string $var filename
378 | * @return boolean
379 | */
380 | public function input($var)
381 | {
382 | // Value must be text
383 | if (!is_string($var))
384 | {
385 | return false;
386 | }
387 |
388 | array_push($this->input, '-i '.$var);
389 | return $this;
390 | }
391 |
392 | /**
393 | * Adds an output file
394 | * @param string $var filename
395 | * @return boolean
396 | */
397 | public function output($var)
398 | {
399 | // Value must be text
400 | if (!is_string($var))
401 | {
402 | return false;
403 | }
404 |
405 | array_push($this->output, $var);
406 | return $this;
407 | }
408 |
409 | /**
410 | * Overwrite output file if it exists
411 | * @param boolean $var
412 | * @return boolean
413 | */
414 | public function overwrite($var = true)
415 | {
416 | switch ($var)
417 | {
418 | case true:
419 | array_push($this->parameters, '-y');
420 | return $this;
421 | break;
422 |
423 | case false:
424 | array_push($this->parameters, '-n');
425 | return $this;
426 | break;
427 |
428 | default:
429 | return false;
430 | break;
431 | }
432 | }
433 |
434 | /**
435 | * Stop running FFMPEG after X seconds
436 | * @param int $var seconds
437 | * @return boolean
438 | */
439 | public function timelimit($var)
440 | {
441 | // Value must be numeric
442 | if (!is_numeric($var))
443 | {
444 | return false;
445 | }
446 |
447 | array_push($this->parameters, '-timelimit '.$var);
448 | return $this;
449 | }
450 |
451 | /**
452 | * Sets the codec used for the conversion
453 | * https://trac.ffmpeg.org/wiki/AACEncodingGuide
454 | * https://trac.ffmpeg.org/wiki/Encoding%20VBR%20(Variable%20Bit%20Rate)%20mp3%20audio
455 | * @param string $var ffmpeg codec name
456 | * @return boolean
457 | */
458 | public function codec($var, $type = 'audio')
459 | {
460 | // Value must not be null
461 | if (is_null($var))
462 | {
463 | return false;
464 | }
465 |
466 | switch($type)
467 | {
468 | case 'audio':
469 | array_push($this->parameters, '-c:a '.$var);
470 | return $this;
471 | break;
472 |
473 | case 'video':
474 | array_push($this->parameters, '-c:v '.$var);
475 | return $this;
476 | break;
477 |
478 | default:
479 | return false;
480 | break;
481 | }
482 | }
483 |
484 | /**
485 | * Sets the constant bitrate
486 | * @param int $var bitrate
487 | * @return boolean
488 | */
489 | public function bitrate($var, $type = 'audio')
490 | {
491 | // Value must be numeric
492 | if (!is_numeric($var))
493 | {
494 | return false;
495 | }
496 |
497 | switch ($type)
498 | {
499 | case 'audio':
500 | array_push($this->parameters, '-b:a '.$var.'k');
501 | return $this;
502 | break;
503 |
504 | case 'video':
505 | array_push($this->parameters, '-b:v '.$var.'k');
506 | return $this;
507 | break;
508 |
509 | default:
510 | return false;
511 | break;
512 | }
513 | }
514 |
515 | /**
516 | * Sets the number of audio channels
517 | * https://trac.ffmpeg.org/wiki/AudioChannelManipulation
518 | * @param string $var
519 | * @return boolean
520 | */
521 | public function channels($var)
522 | {
523 | // Value must be numeric
524 | if (!is_numeric($var))
525 | {
526 | return false;
527 | }
528 |
529 | array_push($this->parameters, '-ac '.$var);
530 | return $this;
531 | }
532 |
533 | /**
534 | * Sets audio frequency rate
535 | * http://ffmpeg.org/ffmpeg.html#Audio-Options
536 | * @param int $var frequency
537 | * @return boolean
538 | */
539 | public function frequency($var)
540 | {
541 | // Value must be numeric
542 | if (!is_numeric($var))
543 | {
544 | return false;
545 | }
546 |
547 | array_push($this->parameters, '-ar:a '.$var);
548 | return $this;
549 | }
550 |
551 | /**
552 | * Performs conversion
553 | * @param string $arg user arguments
554 | * @return string tracking code
555 | * @return boolean false on error
556 | */
557 | public function go($arg = null)
558 | {
559 | // Assign converter path
560 | $ffmpeg = self::getConverterPath();
561 |
562 | // Check if user provided raw arguments
563 | if (is_null($arg))
564 | {
565 | // If not, use the prepared arguments
566 | $arg = implode(' ', $this->parameters);
567 | }
568 |
569 | // Return input and output files
570 | $input = implode(' ', $this->input);
571 | $output = implode(' ', $this->output);
572 |
573 | // Prepare the command
574 | $cmd = escapeshellcmd($ffmpeg.' '.$input.' '.$arg.' '.$output);
575 |
576 | // Check if progress reporting is enabled
577 | if (Config::get('ffmpeg.progress') === true)
578 | {
579 | // Get temp dir
580 | $tmpdir = self::getTempPath();
581 |
582 | // Get progress id
583 | if (empty($this->progress))
584 | {
585 | // Create a default (unix timestamp)
586 | $progress = date('U');
587 | } else {
588 | // Assign if it exists
589 | $progress = $this->progress;
590 | }
591 |
592 | // Publish progress to this ID
593 | $cmd = $cmd.' 1>"'.$tmpdir.$progress.'.ffmpegtmp" 2>&1';
594 |
595 | // Execute command
596 | return shell_exec($cmd);
597 | } else {
598 | // Execute command
599 | return shell_exec($cmd);
600 | }
601 | }
602 |
603 | /**
604 | * Returns given job progress
605 | * @param string $job id
606 | * @param string $format format to output data
607 | * @return array
608 | */
609 | public static function getProgress($job, $format = null)
610 | {
611 | // Get the temporary directory
612 | $tmpdir = self::getTempPath();
613 |
614 | // The code below has been adapted from Jimbo
615 | // http://stackoverflow.com/questions/11441517/ffmpeg-progress-bar-encoding-percentage-in-php
616 | $content = @file_get_contents($tmpdir.$job.'.ffmpegtmp');
617 |
618 | if($content)
619 | {
620 | // Get duration of source
621 | preg_match("/Duration: (.*?), start:/", $content, $matches);
622 |
623 | $rawDuration = $matches[1];
624 |
625 | // rawDuration is in 00:00:00.00 format. This converts it to seconds.
626 | $ar = array_reverse(explode(":", $rawDuration));
627 | $duration = floatval($ar[0]);
628 | if (!empty($ar[1])) $duration += intval($ar[1]) * 60;
629 | if (!empty($ar[2])) $duration += intval($ar[2]) * 60 * 60;
630 |
631 | // Get the time in the file that is already encoded
632 | preg_match_all("/time=(.*?) bitrate/", $content, $matches);
633 |
634 | $rawTime = array_pop($matches);
635 |
636 | // This is needed if there is more than one match
637 | if (is_array($rawTime))
638 | {
639 | $rawTime = array_pop($rawTime);
640 | }
641 |
642 | // rawTime is in 00:00:00.00 format. This converts it to seconds.
643 | $ar = array_reverse(explode(":", $rawTime));
644 | $time = floatval($ar[0]);
645 | if (!empty($ar[1])) $time += intval($ar[1]) * 60;
646 | if (!empty($ar[2])) $time += intval($ar[2]) * 60 * 60;
647 |
648 | // Calculate the progress
649 | $progress = round(($time/$duration) * 100);
650 |
651 | // Output to array
652 | $output = array(
653 | 'Duration' => $rawDuration,
654 | 'Current' => $rawTime,
655 | 'Progress' => $progress
656 | );
657 |
658 | // Return data
659 | switch ($format)
660 | {
661 | case 'array':
662 | return $output;
663 | break;
664 |
665 | default:
666 | return json_encode($output);
667 | break;
668 | }
669 | } else {
670 | return null;
671 | }
672 | }
673 |
674 | /**
675 | * Deletes job temporary file
676 | * @param string $job id
677 | * @return boolean
678 | */
679 | public static function destroyProgress($job)
680 | {
681 | // Get temporary file path
682 | $file = $tmpdir.$job.'.ffmpegtmp';
683 |
684 | // Check if file exists
685 | if (is_file($file))
686 | {
687 | // Delete file
688 | $output = unlink($tmpdir.$job.'.ffmpegtmp');
689 | return $output;
690 | } else {
691 | return false;
692 | }
693 | }
694 |
695 | /**
696 | * Deletes all temporary files
697 | * @return boolean
698 | */
699 | public static function destroyAllProgress()
700 | {
701 | // Get all filenames within the temporary folder
702 | $files = glob($tmpdir.'*');
703 |
704 | // Iterate through files
705 | $output = array();
706 | foreach ($files as $file)
707 | {
708 | if (is_file($file))
709 | {
710 | // Return result to array
711 | $result = unlink($file);
712 | array_push($output, var_export($result, true));
713 | }
714 | }
715 |
716 | // If a file could not be deleted, return false
717 | if (array_search('false', $output))
718 | {
719 | return false;
720 | }
721 |
722 | return true;
723 | }
724 |
725 | public function getVideoJsonDetails()
726 | {
727 | $ffprobe = self::getProbePath();
728 | $input = implode(' ', $this->input);
729 | $arg1=" -loglevel error -show_format -show_streams";
730 | $arg2=" -print_format json";
731 | $cmd = escapeshellcmd($ffprobe.' '.$arg1.' '.$input.' '.$arg2);
732 | return shell_exec($cmd);
733 | }
734 |
735 | }
736 |
--------------------------------------------------------------------------------
/src/Facade/FfmpegFacade.php:
--------------------------------------------------------------------------------
1 | publishes([
23 | realpath(__DIR__.'/../../config/ffmpeg.php') => config_path('ffmpeg.php'),
24 | ]);
25 |
26 | $config = $this->app['config']['api'];
27 | }
28 |
29 | /**
30 | * Register the service provider.
31 | *
32 | * @return void
33 | */
34 | public function register()
35 | {
36 | $this->app->singleton('ffmpeg', function($app)
37 | {
38 | return new FFMPEG;
39 | });
40 | }
41 |
42 | /**
43 | * Get the services provided by the provider.
44 | *
45 | * @return array
46 | */
47 | public function provides()
48 | {
49 | return array('ffmpeg');
50 | }
51 |
52 | }
53 |
--------------------------------------------------------------------------------
/tests/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/linkthrow/ffmpeg/5ce74284fa5303028f42c7c276605ff088d1e095/tests/.gitkeep
--------------------------------------------------------------------------------
/tests/HelpersTest.php:
--------------------------------------------------------------------------------
1 | assertTrue($result == $expected);
18 | }
19 |
20 | /**
21 | * Seconds to Timestamp function
22 | *
23 | * @return void
24 | */
25 | public function testSecondsToTimestamp()
26 | {
27 | $result = Helpers::secondsToTimestamp(3661);
28 | $expected = '01:01:01';
29 | $this->assertTrue($result == $expected);
30 | }
31 |
32 | /**
33 | * Progress Percentage function
34 | *
35 | * @return void
36 | */
37 | public function testProgressPercentage()
38 | {
39 | $result = Helpers::progressPercentage(3660, 3660);
40 | $expected = 100;
41 | $this->assertTrue($result == $expected);
42 | }
43 | }
--------------------------------------------------------------------------------
/tests/SonusTest.php:
--------------------------------------------------------------------------------
1 | sonus = new Sonus;
23 | }
24 |
25 | /**
26 | * Input function must receive a string
27 | *
28 | * @return void
29 | */
30 | public function testInputMustBeAString()
31 | {
32 | $result = $this->sonus->input(1);
33 | $expected = false;
34 | $this->assertTrue($result == $expected);
35 | }
36 |
37 | /**
38 | * Output function must receive a string
39 | *
40 | * @return void
41 | */
42 | public function testOutputMustBeAString()
43 | {
44 | $result = $this->sonus->output(1);
45 | $expected = false;
46 | $this->assertTrue($result == $expected);
47 | }
48 |
49 | /**
50 | * Timelimit function must receive a number
51 | *
52 | * @return void
53 | */
54 | public function testTimelimitMustBeNumeric()
55 | {
56 | $result = $this->sonus->timelimit('word');
57 | $expected = false;
58 | $this->assertTrue($result == $expected);
59 | }
60 |
61 | /**
62 | * Codec function must not receive a null value for codec name
63 | *
64 | * @return void
65 | */
66 | public function testCodecNameMustNotBeNull()
67 | {
68 | $result = $this->sonus->codec('', 'test');
69 | $expected = false;
70 | $this->assertTrue($result == $expected);
71 | }
72 |
73 | /**
74 | * Codec function must receive a type of audio or video
75 | *
76 | * @return void
77 | */
78 | public function testCodecTypeMustBeAudioOrVideo()
79 | {
80 | $result = $this->sonus->codec('test', 'test');
81 | $expected = false;
82 | $this->assertTrue($result == $expected);
83 | }
84 |
85 | /**
86 | * Bitrate function must receive a number
87 | *
88 | * @return void
89 | */
90 | public function testBitrateMustBeNumeric()
91 | {
92 | $result = $this->sonus->bitrate('128kbps', 'audio');
93 | $expected = false;
94 | $this->assertTrue($result == $expected);
95 | }
96 |
97 | /**
98 | * Bitrate function must receive a type of audio or video
99 | *
100 | * @return void
101 | */
102 | public function testBitrateTypeMustBeAudioOrVideo()
103 | {
104 | $result = $this->sonus->codec('128', 'sound');
105 | $expected = false;
106 | $this->assertTrue($result == $expected);
107 | }
108 |
109 | /**
110 | * Channels function must receive a number
111 | *
112 | * @return void
113 | */
114 | public function testChannelsMustBeNumeric()
115 | {
116 | $result = $this->sonus->channels('stereo');
117 | $expected = false;
118 | $this->assertTrue($result == $expected);
119 | }
120 |
121 | /**
122 | * Frequency function must receive a number
123 | *
124 | * @return void
125 | */
126 | public function testFrequencyMustBeNumeric()
127 | {
128 | $result = $this->sonus->frequency('44000hz');
129 | $expected = false;
130 | $this->assertTrue($result == $expected);
131 | }
132 | }
--------------------------------------------------------------------------------