- Lab
- A Cloud Guru
Detecting Shot Changes with the Video Intelligence API
Detecting when a shot changes in a video is a foundational step when it comes to video indexing. Google Cloud Video Intelligence API is capable of processing digital video to output the beginning and ending time code, demarking individual moments taken by a single camera and representing a continuous time and space. In this lab, you'll use a Python script to process a digital video with the Video Intelligence API's annotate function to output a series of individual shots and then compare the timestamps to the original video.
Path Info
Table of Contents
-
Challenge
Enable API
Enable the Video Intelligence API.
-
Challenge
Retrieve the Working Files
- Activate the Cloud Shell.
- Clone the desired repository.
- Change directory to the working files.
-
Challenge
Set Up Service Account
- Launch the Editor.
- Expand the content-google-cloud-certified-professional-machine-learning-engineer folder.
- Name the file
key.json
. - From this hands-on lab credentials, copy the Service Account Credentials.
- Save the file.
- Switch to the Terminal to export the
key.json
file.
-
Challenge
Send Request to Video Intelligence API
-
Execute the Python command to call the Video Intelligence API and pass in the digital video file path as an argument:
python shotchange.py https://storage.googleapis.com/cloud-samples-data/video/JaneGoodall.mp4
-
-
Challenge
Verify Output
Compare output shot change time codes to actual video for validtion of process.
What's a lab?
Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.
Provided environment for hands-on practice
We will provide the credentials and environment necessary for you to practice right within your browser.
Guided walkthrough
Follow along with the author’s guided walkthrough and build something new in your provided environment!
Did you know?
On average, you retain 75% more of your learning if you get time for practice.