Video Metadata: Exploring advanced use cases and their benefits

Video Metadata: Exploring advanced use cases and their benefits

Learn what is video metadata and how it finds application in various scenarios like e-learning or video sharing.

Zoltán

February 22, 2024

Metadata, within the context of api.video, is like a Swiss Army knife - it gives you a simple set of tools to solve countless complex problems. It can help you integrate video-on-demand (VOD) into your platform or application, all the while supporting and even enhancing the way you build your product.

What is metadata?

Metadata enables you to add an extra layer of data to the videos that you or your users upload. You can define an array of custom key-value pairs and use the values to enhance your application or website. Each video can have multiple key-value pairs in a metadata array, and you can use them to filter for specific content when listing videos, and to integrate video content into your app or website. You can add, edit, or remove metadata from video using both the api.video API and the Dashboard.

Now, let’s dive into some use cases where video metadata can be a game changer!

Video metadata for e-learning use cases

In this use case, we will look at how using metadata can help you solve some common problems that you might encounter when creating an e-learning platform.

Let’s say you want to offer video lessons for your users, and that you want to enable teachers to create courses (a series of lessons) on different topics, and varying levels of difficulty. For the sake of this example, let’s propose these courses:

These courses already imply a very large amount of background information that you’ll need to handle. Think about questions like:

All of this fits neatly into metadata. Here’s an example set of key-value pairs that could belong to any lesson’s video:

"metadata": [
    {
      "key": "type", // This helps you identify the content type. Useful if you want to enable both teachers and students to upload videos.
      "value": "lesson"
    },
    {
      "key": "course_id", // This helps you identify the course. Useful if you have multiple courses on the same topic.
      "value": "sushi"
    },
    {
      "key": "lesson_number", // This helps you identify the video as the 3rd lesson.
      "value": "3"
    },
    {
      "key": "difficulty_level", // This shows the difficulty of this course.
      "value": "advanced"
    },
    {
      "key": "teacher", // This can be the name or the ID of a teacher who uploads videos.
      "value": "Jiro Ono"
    },
    {
      "key": "rating", // This can be the average score of all ratings on this video. Make sure you track users who already rated a video to avoid multiple votes and false results.
      "value": "8"
    }
  ]

Now let’s see how a student’s own video submission can be enhanced with metadata by giving them a few fields that they can fill out:

"metadata": [
    {
      "key": "uploaded_at", // The full ISO8601 date and timestamp helps students verify that they actually submitted their homework on time.
      "value": "2024-04-15T15:50+00Z"
    },
    {
      "key": "type", // This helps you identify the content type as homework.
      "value": "homework"
    },
    {
      "key": "uploader_notes", // Enabling uploaders to tie a note to their submission can help your users have a more seamless experience.
      "value": "I messed up the rice a bit, it was too sticky!"
    },
    {
      "key": "student", // This can be the name or the ID of a student who uploads videos.
      "value": "John Doe"
    },
    {
      "key": "grade", // This can be the grade given by a teacher who reviewed the homework submission. You can even implement a notification system to let teachers know that there is a new homework submission.
      "value": "4"
    },
    {
      "key": "reviewer_note", // Let teachers add a note to the grades they give.
      "value": "Use less water next time!"
    }
  ]

How to add video metadata to your e-learning solution

Let’s dive into the endpoints can help you solve the above problems.

{base_URL}/videos?metadata[type]=homework

Remember, you can use any of these key-value pairs to list videos - use them to create a nice filtering & ordering functionality on your platform for a better user experience.

Video metadata for sports-themed video sharing use case

In this use case, we will look at how metadata can help you offer a platform where people can share their adventures through videos. You can also make things a bit more exciting by offering them the functionality to display their videos’ locations on a map.

For the sake of this example, we will enable users to vote with 👍 / 👎 on specific videos, and store the results in metadata for accurate tracking.

In such a case, when users upload a video, you can use the metadata field to define key-value pairs like these:

"metadata": [
    {
      "key": "geotag_location", // The WGS84 coordinates of where the video file was recorded.
      "value": "N 51.744485 E 10.919480"
    },
    {
      "key": "type", // This helps you identify the content type as mountain cycling.
      "value": "mountain_cycling"
    },
    {
      "key": "uploader_notes", // Enabling uploaders to tie a note to their submission can help your users have a more seamless experience.
      "value": "I got chased by a bear!"
    },
    {
      "key": "score", // This can be the calculated score of all thumbs-ups or thumbs-downs on this video. Make sure you track users who already rated a video to avoid multiple votes and false results.
      "value": "8"
    }
  ]

How to add video metadata to your video sharing platform

Now, let's see the endpoints that can help you solve the above problem.

{base_URL}/videos?metadata[type]=mountain_cycling

There you go, that's it!

Appreciating the significance of video metadata is important when it comes to online videos. This essential element acts as the foundation for organizing video content, enhancing searchability, and customizing video experiences. Whether you're someone building an app or a content creator or a viewer, the use of metadata is sure to unlock fresh routes for engagement and discovery.

Dive into the developer documentation to understand more.

To start using api.video and see how all this works, sign up for a free sandbox account now!