small updates

This commit is contained in:
shimon
2023-05-14 10:30:29 +03:00
parent 767b5c8541
commit e28cbce5ee
3 changed files with 16 additions and 7 deletions
+10 -2
View File
@@ -9,6 +9,14 @@ return [
'width' => 640, //width resolution in px
'height' => 360, //height resolution in px
],
[
'name' => '480p',
'videoBitRate' => 2100,
'audioBitRate' => 64,
'width' => 854,
'height' => 480,
],
[
'name' => '576p',
'videoBitRate' => 2538,
@@ -17,14 +25,14 @@ return [
'height' => 576,
],
[
'name' => '1080p',
'name' => '720p',
'videoBitRate' => 3551,
'audioBitRate' => 128,
'width' => 1280,
'height' => 720,
],
[
'name' => '720p',
'name' => '1080p',
'videoBitRate' => 4800,
'audioBitRate' => 128,
'width' => 1920,
+1 -1
View File
@@ -907,7 +907,7 @@ App::setResource('project', function ($dbForConsole, $request, $console) {
/** @var Utopia\Database\Document $console */
$projectId = $request->getParam('project', $request->getHeader('x-appwrite-project', 'console'));
//$projectId = '645766aaac930ed0e90a';
$projectId = '645905a0594ef29a8680';
if ($projectId === 'console') {
return $console;
+5 -4
View File
@@ -111,7 +111,7 @@ class VideosV1 extends Worker
$this->ffprobe = FFProbe::create();
$this->ffmpeg = FFMpeg::create([
'timeout' => 0,
'ffmpeg.threads' => 12
'ffmpeg.threads' => 4
]);
if (!$this->ffprobe->isValid($this->inPath)) {
@@ -585,12 +585,13 @@ class VideosV1 extends Worker
$additionalParams = [
'-dn',
'-sn',
'-vf', 'scale=iw:-2:force_original_aspect_ratio=increase,setsar=1:1',
'-bf', '3',
'-vf', 'scale=iw:-2:force_original_aspect_ratio=increase,setsar=1:1', //keep frame size
'-crf', '22', // constant rate factor
'-bf', '3', // bframe
'-force_key_frames', 'expr:gte(t,n_forced*2)' //enforce strict key frame
];
$segmentSize = 8;
$segmentSize = 6;
if ($this->args['output'] === self::OUTPUT_DASH) {
$media->dash()
->setFormat($format)