Skip to content

Commit a4e5915

Browse files
Merge pull request #97597 from Juliako/viupdates
updates
2 parents ec33826 + e70bb94 commit a4e5915

File tree

3 files changed

+64
-1
lines changed

3 files changed

+64
-1
lines changed
471 KB
Loading
32 KB
Loading

articles/media-services/video-indexer/scenes-shots-keyframes.md

Lines changed: 64 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,72 @@ Video Indexer determines when a shot changes in the video based on visual cues,
3434

3535
Selects the frame(s) that best represent the shot. Keyframes are the representative frames selected from the entire video based on aesthetic properties (for example, contrast and stableness). Video Indexer retrieves a list of keyframe IDs as part of the shot's metadata, based on which customers can extract the keyframe thumbnail.
3636

37-
Keyframes are associated with shots in the output JSON.
37+
### Extracting Keyframes
38+
39+
To extract high-resolution keyframes for your video, you must first upload and index the video.
40+
41+
![Keyframes](./media/scenes-shots-keyframes/extracting-keyframes.png)
42+
43+
#### With the Video Indexer website
44+
45+
To extract keyframes using the Video Indexer website, upload and index your video. Once the indexing job is complete, click on the **Download** button and select **Artifacts (ZIP)**. This will download the artifacts folder to your computer.
46+
47+
![Keyframes](./media/scenes-shots-keyframes/extracting-keyframes2.png)
48+
49+
Unzip and open the folder. In the *_KeyframeThumbnail* folder, and you will find all of the keyframes that were extracted from your video.
50+
51+
#### With the Video Indexer API
52+
53+
To get keyframes using the Video Indexer API, upload and index your video using the [Upload Video](https://api-portal.videoindexer.ai/docs/services/Operations/operations/Upload-Video?) call. Once the indexing job is complete, call [Get Video Index](https://api-portal.videoindexer.ai/docs/services/Operations/operations/Get-Video-Index?). This will give you all of the insights that Video Indexer extracted from your content in a JSON file.
54+
55+
You will get a list of keyframe IDs as part of each shot's metadata.
56+
57+
```json
58+
"shots":[
59+
{
60+
"id":0,
61+
"keyFrames":[
62+
{
63+
"id":0,
64+
"instances":[
65+
{
66+
"thumbnailId":"00000000-0000-0000-0000-000000000000",
67+
"start":"0:00:00.209",
68+
"end":"0:00:00.251",
69+
"duration":"0:00:00.042"
70+
}
71+
]
72+
},
73+
{
74+
"id":1,
75+
"instances":[
76+
{
77+
"thumbnailId":"00000000-0000-0000-0000-000000000000",
78+
"start":"0:00:04.755",
79+
"end":"0:00:04.797",
80+
"duration":"0:00:00.042"
81+
}
82+
]
83+
}
84+
],
85+
"instances":[
86+
{
87+
"start":"0:00:00",
88+
"end":"0:00:06.34",
89+
"duration":"0:00:06.34"
90+
}
91+
]
92+
},
93+
94+
]
95+
```
96+
97+
You will now need to run each of these keyframe IDs on the [Get Thumbnails](https://api-portal.videoindexer.ai/docs/services/Operations/operations/Get-Video-Thumbnail?) call. This will download each of the keyframe images to your computer.
3898

3999
## Editorial shot type detection
40100

101+
Keyframes are associated with shots in the output JSON.
102+
41103
The shot type associated with an individual shot in the insights JSON represents its editorial type. You may find these shot type characteristics useful when editing videos into clips, trailers, or when searching for a specific style of keyframe for artistic purposes. The different types are determined based on analysis of the first keyframe of each shot. Shots are identified by the scale, size, and location of the faces appearing in their first keyframe.
42104

43105
The shot size and scale are determined based on the distance between the camera and the faces appearing in the frame. Using these properties, Video Indexer detects the following shot types:
@@ -60,6 +122,7 @@ Additional characteristics:
60122
* Two shots: shows two persons’ faces of medium size.
61123
* Multiple faces: more than two persons.
62124

125+
63126
## Next steps
64127

65128
[Examine the Video Indexer output produced by the API](video-indexer-output-json-v2.md#scenes)

0 commit comments

Comments
 (0)