Spaces:
Paused
Paused
Download src/scheduler/readVideoMetadataFile.mts from jbilcke-hf/VideoChain-API: direct link, hf CLI and curl.
- Browser
- Download file 288 Bytes
-
https://huggingface.co/spaces/jbilcke-hf/VideoChain-API/resolve/cd4ee95e1e76fb32012ff8216dcaad5839176a8a/src/scheduler/readVideoMetadataFile.mts
- Command line
-
hf download hf://spaces/jbilcke-hf/VideoChain-API@cd4ee95e1e76fb32012ff8216dcaad5839176a8a/src/scheduler/readVideoMetadataFile.mts
-
curl -L -o readVideoMetadataFile.mts https://huggingface.co/spaces/jbilcke-hf/VideoChain-API/resolve/cd4ee95e1e76fb32012ff8216dcaad5839176a8a/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 | |
| } | |