Download src/scheduler/readVideoMetadataFile.mts from Plurigrid/unchained: direct link, hf CLI and curl.
- Browser
- Download file 288 Bytes
-
https://huggingface.co/spaces/Plurigrid/unchained/resolve/main/src/scheduler/readVideoMetadataFile.mts
- Command line
-
hf download hf://spaces/Plurigrid/unchained/src/scheduler/readVideoMetadataFile.mts
-
curl -L -o readVideoMetadataFile.mts https://huggingface.co/spaces/Plurigrid/unchained/resolve/main/src/scheduler/readVideoMetadataFile.mts
288 Bytes
| import { promises as fs } from "node:fs" | |
| import { Video } from "../types.mts" | |
| export const readVideoMetadataFile = async (videoMetadataFilePath: string): Promise<Video> => { | |
| const video = JSON.parse( | |
| await fs.readFile(videoMetadataFilePath, 'utf8') | |
| ) as Video | |
| return video | |
| } | |