481 lines
24 KiB
JSON
481 lines
24 KiB
JSON
{
|
||
"url": "https://replicate.com/fofr/toolkit",
|
||
"owner": "fofr",
|
||
"name": "toolkit",
|
||
"description": "Video toolkit – convert, make GIFs, extract audio",
|
||
"visibility": "public",
|
||
"github_url": "https://github.com/fofr/cog-cpu-toolkit",
|
||
"paper_url": null,
|
||
"license_url": "https://github.com/fofr/cog-cpu-toolkit/blob/main/LICENSE",
|
||
"run_count": 0,
|
||
"cover_image_url": "https://tjzk.replicate.delivery/models_models_cover_image/f357612c-ef1c-4a61-94a4-8f02717a51a1/toolkit-cover.jpg",
|
||
"default_example": {
|
||
"id": "43ems6bbbt5czcn2ktxe4xjtc4",
|
||
"model": "fofr/toolkit",
|
||
"version": "13d8a443e688f30e85af80d42b055e950a3c880842416c4ba61b7190b1fe51e8",
|
||
"status": "succeeded",
|
||
"input": {
|
||
"fps": 0,
|
||
"task": "convert_input_to_gif",
|
||
"input_file": "https://replicate.delivery/pbxt/K4PoZN3Q6JIiG61inQLKTxIYVpOVoAYCfxwQksNGTfnmGLUf/video%20(2).mp4"
|
||
},
|
||
"output": [
|
||
"https://replicate.delivery/pbxt/QiMxG3cT8poUNJriq4LwebTXijrcUigRpBG6HAiqnCnfFfGkA/video.gif"
|
||
],
|
||
"logs": "Running ffmpeg command: ffmpeg -i /tmp/tmpgyow6svvvideo (2).mp4 -pix_fmt yuv420p -vf fps=12,scale=512:-1:flags=lanczos -c:v gif /tmp/outputs/video.gif\nffmpeg version 5.1.4-0+deb12u1 Copyright (c) 2000-2023 the FFmpeg developers\nbuilt with gcc 12 (Debian 12.2.0-14)\nconfiguration: --prefix=/usr --extra-version=0+deb12u1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --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-libglslang --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq --enable-librist --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzimg --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --disable-sndio --enable-libjxl --enable-pocketsphinx --enable-librsvg --enable-libmfx --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-libplacebo --enable-librav1e --enable-shared\nlibavutil 57. 28.100 / 57. 28.100\nlibavcodec 59. 37.100 / 59. 37.100\nlibavformat 59. 27.100 / 59. 27.100\nlibavdevice 59. 7.100 / 59. 7.100\nlibavfilter 8. 44.100 / 8. 44.100\nlibswscale 6. 7.100 / 6. 7.100\nlibswresample 4. 7.100 / 4. 7.100\nlibpostproc 56. 6.100 / 56. 6.100\nInput #0, mov,mp4,m4a,3gp,3g2,mj2, from '/tmp/tmpgyow6svvvideo (2).mp4':\nMetadata:\nmajor_brand : isom\nminor_version : 512\ncompatible_brands: isomiso2avc1mp41\nencoder : Lavf59.27.100\nDuration: 00:00:03.38, start: 0.000000, bitrate: 1631 kb/s\nStream #0:0[0x1](eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709, progressive), 1920x1080 [SAR 1:1 DAR 16:9], 1465 kb/s, 23.98 fps, 23.98 tbr, 24k tbn (default)\nMetadata:\nhandler_name : Core Media Video\nvendor_id : [0][0][0][0]\nencoder : Lavc59.37.100 libx264\nStream #0:1[0x2](eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 157 kb/s (default)\nMetadata:\nhandler_name : Core Media Audio\nvendor_id : [0][0][0][0]\nStream mapping:\nStream #0:0 -> #0:0 (h264 (native) -> gif (native))\nPress [q] to stop, [?] for help\nIncompatible pixel format 'yuv420p' for codec 'gif', auto-selecting format 'bgr8'\nOutput #0, gif, to '/tmp/outputs/video.gif':\nMetadata:\nmajor_brand : isom\nminor_version : 512\ncompatible_brands: isomiso2avc1mp41\nencoder : Lavf59.27.100\nStream #0:0(eng): Video: gif, bgr8(pc, gbr/bt709/bt709, progressive), 512x288 [SAR 1:1 DAR 16:9], q=2-31, 200 kb/s, 12 fps, 100 tbn (default)\nMetadata:\nhandler_name : Core Media Video\nvendor_id : [0][0][0][0]\nencoder : Lavc59.37.100 gif\nframe= 1 fps=0.0 q=-0.0 size= 0kB time=00:00:00.01 bitrate= 0.0kbits/s speed=0.128x\nframe= 41 fps=0.0 q=-0.0 Lsize= 622kB time=00:00:03.34 bitrate=1525.6kbits/s speed=8.68x\nvideo:622kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.003140%",
|
||
"error": null,
|
||
"metrics": {
|
||
"predict_time": 1.456677,
|
||
"total_time": 1.471223
|
||
},
|
||
"created_at": "2023-12-18T12:47:58.510153Z",
|
||
"started_at": "2023-12-18T12:47:58.524699Z",
|
||
"completed_at": "2023-12-18T12:47:59.981376Z",
|
||
"urls": {
|
||
"get": "https://api.replicate.com/v1/predictions/43ems6bbbt5czcn2ktxe4xjtc4",
|
||
"cancel": "https://api.replicate.com/v1/predictions/43ems6bbbt5czcn2ktxe4xjtc4/cancel"
|
||
}
|
||
},
|
||
"latest_version": {
|
||
"id": "19711d11c243800f08364ba9ae9078f54874f21363ba445dabdbf082b5d69565",
|
||
"created_at": "2024-01-09T11:20:21.732230+00:00",
|
||
"cog_version": "0.8.6",
|
||
"openapi_schema": {
|
||
"info": {
|
||
"title": "Cog",
|
||
"version": "0.1.0"
|
||
},
|
||
"paths": {
|
||
"/": {
|
||
"get": {
|
||
"summary": "Root",
|
||
"responses": {
|
||
"200": {
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"title": "Response Root Get"
|
||
}
|
||
}
|
||
},
|
||
"description": "Successful Response"
|
||
}
|
||
},
|
||
"operationId": "root__get"
|
||
}
|
||
},
|
||
"/shutdown": {
|
||
"post": {
|
||
"summary": "Start Shutdown",
|
||
"responses": {
|
||
"200": {
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"title": "Response Start Shutdown Shutdown Post"
|
||
}
|
||
}
|
||
},
|
||
"description": "Successful Response"
|
||
}
|
||
},
|
||
"operationId": "start_shutdown_shutdown_post"
|
||
}
|
||
},
|
||
"/predictions": {
|
||
"post": {
|
||
"summary": "Predict",
|
||
"responses": {
|
||
"200": {
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"$ref": "#/components/schemas/PredictionResponse"
|
||
}
|
||
}
|
||
},
|
||
"description": "Successful Response"
|
||
},
|
||
"422": {
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"$ref": "#/components/schemas/HTTPValidationError"
|
||
}
|
||
}
|
||
},
|
||
"description": "Validation Error"
|
||
}
|
||
},
|
||
"parameters": [
|
||
{
|
||
"in": "header",
|
||
"name": "prefer",
|
||
"schema": {
|
||
"type": "string",
|
||
"title": "Prefer"
|
||
},
|
||
"required": false
|
||
}
|
||
],
|
||
"description": "Run a single prediction on the model",
|
||
"operationId": "predict_predictions_post",
|
||
"requestBody": {
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"$ref": "#/components/schemas/PredictionRequest"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/health-check": {
|
||
"get": {
|
||
"summary": "Healthcheck",
|
||
"responses": {
|
||
"200": {
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"title": "Response Healthcheck Health Check Get"
|
||
}
|
||
}
|
||
},
|
||
"description": "Successful Response"
|
||
}
|
||
},
|
||
"operationId": "healthcheck_health_check_get"
|
||
}
|
||
},
|
||
"/predictions/{prediction_id}": {
|
||
"put": {
|
||
"summary": "Predict Idempotent",
|
||
"responses": {
|
||
"200": {
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"$ref": "#/components/schemas/PredictionResponse"
|
||
}
|
||
}
|
||
},
|
||
"description": "Successful Response"
|
||
},
|
||
"422": {
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"$ref": "#/components/schemas/HTTPValidationError"
|
||
}
|
||
}
|
||
},
|
||
"description": "Validation Error"
|
||
}
|
||
},
|
||
"parameters": [
|
||
{
|
||
"in": "path",
|
||
"name": "prediction_id",
|
||
"schema": {
|
||
"type": "string",
|
||
"title": "Prediction ID"
|
||
},
|
||
"required": true
|
||
},
|
||
{
|
||
"in": "header",
|
||
"name": "prefer",
|
||
"schema": {
|
||
"type": "string",
|
||
"title": "Prefer"
|
||
},
|
||
"required": false
|
||
}
|
||
],
|
||
"description": "Run a single prediction on the model (idempotent creation).",
|
||
"operationId": "predict_idempotent_predictions__prediction_id__put",
|
||
"requestBody": {
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/components/schemas/PredictionRequest"
|
||
}
|
||
],
|
||
"title": "Prediction Request"
|
||
}
|
||
}
|
||
},
|
||
"required": true
|
||
}
|
||
}
|
||
},
|
||
"/predictions/{prediction_id}/cancel": {
|
||
"post": {
|
||
"summary": "Cancel",
|
||
"responses": {
|
||
"200": {
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"title": "Response Cancel Predictions Prediction Id Cancel Post"
|
||
}
|
||
}
|
||
},
|
||
"description": "Successful Response"
|
||
},
|
||
"422": {
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"$ref": "#/components/schemas/HTTPValidationError"
|
||
}
|
||
}
|
||
},
|
||
"description": "Validation Error"
|
||
}
|
||
},
|
||
"parameters": [
|
||
{
|
||
"in": "path",
|
||
"name": "prediction_id",
|
||
"schema": {
|
||
"type": "string",
|
||
"title": "Prediction ID"
|
||
},
|
||
"required": true
|
||
}
|
||
],
|
||
"description": "Cancel a running prediction",
|
||
"operationId": "cancel_predictions__prediction_id__cancel_post"
|
||
}
|
||
}
|
||
},
|
||
"openapi": "3.0.2",
|
||
"components": {
|
||
"schemas": {
|
||
"task": {
|
||
"enum": [
|
||
"convert_input_to_mp4",
|
||
"convert_input_to_gif",
|
||
"extract_video_audio_as_mp3",
|
||
"zipped_frames_to_mp4",
|
||
"zipped_frames_to_gif",
|
||
"extract_frames_from_input",
|
||
"reverse_video",
|
||
"bounce_video"
|
||
],
|
||
"type": "string",
|
||
"title": "task",
|
||
"description": "An enumeration."
|
||
},
|
||
"Input": {
|
||
"type": "object",
|
||
"title": "Input",
|
||
"required": [
|
||
"task",
|
||
"input_file"
|
||
],
|
||
"properties": {
|
||
"fps": {
|
||
"type": "integer",
|
||
"title": "Fps",
|
||
"default": 0,
|
||
"x-order": 2,
|
||
"description": "frames per second, if relevant. Use 0 to keep original fps (or use default). Converting to GIF defaults to 12fps"
|
||
},
|
||
"task": {
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/components/schemas/task"
|
||
}
|
||
],
|
||
"x-order": 0,
|
||
"description": "Task to perform"
|
||
},
|
||
"input_file": {
|
||
"type": "string",
|
||
"title": "Input File",
|
||
"format": "uri",
|
||
"x-order": 1,
|
||
"description": "File – zip, image or video to process"
|
||
}
|
||
}
|
||
},
|
||
"Output": {
|
||
"type": "array",
|
||
"items": {
|
||
"type": "string",
|
||
"format": "uri"
|
||
},
|
||
"title": "Output"
|
||
},
|
||
"Status": {
|
||
"enum": [
|
||
"starting",
|
||
"processing",
|
||
"succeeded",
|
||
"canceled",
|
||
"failed"
|
||
],
|
||
"type": "string",
|
||
"title": "Status",
|
||
"description": "An enumeration."
|
||
},
|
||
"WebhookEvent": {
|
||
"enum": [
|
||
"start",
|
||
"output",
|
||
"logs",
|
||
"completed"
|
||
],
|
||
"type": "string",
|
||
"title": "WebhookEvent",
|
||
"description": "An enumeration."
|
||
},
|
||
"ValidationError": {
|
||
"type": "object",
|
||
"title": "ValidationError",
|
||
"required": [
|
||
"loc",
|
||
"msg",
|
||
"type"
|
||
],
|
||
"properties": {
|
||
"loc": {
|
||
"type": "array",
|
||
"items": {
|
||
"anyOf": [
|
||
{
|
||
"type": "string"
|
||
},
|
||
{
|
||
"type": "integer"
|
||
}
|
||
]
|
||
},
|
||
"title": "Location"
|
||
},
|
||
"msg": {
|
||
"type": "string",
|
||
"title": "Message"
|
||
},
|
||
"type": {
|
||
"type": "string",
|
||
"title": "Error Type"
|
||
}
|
||
}
|
||
},
|
||
"PredictionRequest": {
|
||
"type": "object",
|
||
"title": "PredictionRequest",
|
||
"properties": {
|
||
"id": {
|
||
"type": "string",
|
||
"title": "Id"
|
||
},
|
||
"input": {
|
||
"$ref": "#/components/schemas/Input"
|
||
},
|
||
"webhook": {
|
||
"type": "string",
|
||
"title": "Webhook",
|
||
"format": "uri",
|
||
"maxLength": 65536,
|
||
"minLength": 1
|
||
},
|
||
"created_at": {
|
||
"type": "string",
|
||
"title": "Created At",
|
||
"format": "date-time"
|
||
},
|
||
"output_file_prefix": {
|
||
"type": "string",
|
||
"title": "Output File Prefix"
|
||
},
|
||
"webhook_events_filter": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/components/schemas/WebhookEvent"
|
||
},
|
||
"default": [
|
||
"start",
|
||
"output",
|
||
"logs",
|
||
"completed"
|
||
]
|
||
}
|
||
}
|
||
},
|
||
"PredictionResponse": {
|
||
"type": "object",
|
||
"title": "PredictionResponse",
|
||
"properties": {
|
||
"id": {
|
||
"type": "string",
|
||
"title": "Id"
|
||
},
|
||
"logs": {
|
||
"type": "string",
|
||
"title": "Logs",
|
||
"default": ""
|
||
},
|
||
"error": {
|
||
"type": "string",
|
||
"title": "Error"
|
||
},
|
||
"input": {
|
||
"$ref": "#/components/schemas/Input"
|
||
},
|
||
"output": {
|
||
"$ref": "#/components/schemas/Output"
|
||
},
|
||
"status": {
|
||
"$ref": "#/components/schemas/Status"
|
||
},
|
||
"metrics": {
|
||
"type": "object",
|
||
"title": "Metrics"
|
||
},
|
||
"version": {
|
||
"type": "string",
|
||
"title": "Version"
|
||
},
|
||
"created_at": {
|
||
"type": "string",
|
||
"title": "Created At",
|
||
"format": "date-time"
|
||
},
|
||
"started_at": {
|
||
"type": "string",
|
||
"title": "Started At",
|
||
"format": "date-time"
|
||
},
|
||
"completed_at": {
|
||
"type": "string",
|
||
"title": "Completed At",
|
||
"format": "date-time"
|
||
}
|
||
}
|
||
},
|
||
"HTTPValidationError": {
|
||
"type": "object",
|
||
"title": "HTTPValidationError",
|
||
"properties": {
|
||
"detail": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/components/schemas/ValidationError"
|
||
},
|
||
"title": "Detail"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
} |