Is it possible to get VOD / video id from Stream id?


#1

Hi,
I’m trying to track the number of views of a live stream during the stream as well as after it’s converted to a video. Is there a way to get the video id from the stream id?
Is there any correlation between the stream data I get from Get stream and video data I get from “Get videos”?(calling it with the same user)
I’ve tried calling “get videos” thinking the first video in the list would correlate with the live stream that I have, because its status is “recording”, but that doesn’t seam to be the case. (the video with status “recording” is just another old video)
Also, what is the significance of “recording” as opposed to “recorded”?
Thanks!


#2

No, none

No

The one that is “recording” should be the one for the active stream.


#3

That’s what I thought, but it’s incorrect. The one that is “recording” is actually an old video that has already finished streaming at some point. When I go to the url or the video that is “recording” I can see that it’s just a video, not an active stream


#4

That would be a super broken vod then that is stuck in that state for no sane reason


The difference between recorded and recording in videos
#5

Hi Barry,

I encountered a similar issue.
I saw this way to get the VOD id using the kraken API: Is there a reliable way to find VOD id of a live stream?
However, when I use it sometimes the url of the recording video is a re-run and sometimes it looks like a completely different video when I access it through using the url returned by the API.
3 questions:

  1. Is there a way to get a similar response using the new API?
  2. Is there a way to differentiate between a rerun and a live video?
  3. Is there a formal definition of “recording” ? I could not find one…

TYIA!


#6

ReRun’s are not “recorded again” so you shouldn’t get a recording vod when a rerun occurs. So a ReRun won’t show up in the vod’s list.

You should open a new thread rather than hijacking this one and reword your question as I don’t know for sure what you are trying to do.

ReRun’s don’t start a new VOD
To get the VOD ID of a live stream. pull videos and grab the most recent video of type recording, that also has a similar start time to the current live stream.


#7

Thanks, I understand
Do you know if there’s a “recording”/“recorded” field (or something that corresponds with that) in the new api? Get videos doesn’t seem to have those fields in its response.


#8

in new api the most recent archive should be the most recent live stream.

use date created to help compare


#9

for v5 and live stream (not rerun) try the following:
get a few last videos (?limit=5) and compare their broadcast_id with current stream ID (stream._id).