提取视频中的图片
Input video file
Progress percentage (0-100)
Default: 50
Run this model in Node.js with one line of code:
npm install replicate
REPLICATE_API_TOKEN
export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
import Replicate from "replicate"; import fs from "node:fs"; const replicate = new Replicate({ auth: process.env.REPLICATE_API_TOKEN, });
Run hexiaochun/video2img using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "hexiaochun/video2img:bbdd539be788f2f31e9b52ab2bf1e1122b5f8248daba017ba6925a2519a98d68", { input: { video: "https://coze-tmp-file.oss-cn-shenzhen.aliyuncs.com/2024-06-06/test.mp4", percentage: 64 } } ); // To access the file URL: console.log(output.url()); //=> "http://example.com" // To write the file to disk: fs.writeFile("my-image.png", output);
To learn more, take a look at the guide on getting started with Node.js.
pip install replicate
import replicate
output = replicate.run( "hexiaochun/video2img:bbdd539be788f2f31e9b52ab2bf1e1122b5f8248daba017ba6925a2519a98d68", input={ "video": "https://coze-tmp-file.oss-cn-shenzhen.aliyuncs.com/2024-06-06/test.mp4", "percentage": 64 } ) print(output)
To learn more, take a look at the guide on getting started with Python.
curl -s -X POST \ -H "Authorization: Bearer $REPLICATE_API_TOKEN" \ -H "Content-Type: application/json" \ -H "Prefer: wait" \ -d $'{ "version": "hexiaochun/video2img:bbdd539be788f2f31e9b52ab2bf1e1122b5f8248daba017ba6925a2519a98d68", "input": { "video": "https://coze-tmp-file.oss-cn-shenzhen.aliyuncs.com/2024-06-06/test.mp4", "percentage": 64 } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
{ "completed_at": "2024-08-21T06:34:19.361711Z", "created_at": "2024-08-21T06:33:24.691000Z", "data_removed": false, "error": null, "id": "fhk0a86xtdrge0cheehth2c31w", "input": { "video": "https://coze-tmp-file.oss-cn-shenzhen.aliyuncs.com/2024-06-06/test.mp4", "percentage": 64 }, "logs": null, "metrics": { "predict_time": 3.255977772, "total_time": 54.670711 }, "output": "https://replicate.delivery/czjl/j9mjSMew7TyzOaTYGcZUvfy3zZUDXoFWDhlzkxyeIdbWjnpmA/0cd2fe2c-d884-4b68-a4af-7d32ffcdb714.jpg", "started_at": "2024-08-21T06:34:16.105733Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/fhk0a86xtdrge0cheehth2c31w", "cancel": "https://api.replicate.com/v1/predictions/fhk0a86xtdrge0cheehth2c31w/cancel" }, "version": "bbdd539be788f2f31e9b52ab2bf1e1122b5f8248daba017ba6925a2519a98d68" }
View more examples
This model runs on CPU hardware. We don't yet have enough runs of this model to provide performance information.
This model doesn't have a readme.
输入图片和音频合并关键帧视频
minicpm 视频理解
图文识别
提取视频中的音频
视频合并
视频识别自动分割场景
视频转换工具包
This model is cold. You'll get a fast response if the model is warm and already running, and a slower response if the model is cold and starting up.
This model runs on CPU hardware which costs $0.0001 per second. View more.
Choose a file from your machine
Hint: you can also drag files onto the input