@muhkoo/theater-transcoder 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +8 -2
- package/src/worker.js +4 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@muhkoo/theater-transcoder",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "Drain a Muhkoo Theater transcode queue with NATIVE ffmpeg. Run it on any machine signed in as you to add transcoding power to your library.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -14,7 +14,13 @@
|
|
|
14
14
|
"node": ">=20"
|
|
15
15
|
},
|
|
16
16
|
"license": "MIT",
|
|
17
|
-
"keywords": [
|
|
17
|
+
"keywords": [
|
|
18
|
+
"muhkoo",
|
|
19
|
+
"transcode",
|
|
20
|
+
"ffmpeg",
|
|
21
|
+
"hls",
|
|
22
|
+
"worker"
|
|
23
|
+
],
|
|
18
24
|
"publishConfig": {
|
|
19
25
|
"access": "public"
|
|
20
26
|
},
|
package/src/worker.js
CHANGED
|
@@ -69,7 +69,10 @@ export function startWorker({ client, space, appKey, baseUrl }) {
|
|
|
69
69
|
};
|
|
70
70
|
try {
|
|
71
71
|
log(`claim job ${job._id} "${job.title}" — downloading raw…`);
|
|
72
|
-
|
|
72
|
+
// The DB json column can hand back the manifest as a STRING — parse it, or
|
|
73
|
+
// readByManifest chokes ("manifest.chunks is not iterable").
|
|
74
|
+
const manifest = typeof job.input_manifest === "string" ? JSON.parse(job.input_manifest) : job.input_manifest;
|
|
75
|
+
const { data } = await client.storage.readByManifest(manifest);
|
|
73
76
|
log(`transcoding ${(data.length / 1e6).toFixed(1)}MB…`);
|
|
74
77
|
const { hls_index, duration, size } = await transcodeToHls({
|
|
75
78
|
rawBytes: data, filename: job.filename || "input.mp4", space, onProgress, signal: abort.signal,
|