subtitle lan code

This commit is contained in:
shimon
2023-03-13 20:35:39 +02:00
parent aa8334e7d8
commit 22b4555cc0
2 changed files with 7 additions and 4 deletions
+5 -2
View File
@@ -95,6 +95,10 @@ class TranscodingV1 extends Worker
$this->file = $this->database->getDocument('bucket_' . $this->bucket->getInternalId(), $this->video->getAttribute('fileId'));
$path = basename($this->file->getAttribute('path'));
$inPath = $this->inDir . $path;
/**
* Write original asset to tmp
*/
$result = $this->write($this->project, $this->file);
console::info('Transferring video from storage to ' . $this->inDir);
@@ -172,13 +176,12 @@ class TranscodingV1 extends Worker
foreach ($subtitles as $subtitle) {
$subtitle->setAttribute('status', self::STATUS_START);
$this->database->updateDocument('videos_subtitles', $subtitle->getId(), $subtitle);
$bucket = $this->database->getDocument('buckets', $subtitle->getAttribute('bucketId'));
$file = $this->database->getDocument('bucket_' . $bucket->getInternalId(), $subtitle->getAttribute('fileId'));
$path = basename($file->getAttribute('path'));
$this->write($this->project, $file);
console::info('Transferring subtitle from storage to [' . $this->inDir . ']');
console::info('Transferring subtitle from storage to ' . $this->inDir);
$ext = pathinfo($path, PATHINFO_EXTENSION);
$subtitlePath = $this->inDir . $subtitle->getId() . '.vtt';
Generated
+2 -2
View File
@@ -135,7 +135,7 @@
"source": {
"type": "git",
"url": "https://github.com/shimonewman/PHP-FFmpeg-video-streaming.git",
"reference": "fc1c0f4c9ce9b2136e4180f0012002c38e032728"
"reference": "aa5c1849cf95209901b7a7ea0f550d104b42fe6c"
},
"require": {
"php": "^7.2 || ^8.0",
@@ -209,7 +209,7 @@
"video-streaming",
"video-streaming"
],
"time": "2023-03-08T14:20:59+00:00"
"time": "2023-03-13T08:04:21+00:00"
},
{
"name": "appwrite/php-clamav",