Adding meta info to each video from a live input at stream time

I have been building out a little Cloudflare Stream video and live stream site for the school district I work for. All of the videos are organized by Live Input, since we have different Live Inputs for the locations we stream from. The issue I’m running into is that we have some videos we would like to upload, but I don’t have a way to tie them to the Live Input, so they won’t be categorized correctly. Since the Live Input property is read only I think my only solution is to categorize by a Meta property, but then that means needing to add that same meta property to every video somehow.

My question I guess boils down to this: is there a way to automatically add meta information to a video when it is streamed? Or even after it is streamed and ready to view?

Hey @jeremyschoonover! What you’re asking for makes sense to me. I’m happy to run by the team to make sure they agree adding a way to automatically add meta information to a video created by a live input makes sense.

In the meantime I can offer this workaround: when you go live from a live input, the name meta field of a video is set to the name meta field of the live input, concatenated with the time the video is started at. Example:

"meta": {
      "name": "my_live_input_name 21 Sep 21 19:34 UTC"
}

You can change the name of your uploaded videos to a similar format, starting with the live input name property. Additionally, you can search over the name meta field of all videos using the search API (using the search query parameter.

Hope this helps!

OK, thanks @renan, I’ll see if we can do that as a workaround. Thanks for getting back to me, and for running it by the team!

1 Like

Hey @jeremyschoonover I was just pointed out internally that you will also get a webhook triggered when a video becomes “ready” (when a live stream ends or a new video is uploaded & processed). You can also use this webhook to organize your video, for example by adding meta tags or making external calls to a CMS.