From 64022eec353956175fa14c5fd9a49d1fadab8df9 Mon Sep 17 00:00:00 2001 From: Caleb Mazalevskis Date: Sun, 4 Aug 2024 12:20:48 +0800 Subject: [PATCH] Fix typos. --- README.md | 2 +- index.php | 2 +- objects/ServerMonitor.php | 14 ++++---- objects/functions.php | 20 ++++++------ .../server/php/UploadHandler.php | 4 +-- view/releaseDate.php | 32 +++++++++---------- view/watermark.php | 10 +++--- 7 files changed, 42 insertions(+), 42 deletions(-) diff --git a/README.md b/README.md index 88b795e52..e7eb955ac 100644 --- a/README.md +++ b/README.md @@ -81,7 +81,7 @@ In order for you to be able to run AVideo, there are certain tools that need to # What is new on this version? Since version 4.x+ we separate the streamer website from the encoder website, so that we can distribute the application on different servers. - The Streamer site, is the main front end and has as main function to attend the visitors of the site, through a layout based on the youtube experience, you can host the streamer site in any common internet host can host it (Windows or Linux). -- The Encoder site, will be better than the original encoder, the new encoder will be in charge of managing a media encoding queue. You can Donwload the encoder here: https://github.com/WWBN/AVideo-Encoder. but to install it you will need ssh access to your server, usually only VPS servers give you that kind of access, that code uses commands that use the Linux shell and consume more CPU. +- The Encoder site, will be better than the original encoder, the new encoder will be in charge of managing a media encoding queue. You can download the encoder here: https://github.com/WWBN/AVideo-Encoder. but to install it you will need ssh access to your server, usually only VPS servers give you that kind of access, that code uses commands that use the Linux shell and consume more CPU. - I will have to install the encoder and the streamer? No. We will be providing a public encoder, we will build the encoder in such a way that several streamers can use the same encoder. We are also providing source code for this, so you can install it internally and manage your own encoding priority. diff --git a/index.php b/index.php index 350fa33e9..94fddb311 100644 --- a/index.php +++ b/index.php @@ -73,7 +73,7 @@

Error. Oops you've encountered an error

- It appears that either something went wrong or the mod rewrite configration is not correct.
+ It appears that either something went wrong or the mod rewrite configuration is not correct.

We need to allow Apache to read .htaccess files located under the directory. diff --git a/objects/ServerMonitor.php b/objects/ServerMonitor.php index f0f3ac092..108be03de 100644 --- a/objects/ServerMonitor.php +++ b/objects/ServerMonitor.php @@ -7,7 +7,7 @@ public static function getMemoryLinux($obj) $obj->command = "free"; exec($obj->command . " 2>&1", $output, $return_val); if ($return_val !== 0) { - $obj->error = "Get Memmory ERROR** " . print_r($output, true); + $obj->error = "Get Memory ERROR** " . print_r($output, true); } else { $obj->output = $output; @@ -16,7 +16,7 @@ public static function getMemoryLinux($obj) $obj->memUsedBytes = $match[2]*1024; $obj->memFreeBytes = $match[3]*1024; } else { - $obj->error = "Get Memmory ERROR** " . print_r($output, true); + $obj->error = "Get Memory ERROR** " . print_r($output, true); } } return $obj; @@ -27,17 +27,17 @@ public static function getMemoryNetBSD($obj) $obj->command = "/sbin/sysctl hw.pagesize; /usr/bin/vmstat -t"; exec($obj->command . " 2>&1", $output, $return_val); if ($return_val !== 0) { - $obj->error = "Get Memmory ERROR** (".$obj->command." failed)"; + $obj->error = "Get Memory ERROR** (".$obj->command." failed)"; } else { $obj->output = $output; $parts = explode(" = ", $output[0]); if ($parts[0] != "hw.pagesize") { - $obj->error = "Get Memmory ERROR** (unknown page size)"; + $obj->error = "Get Memory ERROR** (unknown page size)"; } elseif (($match = preg_split("/ +/", trim($output[3]))) === false) { - $obj->error = "Get Memmory ERROR** (unepxected vmstat output)"; + $obj->error = "Get Memory ERROR** (unepxected vmstat output)"; } elseif (!is_numeric($match[4]) || !is_numeric($match[5]) || !is_numeric($match[11])) { - $obj->error = "Get Memmory ERROR** (non numeric memory size?)"; + $obj->error = "Get Memory ERROR** (non numeric memory size?)"; } else { $page_size = $parts[1]; $obj->memTotalBytes = $match[4] * $page_size; @@ -60,7 +60,7 @@ public static function getMemory() $getMemoryOsFunction = "getMemory" . $os; if (!method_exists("ServerMonitor", $getMemoryOsFunction)) { - $obj->error = "Get Memmory error: ".$os." not supported"; + $obj->error = "Get Memory error: ".$os." not supported"; } else { $obj = ServerMonitor::$getMemoryOsFunction($obj); } diff --git a/objects/functions.php b/objects/functions.php index 68d5418ee..c8f7cfa5b 100644 --- a/objects/functions.php +++ b/objects/functions.php @@ -37,9 +37,9 @@ function get_ffmpeg($ignoreGPU = false) return $ffmpeg . $complement; } -function getFFmpegScaleToForceOriginalAspectRatio($width, $heigth) +function getFFmpegScaleToForceOriginalAspectRatio($width, $height) { - return "scale={$width}:{$heigth}:force_original_aspect_ratio=decrease,pad={$width}:{$heigth}:-1:-1:color=black"; + return "scale={$width}:{$height}:force_original_aspect_ratio=decrease,pad={$width}:{$height}:-1:-1:color=black"; } function replaceFFMPEG($cmd) @@ -330,32 +330,32 @@ function getURLToApplication() function check_max_execution_time() { $max_size = ini_get('max_execution_time'); - $recomended_size = 7200; - return !($recomended_size > $max_size); + $recommended_size = 7200; + return !($recommended_size > $max_size); } //post_max_size = 100M function check_post_max_size() { $max_size = parse_size(ini_get('post_max_size')); - $recomended_size = parse_size('100M'); - return !($recomended_size > $max_size); + $recommended_size = parse_size('100M'); + return !($recommended_size > $max_size); } //upload_max_filesize = 100M function check_upload_max_filesize() { $max_size = parse_size(ini_get('upload_max_filesize')); - $recomended_size = parse_size('100M'); - return !($recomended_size > $max_size); + $recommended_size = parse_size('100M'); + return !($recommended_size > $max_size); } //memory_limit = 100M function check_memory_limit() { $max_size = parse_size(ini_get('memory_limit')); - $recomended_size = parse_size('512M'); - return !($recomended_size > $max_size); + $recommended_size = parse_size('512M'); + return !($recommended_size > $max_size); } function check_mysqlnd() diff --git a/view/jquery-file-upload/server/php/UploadHandler.php b/view/jquery-file-upload/server/php/UploadHandler.php index 2d2aed7dd..3a6fd3a19 100644 --- a/view/jquery-file-upload/server/php/UploadHandler.php +++ b/view/jquery-file-upload/server/php/UploadHandler.php @@ -1477,7 +1477,7 @@ public function delete($print_response = true) { } protected function basename($filepath, $suffix = '') { - $splited = preg_split('/\//', rtrim ($filepath, '/ ')); - return substr(basename('X'.$splited[count($splited)-1], $suffix), 1); + $split = preg_split('/\//', rtrim ($filepath, '/ ')); + return substr(basename('X' . $split[count($split) - 1], $suffix), 1); } } diff --git a/view/releaseDate.php b/view/releaseDate.php index b0619b4ca..85e848c90 100644 --- a/view/releaseDate.php +++ b/view/releaseDate.php @@ -21,50 +21,50 @@ " . __($value) . ""; } ?> " . __($value[0]) . ""; } ?> " . __($value[0]) . ""; } ?> " . __($value[0]) . ""; } ?> diff --git a/view/watermark.php b/view/watermark.php index db4ab09c1..6772efa47 100644 --- a/view/watermark.php +++ b/view/watermark.php @@ -4,7 +4,7 @@ $watermark_color = "yellow"; $watermark_opacity = 0.5; $hls_time = 10; -$skippFirstSegments = 30; // 5 min +$skipFirstSegments = 30; // 5 min $max_process_at_the_same_time = 5; $encrypt = false; // if enable encryption it fails to play, probably an error on .ts timestamp //$downloadCodec = " -c:v libx264 -acodec copy "; @@ -679,10 +679,10 @@ function getAllTSFilesInDir($dir) { } function getRandomSymlinkTSFileArray($dir, $total) { - global $skippFirstSegments; + global $skipFirstSegments; $totalTSFiles = getTotalTSFilesInDir($dir); error_log("getRandomSymlinkTSFileArray: ($totalTSFiles) ($total) {$dir}"); - $firstfile = sprintf('%03d.ts', $skippFirstSegments); + $firstfile = sprintf('%03d.ts', $skipFirstSegments); if (!file_exists("{$dir}/{$firstfile}")) { $firstfile = "000.ts"; } @@ -706,8 +706,8 @@ function getRandomSymlinkTSFileArray($dir, $total) { } function createFirstSegment() { - global $skippFirstSegments, $outputPath, $localFileDownloadDir; - $firstfile = sprintf('%03d.ts', $skippFirstSegments); + global $skipFirstSegments, $outputPath, $localFileDownloadDir; + $firstfile = sprintf('%03d.ts', $skipFirstSegments); $inputHLS_ts = "{$localFileDownloadDir}/{$firstfile}"; if (!file_exists($inputHLS_ts)) { $firstfile = "000.ts";