Failed to load versions. Head to the versions page to see all versions for this model.
You're looking at a specific version of this model. Jump to the model overview.
fofr /video-to-frames:85c6b8da
Input
Run this model in Node.js with one line of code:
npm install replicate
REPLICATE_API_TOKEN
environment variable: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 fofr/video-to-frames using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"fofr/video-to-frames:85c6b8da087f3e6e27611811ce0f44c961e80af295ec1a6521fe7d9bc4bf7d6d",
{
input: {
fps: 1,
video: "https://replicate.delivery/pbxt/IyGrnQFpUDNQDt0Frbw6vRUTGqHjjYygsss9h1X7pmCmlh2I/output.mp4",
extract_all_frames: false
}
}
);
// To access the file URL:
console.log(output[0].url()); //=> "http://example.com"
// To write the file to disk:
fs.writeFile("my-image.png", output[0]);
To learn more, take a look at the guide on getting started with Node.js.
pip install replicate
REPLICATE_API_TOKEN
environment variable:export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
import replicate
Run fofr/video-to-frames using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"fofr/video-to-frames:85c6b8da087f3e6e27611811ce0f44c961e80af295ec1a6521fe7d9bc4bf7d6d",
input={
"fps": 1,
"video": "https://replicate.delivery/pbxt/IyGrnQFpUDNQDt0Frbw6vRUTGqHjjYygsss9h1X7pmCmlh2I/output.mp4",
"extract_all_frames": False
}
)
print(output)
To learn more, take a look at the guide on getting started with Python.
REPLICATE_API_TOKEN
environment variable:export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Run fofr/video-to-frames using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
curl -s -X POST \
-H "Authorization: Bearer $REPLICATE_API_TOKEN" \
-H "Content-Type: application/json" \
-H "Prefer: wait" \
-d $'{
"version": "fofr/video-to-frames:85c6b8da087f3e6e27611811ce0f44c961e80af295ec1a6521fe7d9bc4bf7d6d",
"input": {
"fps": 1,
"video": "https://replicate.delivery/pbxt/IyGrnQFpUDNQDt0Frbw6vRUTGqHjjYygsss9h1X7pmCmlh2I/output.mp4",
"extract_all_frames": false
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Output
{
"completed_at": "2023-06-09T13:17:38.167555Z",
"created_at": "2023-06-09T13:17:33.823088Z",
"data_removed": false,
"error": null,
"id": "pzxq6yh6djfsljmeep7ibpoz6q",
"input": {
"fps": 1,
"video": "https://replicate.delivery/pbxt/IyGrnQFpUDNQDt0Frbw6vRUTGqHjjYygsss9h1X7pmCmlh2I/output.mp4"
},
"logs": "ffmpeg version 4.3.6-0+deb11u1 Copyright (c) 2000-2023 the FFmpeg developers\nbuilt with gcc 10 (Debian 10.2.1-6)\nconfiguration: --prefix=/usr --extra-version=0+deb11u1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libdav1d --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-pocketsphinx --enable-libmfx --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared\nlibavutil 56. 51.100 / 56. 51.100\nlibavcodec 58. 91.100 / 58. 91.100\nlibavformat 58. 45.100 / 58. 45.100\nlibavdevice 58. 10.100 / 58. 10.100\nlibavfilter 7. 85.100 / 7. 85.100\nlibavresample 4. 0. 0 / 4. 0. 0\nlibswscale 5. 7.100 / 5. 7.100\nlibswresample 3. 7.100 / 3. 7.100\nlibpostproc 55. 7.100 / 55. 7.100\nInput #0, mov,mp4,m4a,3gp,3g2,mj2, from '/tmp/tmpdapai8saoutput.mp4':\nMetadata:\nmajor_brand : isom\nminor_version : 512\ncompatible_brands: isomiso2avc1mp41\nencoder : Lavf59.27.100\nDuration: 00:00:10.58, start: 0.000000, bitrate: 149 kb/s\nStream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709), 512x512, 147 kb/s, 12 fps, 12 tbr, 12288 tbn, 24 tbc (default)\nMetadata:\nhandler_name : Core Media Video\nencoder : Lavc59.37.100 libx264\nStream mapping:\nStream #0:0 -> #0:0 (h264 (native) -> png (native))\nPress [q] to stop, [?] for help\nOutput #0, image2, to '/tmp/frames/out%03d.png':\nMetadata:\nmajor_brand : isom\nminor_version : 512\ncompatible_brands: isomiso2avc1mp41\nencoder : Lavf58.45.100\nStream #0:0(und): Video: png, rgb24, 512x512, q=2-31, 200 kb/s, 1 fps, 1 tbn, 1 tbc (default)\nMetadata:\nhandler_name : Core Media Video\nencoder : Lavc58.91.100 png\nframe= 11 fps=0.0 q=-0.0 Lsize=N/A time=00:00:11.00 bitrate=N/A speed=82.4x\nvideo:1208kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown",
"metrics": {
"predict_time": 2.364724,
"total_time": 4.344467
},
"output": [
"https://replicate.delivery/pbxt/Pal2KnlXrZpyGpBgLeXiXFIJLWfcFEQ8nQbfVoWTK2FgDbIiA/out001.png",
"https://replicate.delivery/pbxt/54aqU9dVK94dM9p2ojtR5kWZIVdBsEM2yHfe7LCjd2pwhNERA/out002.png",
"https://replicate.delivery/pbxt/Cw3LBsqxAG57H9Gy1yx46yRp1AzE4T1zMFelJVlyZ3J4wGiIA/out003.png",
"https://replicate.delivery/pbxt/OQnUkDr1TmIjFdZ7Irp7erxeZEVIuKaUL0pQxxspZCzwhNERA/out004.png",
"https://replicate.delivery/pbxt/f96M2hdx0pX5EqJM24r7BIhguAXZuPIw9fcHzMKksqUwhNERA/out005.png",
"https://replicate.delivery/pbxt/F0x6e2PWbdRXFqZNG4eslXfv7Syjb3XJKIqTDMxtfViHH2QEB/out006.png",
"https://replicate.delivery/pbxt/fvYEGZgo782NfkSZ8GcfpaZbfZEnuYjXVUkf08sdrNcMOshIC/out007.png",
"https://replicate.delivery/pbxt/BqkFUWSdFjYZK9LuD1mW1xxpHFnySXxzeKTfV5VpFUOxhNERA/out008.png",
"https://replicate.delivery/pbxt/IeQJZ60ruLQJFiKjmQWIfsqKladhqKDc1eyT8TYt9jYjDbIiA/out009.png",
"https://replicate.delivery/pbxt/5RfCpAVanOyQDKS7Ou9ZAyEkTXGRXi77mHW2wLVBIjr4wGiIA/out010.png",
"https://replicate.delivery/pbxt/L87eB0rwbMxZfUul6uhDKPzffv0GSvWk4NAoGVS4YwZHH2QEB/out011.png"
],
"started_at": "2023-06-09T13:17:35.802831Z",
"status": "succeeded",
"urls": {
"get": "https://api.replicate.com/v1/predictions/pzxq6yh6djfsljmeep7ibpoz6q",
"cancel": "https://api.replicate.com/v1/predictions/pzxq6yh6djfsljmeep7ibpoz6q/cancel"
},
"version": "85c6b8da087f3e6e27611811ce0f44c961e80af295ec1a6521fe7d9bc4bf7d6d"
}
ffmpeg version 4.3.6-0+deb11u1 Copyright (c) 2000-2023 the FFmpeg developers
built with gcc 10 (Debian 10.2.1-6)
configuration: --prefix=/usr --extra-version=0+deb11u1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libdav1d --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-pocketsphinx --enable-libmfx --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
libavutil 56. 51.100 / 56. 51.100
libavcodec 58. 91.100 / 58. 91.100
libavformat 58. 45.100 / 58. 45.100
libavdevice 58. 10.100 / 58. 10.100
libavfilter 7. 85.100 / 7. 85.100
libavresample 4. 0. 0 / 4. 0. 0
libswscale 5. 7.100 / 5. 7.100
libswresample 3. 7.100 / 3. 7.100
libpostproc 55. 7.100 / 55. 7.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/tmp/tmpdapai8saoutput.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf59.27.100
Duration: 00:00:10.58, start: 0.000000, bitrate: 149 kb/s
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709), 512x512, 147 kb/s, 12 fps, 12 tbr, 12288 tbn, 24 tbc (default)
Metadata:
handler_name : Core Media Video
encoder : Lavc59.37.100 libx264
Stream mapping:
Stream #0:0 -> #0:0 (h264 (native) -> png (native))
Press [q] to stop, [?] for help
Output #0, image2, to '/tmp/frames/out%03d.png':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf58.45.100
Stream #0:0(und): Video: png, rgb24, 512x512, q=2-31, 200 kb/s, 1 fps, 1 tbn, 1 tbc (default)
Metadata:
handler_name : Core Media Video
encoder : Lavc58.91.100 png
frame= 11 fps=0.0 q=-0.0 Lsize=N/A time=00:00:11.00 bitrate=N/A speed=82.4x
video:1208kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown