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.
nelsonjchen /op-replay-clipper:31cbbe86
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";
const replicate = new Replicate({
auth: process.env.REPLICATE_API_TOKEN,
});
Run nelsonjchen/op-replay-clipper using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"nelsonjchen/op-replay-clipper:31cbbe8611b972b487565b7dbbf7fc853709e5ebfae28203f22789bc5b2c072b",
{
input: {
notes: "",
route: "https://connect.comma.ai/a2a0ccea32023010/1690488131496/1690488151496",
metric: false,
fileSize: 25,
jwtToken: "",
renderType: "360",
smearAmount: 5,
startSeconds: 50,
lengthSeconds: 20,
speedhackRatio: 1,
forwardUponWideH: 2.2
}
}
);
console.log(output);
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 nelsonjchen/op-replay-clipper using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"nelsonjchen/op-replay-clipper:31cbbe8611b972b487565b7dbbf7fc853709e5ebfae28203f22789bc5b2c072b",
input={
"notes": "",
"route": "https://connect.comma.ai/a2a0ccea32023010/1690488131496/1690488151496",
"metric": False,
"fileSize": 25,
"jwtToken": "",
"renderType": "360",
"smearAmount": 5,
"startSeconds": 50,
"lengthSeconds": 20,
"speedhackRatio": 1,
"forwardUponWideH": 2.2
}
)
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 nelsonjchen/op-replay-clipper 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": "31cbbe8611b972b487565b7dbbf7fc853709e5ebfae28203f22789bc5b2c072b",
"input": {
"notes": "",
"route": "https://connect.comma.ai/a2a0ccea32023010/1690488131496/1690488151496",
"metric": false,
"fileSize": 25,
"jwtToken": "",
"renderType": "360",
"smearAmount": 5,
"startSeconds": 50,
"lengthSeconds": 20,
"speedhackRatio": 1,
"forwardUponWideH": 2.2
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Add a payment method to run this model.
By signing in, you agree to our
terms of service and privacy policy
Output
{
"completed_at": "2024-04-05T08:09:25.324729Z",
"created_at": "2024-04-05T08:03:46.654000Z",
"data_removed": false,
"error": null,
"id": "ptz73q81bsrgt0cenn4sb05ncc",
"input": {
"notes": "",
"route": "https://connect.comma.ai/a2a0ccea32023010/1690488131496/1690488151496",
"metric": false,
"fileSize": 25,
"jwtToken": "",
"renderType": "360",
"smearAmount": 5,
"startSeconds": 50,
"lengthSeconds": 20,
"speedhackRatio": 1,
"forwardUponWideH": 2.2
},
"logs": "NOTES:\nDownloading file list from https://api.commadotai.com/v1/route/a2a0ccea32023010%7C2023-07-27--13-01-19/files\nDownloading route segment info from https://api.comma.ai/v1/devices/a2a0ccea32023010/routes_segments?end=1712304518516&start=0\nRoute a2a0ccea32023010|2023-07-27--13-01-19 starts at 1690488081496 and ends at 1690488203050\nView the route at https://connect.comma.ai/a2a0ccea32023010/1690488081496/1690488203050\nFiles Downloaded: 0%| | 0/4 [00:00<?, ?file/s]\nFiles Downloaded: 25%|██▌ | 1/4 [00:00<00:00, 4.56file/s]\nFiles Downloaded: 100%|██████████| 4/4 [00:00<00:00, 15.82file/s]\n['ffmpeg', '-y', '-hwaccel', 'auto', '-probesize', '100M', '-r', '20', '-i', 'concat:./shared/data_dir/a2a0ccea32023010/2023-07-27--13-01-19--0/dcamera.hevc|./shared/data_dir/a2a0ccea32023010/2023-07-27--13-01-19--1/dcamera.hevc', '-probesize', '100M', '-r', '20', '-i', 'concat:./shared/data_dir/a2a0ccea32023010/2023-07-27--13-01-19--0/ecamera.hevc|./shared/data_dir/a2a0ccea32023010/2023-07-27--13-01-19--1/ecamera.hevc', '-t', '20', '-ss', '50', '-filter_complex', '[0:v]pad=iw:ih+290:0:290:color=#160000,crop=iw:1208[driver];[driver][1:v]hstack=inputs=2[v];[v]v360=dfisheye:equirect:ih_fov=195:iv_fov=122[vout]', '-map', '[vout]', '-c:v', 'hevc_nvenc', '-b:v', '10066329', '-maxrate', '10066329', '-bufsize', '20132658', './shared/cog-clip.mp4']\nffmpeg version 4.4.2-0ubuntu0.22.04.1 Copyright (c) 2000-2021 the FFmpeg developers\nbuilt with gcc 11 (Ubuntu 11.2.0-19ubuntu1)\nconfiguration: --prefix=/usr --extra-version=0ubuntu0.22.04.1 --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-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq --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-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 --enable-pocketsphinx --enable-librsvg --enable-libmfx --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared\nlibavutil 56. 70.100 / 56. 70.100\nlibavcodec 58.134.100 / 58.134.100\nlibavformat 58. 76.100 / 58. 76.100\nlibavdevice 58. 13.100 / 58. 13.100\nlibavfilter 7.110.100 / 7.110.100\nlibswscale 5. 9.100 / 5. 9.100\nlibswresample 3. 9.100 / 3. 9.100\nlibpostproc 55. 9.100 / 55. 9.100\nInput #0, hevc, from 'concat:./shared/data_dir/a2a0ccea32023010/2023-07-27--13-01-19--0/dcamera.hevc|./shared/data_dir/a2a0ccea32023010/2023-07-27--13-01-19--1/dcamera.hevc':\nDuration: N/A, bitrate: N/A\nStream #0:0: Video: hevc (Main), yuv420p(tv), 1928x1208, 20 fps, 20 tbr, 1200k tbn, 20 tbc\nInput #1, hevc, from 'concat:./shared/data_dir/a2a0ccea32023010/2023-07-27--13-01-19--0/ecamera.hevc|./shared/data_dir/a2a0ccea32023010/2023-07-27--13-01-19--1/ecamera.hevc':\nDuration: N/A, bitrate: N/A\nStream #1:0: Video: hevc (Main), yuv420p(tv), 1928x1208, 20 fps, 20 tbr, 1200k tbn, 20 tbc\n[hevc @ 0x580b926b6080] Using auto hwaccel type cuda with new default device.\nStream mapping:\nStream #0:0 (hevc) -> pad\nStream #1:0 (hevc) -> hstack:input1\nv360 -> Stream #0:0 (hevc_nvenc)\nPress [q] to stop, [?] for help\nOutput #0, mp4, to './shared/cog-clip.mp4':\nMetadata:\nencoder : Lavf58.76.100\nStream #0:0: Video: hevc (Main) (hev1 / 0x31766568), yuv420p(tv, progressive), 3856x1208, q=2-31, 10066 kb/s, 20 fps, 10240 tbn (default)\nMetadata:\nencoder : Lavc58.134.100 hevc_nvenc\nSide data:\ncpb: bitrate max/min/avg: 10066329/0/10066329 buffer size: 20132658 vbv_delay: N/A\nframe= 1 fps=0.0 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A speed= 0x\nframe= 12 fps=0.4 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A speed= 0x\nframe= 30 fps=0.9 q=16.0 size= 1024kB time=00:00:00.60 bitrate=13979.3kbits/s speed=0.0185x\nframe= 47 fps=1.4 q=18.0 size= 2304kB time=00:00:01.45 bitrate=13016.2kbits/s speed=0.0439x\nframe= 65 fps=1.9 q=19.0 size= 3328kB time=00:00:02.35 bitrate=11600.9kbits/s speed=0.0701x\nframe= 80 fps=2.4 q=14.0 size= 4352kB time=00:00:03.10 bitrate=11500.3kbits/s speed=0.0911x\nframe= 98 fps=2.8 q=19.0 size= 5632kB time=00:00:04.00 bitrate=11534.1kbits/s speed=0.116x\nframe= 113 fps=3.2 q=20.0 size= 6656kB time=00:00:04.75 bitrate=11479.0kbits/s speed=0.136x\nframe= 129 fps=3.6 q=22.0 size= 7680kB time=00:00:05.55 bitrate=11335.8kbits/s speed=0.156x\nframe= 142 fps=3.9 q=20.0 size= 8192kB time=00:00:06.20 bitrate=10823.9kbits/s speed=0.172x\nframe= 160 fps=4.4 q=15.0 size= 9472kB time=00:00:07.10 bitrate=10928.7kbits/s speed=0.194x\nframe= 176 fps=4.7 q=16.0 size= 10496kB time=00:00:07.90 bitrate=10883.9kbits/s speed=0.213x\nframe= 193 fps=5.1 q=20.0 size= 11520kB time=00:00:08.75 bitrate=10785.3kbits/s speed=0.233x\nframe= 208 fps=5.5 q=14.0 size= 12288kB time=00:00:09.50 bitrate=10596.1kbits/s speed=0.249x\nframe= 224 fps=5.8 q=14.0 size= 13312kB time=00:00:10.30 bitrate=10587.5kbits/s speed=0.266x\nframe= 240 fps=6.1 q=13.0 size= 14336kB time=00:00:11.10 bitrate=10580.2kbits/s speed=0.283x\nframe= 255 fps=6.4 q=18.0 size= 15104kB time=00:00:11.85 bitrate=10441.5kbits/s speed=0.299x\nframe= 270 fps=6.7 q=13.0 size= 16384kB time=00:00:12.60 bitrate=10652.1kbits/s speed=0.314x\nframe= 285 fps=7.0 q=19.0 size= 17152kB time=00:00:13.35 bitrate=10525.0kbits/s speed=0.328x\nframe= 302 fps=7.3 q=14.0 size= 18176kB time=00:00:14.20 bitrate=10485.7kbits/s speed=0.345x\nframe= 317 fps=7.6 q=19.0 size= 18944kB time=00:00:14.95 bitrate=10380.5kbits/s speed=0.358x\nframe= 334 fps=7.9 q=14.0 size= 20224kB time=00:00:15.80 bitrate=10485.7kbits/s speed=0.374x\nframe= 348 fps=8.1 q=20.0 size= 20992kB time=00:00:16.50 bitrate=10422.2kbits/s speed=0.386x\nframe= 366 fps=8.5 q=14.0 size= 22016kB time=00:00:17.40 bitrate=10365.2kbits/s speed=0.402x\nframe= 379 fps=8.6 q=19.0 size= 22784kB time=00:00:18.05 bitrate=10340.5kbits/s speed=0.412x\nframe= 397 fps=9.0 q=18.0 size= 23808kB time=00:00:18.95 bitrate=10292.1kbits/s speed=0.427x\nframe= 400 fps=9.0 q=14.0 Lsize= 25084kB time=00:00:19.80 bitrate=10378.3kbits/s speed=0.445x\nvideo:25080kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.017288%\n/src\nProcessing: /src/shared/cog-clip.mp4.temp.mp4\nSaved file settings\nTrack 0\nSpherical = true\nStitched = true\nStitchingSoftware = Spherical Metadata Tool\nProjectionType = equirectangular",
"metrics": {
"predict_time": 47.461406,
"total_time": 338.670729
},
"output": "https://replicate.delivery/pbxt/ct23fxN0KhVQWiXwH2GJRWYmeC2Mv2h2EDRb3vyfXPkpdsOlA/cog-clip.mp4",
"started_at": "2024-04-05T08:08:37.863323Z",
"status": "succeeded",
"urls": {
"get": "https://api.replicate.com/v1/predictions/ptz73q81bsrgt0cenn4sb05ncc",
"cancel": "https://api.replicate.com/v1/predictions/ptz73q81bsrgt0cenn4sb05ncc/cancel"
},
"version": "31cbbe8611b972b487565b7dbbf7fc853709e5ebfae28203f22789bc5b2c072b"
}
NOTES:
Downloading file list from https://api.commadotai.com/v1/route/a2a0ccea32023010%7C2023-07-27--13-01-19/files
Downloading route segment info from https://api.comma.ai/v1/devices/a2a0ccea32023010/routes_segments?end=1712304518516&start=0
Route a2a0ccea32023010|2023-07-27--13-01-19 starts at 1690488081496 and ends at 1690488203050
View the route at https://connect.comma.ai/a2a0ccea32023010/1690488081496/1690488203050
Files Downloaded: 0%| | 0/4 [00:00<?, ?file/s]
Files Downloaded: 25%|██▌ | 1/4 [00:00<00:00, 4.56file/s]
Files Downloaded: 100%|██████████| 4/4 [00:00<00:00, 15.82file/s]
['ffmpeg', '-y', '-hwaccel', 'auto', '-probesize', '100M', '-r', '20', '-i', 'concat:./shared/data_dir/a2a0ccea32023010/2023-07-27--13-01-19--0/dcamera.hevc|./shared/data_dir/a2a0ccea32023010/2023-07-27--13-01-19--1/dcamera.hevc', '-probesize', '100M', '-r', '20', '-i', 'concat:./shared/data_dir/a2a0ccea32023010/2023-07-27--13-01-19--0/ecamera.hevc|./shared/data_dir/a2a0ccea32023010/2023-07-27--13-01-19--1/ecamera.hevc', '-t', '20', '-ss', '50', '-filter_complex', '[0:v]pad=iw:ih+290:0:290:color=#160000,crop=iw:1208[driver];[driver][1:v]hstack=inputs=2[v];[v]v360=dfisheye:equirect:ih_fov=195:iv_fov=122[vout]', '-map', '[vout]', '-c:v', 'hevc_nvenc', '-b:v', '10066329', '-maxrate', '10066329', '-bufsize', '20132658', './shared/cog-clip.mp4']
ffmpeg version 4.4.2-0ubuntu0.22.04.1 Copyright (c) 2000-2021 the FFmpeg developers
built with gcc 11 (Ubuntu 11.2.0-19ubuntu1)
configuration: --prefix=/usr --extra-version=0ubuntu0.22.04.1 --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-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq --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-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 --enable-pocketsphinx --enable-librsvg --enable-libmfx --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
libavutil 56. 70.100 / 56. 70.100
libavcodec 58.134.100 / 58.134.100
libavformat 58. 76.100 / 58. 76.100
libavdevice 58. 13.100 / 58. 13.100
libavfilter 7.110.100 / 7.110.100
libswscale 5. 9.100 / 5. 9.100
libswresample 3. 9.100 / 3. 9.100
libpostproc 55. 9.100 / 55. 9.100
Input #0, hevc, from 'concat:./shared/data_dir/a2a0ccea32023010/2023-07-27--13-01-19--0/dcamera.hevc|./shared/data_dir/a2a0ccea32023010/2023-07-27--13-01-19--1/dcamera.hevc':
Duration: N/A, bitrate: N/A
Stream #0:0: Video: hevc (Main), yuv420p(tv), 1928x1208, 20 fps, 20 tbr, 1200k tbn, 20 tbc
Input #1, hevc, from 'concat:./shared/data_dir/a2a0ccea32023010/2023-07-27--13-01-19--0/ecamera.hevc|./shared/data_dir/a2a0ccea32023010/2023-07-27--13-01-19--1/ecamera.hevc':
Duration: N/A, bitrate: N/A
Stream #1:0: Video: hevc (Main), yuv420p(tv), 1928x1208, 20 fps, 20 tbr, 1200k tbn, 20 tbc
[hevc @ 0x580b926b6080] Using auto hwaccel type cuda with new default device.
Stream mapping:
Stream #0:0 (hevc) -> pad
Stream #1:0 (hevc) -> hstack:input1
v360 -> Stream #0:0 (hevc_nvenc)
Press [q] to stop, [?] for help
Output #0, mp4, to './shared/cog-clip.mp4':
Metadata:
encoder : Lavf58.76.100
Stream #0:0: Video: hevc (Main) (hev1 / 0x31766568), yuv420p(tv, progressive), 3856x1208, q=2-31, 10066 kb/s, 20 fps, 10240 tbn (default)
Metadata:
encoder : Lavc58.134.100 hevc_nvenc
Side data:
cpb: bitrate max/min/avg: 10066329/0/10066329 buffer size: 20132658 vbv_delay: N/A
frame= 1 fps=0.0 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A speed= 0x
frame= 12 fps=0.4 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A speed= 0x
frame= 30 fps=0.9 q=16.0 size= 1024kB time=00:00:00.60 bitrate=13979.3kbits/s speed=0.0185x
frame= 47 fps=1.4 q=18.0 size= 2304kB time=00:00:01.45 bitrate=13016.2kbits/s speed=0.0439x
frame= 65 fps=1.9 q=19.0 size= 3328kB time=00:00:02.35 bitrate=11600.9kbits/s speed=0.0701x
frame= 80 fps=2.4 q=14.0 size= 4352kB time=00:00:03.10 bitrate=11500.3kbits/s speed=0.0911x
frame= 98 fps=2.8 q=19.0 size= 5632kB time=00:00:04.00 bitrate=11534.1kbits/s speed=0.116x
frame= 113 fps=3.2 q=20.0 size= 6656kB time=00:00:04.75 bitrate=11479.0kbits/s speed=0.136x
frame= 129 fps=3.6 q=22.0 size= 7680kB time=00:00:05.55 bitrate=11335.8kbits/s speed=0.156x
frame= 142 fps=3.9 q=20.0 size= 8192kB time=00:00:06.20 bitrate=10823.9kbits/s speed=0.172x
frame= 160 fps=4.4 q=15.0 size= 9472kB time=00:00:07.10 bitrate=10928.7kbits/s speed=0.194x
frame= 176 fps=4.7 q=16.0 size= 10496kB time=00:00:07.90 bitrate=10883.9kbits/s speed=0.213x
frame= 193 fps=5.1 q=20.0 size= 11520kB time=00:00:08.75 bitrate=10785.3kbits/s speed=0.233x
frame= 208 fps=5.5 q=14.0 size= 12288kB time=00:00:09.50 bitrate=10596.1kbits/s speed=0.249x
frame= 224 fps=5.8 q=14.0 size= 13312kB time=00:00:10.30 bitrate=10587.5kbits/s speed=0.266x
frame= 240 fps=6.1 q=13.0 size= 14336kB time=00:00:11.10 bitrate=10580.2kbits/s speed=0.283x
frame= 255 fps=6.4 q=18.0 size= 15104kB time=00:00:11.85 bitrate=10441.5kbits/s speed=0.299x
frame= 270 fps=6.7 q=13.0 size= 16384kB time=00:00:12.60 bitrate=10652.1kbits/s speed=0.314x
frame= 285 fps=7.0 q=19.0 size= 17152kB time=00:00:13.35 bitrate=10525.0kbits/s speed=0.328x
frame= 302 fps=7.3 q=14.0 size= 18176kB time=00:00:14.20 bitrate=10485.7kbits/s speed=0.345x
frame= 317 fps=7.6 q=19.0 size= 18944kB time=00:00:14.95 bitrate=10380.5kbits/s speed=0.358x
frame= 334 fps=7.9 q=14.0 size= 20224kB time=00:00:15.80 bitrate=10485.7kbits/s speed=0.374x
frame= 348 fps=8.1 q=20.0 size= 20992kB time=00:00:16.50 bitrate=10422.2kbits/s speed=0.386x
frame= 366 fps=8.5 q=14.0 size= 22016kB time=00:00:17.40 bitrate=10365.2kbits/s speed=0.402x
frame= 379 fps=8.6 q=19.0 size= 22784kB time=00:00:18.05 bitrate=10340.5kbits/s speed=0.412x
frame= 397 fps=9.0 q=18.0 size= 23808kB time=00:00:18.95 bitrate=10292.1kbits/s speed=0.427x
frame= 400 fps=9.0 q=14.0 Lsize= 25084kB time=00:00:19.80 bitrate=10378.3kbits/s speed=0.445x
video:25080kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.017288%
/src
Processing: /src/shared/cog-clip.mp4.temp.mp4
Saved file settings
Track 0
Spherical = true
Stitched = true
StitchingSoftware = Spherical Metadata Tool
ProjectionType = equirectangular