8000 test · mastashake08/screen-recorder-api@4cb15c3 · GitHub
[go: up one dir, main page]

Skip to content

Commit 4cb15c3

Browse files
author
Jyrone Parker
committed
test
1 parent 5572e19 commit 4cb15c3

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

routes/api.php

+13-4
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
use Illuminate\Support\Facades\Storage;
99
use Illuminate\Support\Str;
1010
use Streaming\Representation;
11+
use Monolog\Handler\StreamHandler;
12+
use Monolog\Logger;
1113
/*
1214
|--------------------------------------------------------------------------
1315
| API Routes
@@ -77,10 +79,17 @@
7779
$r_480p = (new Representation)->setKiloBitrate(750)->setResize(854, 480);
7880
$r_720p = (new Representation)->setKiloBitrate(2048)->setResize(1280, 720);
7981
$r_1080p = (new Representation)->setKiloBitrate(4096)->setResize(1920, 1080);
80-
$ffmpeg = Streaming\FFMpeg::create([
81-
'ffmpeg.binaries' => '/usr/bin/ffmpeg',
82-
'ffprobe.binaries' => '/usr/bin/ffprobe'
83-
]);
82+
$fconfig = [
83+
'ffmpeg.binaries' => '/usr/bin/ffmpeg',
84+
'ffprobe.binaries' => '/usr/bin/ffprobe',
85+
'timeout' => 3600, // The timeout for the underlying process
86+
'ffmpeg.threads' => 2, // The number of threads that FFmpeg should use
87+
];
88+
89+
$log = new Logger('FFmpeg_Streaming');
90+
$log->pushHandler(new StreamHandler('/var/log/ffmpeg-streaming.log')); // path to log file
91+
92+
$ffmpeg = FFMpeg::create($fconfig, $log);
8493
$video = $ffmpeg->openFromCloud($from_s3);
8594
$video->dash()
8695
->setAdaption('id=0,streams=v id=1,streams=a') // Set the adaption.

0 commit comments

Comments
 (0)
0