Video Files
Video Files are what video jungle consumes, generates, and returns. Video Files can be analyzed for what they contain, along with their dialogue for retrieval and generation.
The video file model
The video file model contains all the information about the properties of the videos themselves. Things like frame rates, file formats, tracks, and more.
Properties
- Name
id
- Type
- string
- Description
Unique identifier for the video file
- Name
name
- Type
- string
- Description
(Optional) Name of video file
- Name
filename
- Type
- string
- Description
URL for direct access to download video file
- Name
description
- Type
- string
- Description
(Optional) Description of video file.
- Name
duration
- Type
- float
- Description
Duration of file in seconds.
- Name
hash
- Type
- string
- Description
MD5 hash of the video file
- Name
size
- Type
- integer
- Description
Size of file in bytes.
- Name
created_at
- Type
- timestamp
- Description
Timestamp of when the video was created on video jungle.
- Name
recorded_at
- Type
- timestamp
- Description
(Optional) Timestamp of when the video was recorded.
List all videos
This endpoint allows you to retrieve a paginated list of all your videos. By default, a maximum of ten videos are shown per page.
Optional attributes
- Name
limit
- Type
- integer
- Description
Limit the number of videos returned.
Request
curl -G https://api.video-jungle.com/video-file \
-H "Authorization: Bearer {token}" \
-d limit=10
Response
[
{
"id": "20a0c41d-c042-46ae-87e1-1d66d6bf59c2",
"filename": "https://video-jungles.s3.us-east-1.amazonaws.com/612afec9-bcb2-47ca-807b-756d6e83b4b7/20a0c41d-c042-46ae-87e1-1d66d6bf59c2/bongo-class.mp4?AWSAccessKeyId=AKIAQJX2XANMJM4ARNVV&Signature=LURidZHG4qpmf%2Fxl54VTmWAYDcU%3D&Expires=1717103703",
"description": null,
"duration": 27.431,
"owner_id": "612afec9-bcb2-47ca-807b-756d6e83b4b7",
"hash": "b305f783e3a7c946b1e893b68504a11b20cb28aa9f66631f06b1277cf7c7212b",
"s3_file_key": "612afec9-bcb2-47ca-807b-756d6e83b4b7/20a0c41d-c042-46ae-87e1-1d66d6bf59c2/bongo-class.mp4",
"name": "Name here",
"thumbnail": "https://video-jungles.s3.us-east-1.amazonaws.com/612afec9-bcb2-47ca-807b-756d6e83b4b7/20a0c41d-c042-46ae-87e1-1d66d6bf59c2/thumbnail.png?AWSAccessKeyId=AKIAQJX2XANMJM4ARNVV&Signature=K2beQI7G5lyOn365%2BnVOdACyWYc%3D&Expires=1717103703",
"fps": 29.97,
"size": 2383641,
"created_at": "2024-05-27T13:55:12.716461",
"key": "152accb9-291b-4703-9b8a-5562032e76d2",
}
]
Create a video file
Create a new video file. You will get back UUID to upload the file to.
Required attributes
- Name
name
- Type
- string
- Description
Name for the video file
- Name
filename
- Type
- string
- Description
Filename of the original video file
- Name
upload_method
- Type
- string
- Description
Method of uploading. Options include 'direct' (upload directly to S3), 'file-no-chunk' (upload directly to Video Jungle's API), or 'web-ui' (Allows you to embed an upload into a web page with Filepond.)
Request
import ApiClient from '@skate85/videojungle-api'
const client = new ApiClient(token)
await client.video.create({
name: 'skateboard',
filename 'skate.mp4',
upload_method: 'file-no-chunk'
})
Response
{
...depends on upload method
}
Retrieve a video file
This endpoint allows you to retrieve a video by its id. Also includes any video analysis which has been done on the video.
Request
curl https://app.video-jungle.com/video-file/:video_uuid \
-H "Authorization: Bearer {token}"
Response
{
"id": "20a0c41d-c042-46ae-87e1-1d66d6bf59c2",
"filename": "https://video-jungles.s3.us-east-1.amazonaws.com/612afec9-bcb2-47ca-807b-756d6e83b4b7/20a0c41d-c042-46ae-87e1-1d66d6bf59c2/bongo-class.mp4?AWSAccessKeyId=AKIAQJX2XANMJM4ARNVV&Signature=JFmrgjtay%2Fkv0bWojnM138d%2BCL8%3D&Expires=1717105885",
"description": null,
"duration": 27.431,
"owner_id": "612afec9-bcb2-47ca-807b-756d6e83b4b7",
"hash": "b305f783e3a7c946b1e893b68504a11b20cb28aa9f66631f06b1277cf7c7212b",
"s3_file_key": "612afec9-bcb2-47ca-807b-756d6e83b4b7/20a0c41d-c042-46ae-87e1-1d66d6bf59c2/bongo-class.mp4",
"name": "Kirk Bonga",
"thumbnail": "https://video-jungles.s3.us-east-1.amazonaws.com/612afec9-bcb2-47ca-807b-756d6e83b4b7/20a0c41d-c042-46ae-87e1-1d66d6bf59c2/thumbnail.png?AWSAccessKeyId=AKIAQJX2XANMJM4ARNVV&Signature=bHL7TDhFeQDt2NRTGv8Ed5LzDm0%3D&Expires=1717105885",
"fps": 29.97,
"size": 2383641,
"created_at": "2024-05-27T13:55:12.716461",
"key": "152accb9-291b-4703-9b8a-5562032e76d2",
"inferences": [],
"analysis": [
{
"id": "e93e9c93-b1ab-49cc-8c6b-4c31e74cf1ad",
"script": "1\n00:00:00,000 --> 00:00:03,000\n (upbeat drum music)\n\n2\n00:00:03,000 --> 00:00:06,000\n (upbeat drum music)\n\n3\n00:00:06,400 --> 00:00:09,400\n (upbeat drum music)\n\n4\n00:00:09,400 --> 00:00:12,400\n (upbeat drum music)\n\n5\n00:00:12,400 --> 00:00:14,980\n (upbeat music)\n\n",
"video_file_id": "20a0c41d-c042-46ae-87e1-1d66d6bf59c2",
"scene_changes": [
{
"images": [
"612afec9-bcb2-47ca-807b-756d6e83b4b7/20a0c41d-c042-46ae-87e1-1d66d6bf59c2/analysis/20a0c41d-c042-46ae-87e1-1d66d6bf59c2-Scene-001-01.jpg",
"612afec9-bcb2-47ca-807b-756d6e83b4b7/20a0c41d-c042-46ae-87e1-1d66d6bf59c2/analysis/20a0c41d-c042-46ae-87e1-1d66d6bf59c2-Scene-001-02.jpg",
"612afec9-bcb2-47ca-807b-756d6e83b4b7/20a0c41d-c042-46ae-87e1-1d66d6bf59c2/analysis/20a0c41d-c042-46ae-87e1-1d66d6bf59c2-Scene-001-03.jpg"
],
"end_frame": "298",
"start_frame": "1",
"end_timecode": "00:00:09.943",
"scene_number": "1",
"length_frames": "298",
"length_seconds": "9.943",
"start_timecode": "00:00:00.000",
"length_timecode": "00:00:09.943",
"end_time_seconds": "9.943",
"start_time_seconds": "0.000"
},
{
"images": [
"612afec9-bcb2-47ca-807b-756d6e83b4b7/20a0c41d-c042-46ae-87e1-1d66d6bf59c2/analysis/20a0c41d-c042-46ae-87e1-1d66d6bf59c2-Scene-002-01.jpg",
"612afec9-bcb2-47ca-807b-756d6e83b4b7/20a0c41d-c042-46ae-87e1-1d66d6bf59c2/analysis/20a0c41d-c042-46ae-87e1-1d66d6bf59c2-Scene-002-02.jpg",
"612afec9-bcb2-47ca-807b-756d6e83b4b7/20a0c41d-c042-46ae-87e1-1d66d6bf59c2/analysis/20a0c41d-c042-46ae-87e1-1d66d6bf59c2-Scene-002-03.jpg"
],
"end_frame": "451",
"start_frame": "299",
"end_timecode": "00:00:15.048",
"scene_number": "2",
"length_frames": "153",
"length_seconds": "5.105",
"start_timecode": "00:00:09.943",
"length_timecode": "00:00:05.105",
"end_time_seconds": "15.048",
"start_time_seconds": "9.943"
}
],
"created_at": "2024-05-27T13:55:15.899784",
"updated_at": "2024-05-27T13:55:15.899784",
"key": "be4237c2-7a72-4bab-aa17-98b2fa4e0471"
}
]
}
Update a video file
Update a video's name.
Optional attributes
- Name
videoName
- Type
- string
- Description
New name for the video.
Request
import ApiClient from '@skate85/videojungle'
const client = new ApiClient(token)
await client.videos.update('xgQQXg3hrtjh7AvZ', {
videoName: 'oldSkate',
})
Response
{
}
Upload a video file
Update the actual video file. Assumes the initial video was created with the upload_method of 'direct-no-chunk'.
Optional attributes
- Name
file
- Type
- file
- Description
Actual video file for upload
Request
import ApiClient from '@skate85/videojungle'
const client = new ApiClient(token)
await client.videos.upload('xgQQXg3hrtjh7AvZ', {
file: 'file.mp4',
})
Response
{
}