happymeal
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-27-2012
04:13 AM
Video meta data - specifically length of video
Hello - I'm wondering if its possible to get the meta data from a video. I've seen that this appears possible for audiostreams and images but nothing on videos. If it is not possible, is there some method of establishing how long a video is? I wish to display a playback progress bar. I know how to get the playback position from video event messages. I would like to display this as a ratio of the total video time.
16 REPLIES 16

TheEndless
Channel Surfer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-27-2012
07:36 AM
Re: Video meta data - specifically length of video
Unfortunately there's nothing exposed to BrightScript that gives this information. Even though the roVideoScreen has it, it doesn't make it available anywhere, as far as I've found. You'll need to rely on getting the metadata from someplace else, or trying to parse it from the file headers directly. In my custom roVideoPlayer implementations, I've opted to just show current playback time, if the overall length isn't provided, and show a full playback progress bar if it is.
My Channels: http://roku.permanence.com - Twitter: @TheEndlessDev
Instant Watch Browser (NetflixIWB), Aquarium Screensaver (AQUARIUM), Clever Clocks Screensaver (CLEVERCLOCKS), iTunes Podcasts (ITPC), My Channels (MYCHANNELS)
Instant Watch Browser (NetflixIWB), Aquarium Screensaver (AQUARIUM), Clever Clocks Screensaver (CLEVERCLOCKS), iTunes Podcasts (ITPC), My Channels (MYCHANNELS)

RokuMarkn
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-28-2012
11:01 AM
Re: Video meta data - specifically length of video
There's an event (type 7) that is sent at the start of play and contains the duration of the video. It doesn't seem to be documented, so I'm not sure if it's plumbed all the way up to Brightscript.
--Mark
--Mark
csPlay
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-24-2012
08:03 PM
Re: Video meta data - specifically length of video
"RokuMarkn" wrote:
There's an event (type 7) that is sent at the start of play and contains the duration of the video. It doesn't seem to be documented, so I'm not sure if it's plumbed all the way up to Brightscript.
--Mark
Hi Mark,
Can you describe how can we capture that event type 7?
Thanks.

TheEndless
Channel Surfer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-25-2012
09:00 AM
Re: Video meta data - specifically length of video
"csPlay" wrote:"RokuMarkn" wrote:
There's an event (type 7) that is sent at the start of play and contains the duration of the video. It doesn't seem to be documented, so I'm not sure if it's plumbed all the way up to Brightscript.
--Mark
Hi Mark,
Can you describe how can we capture that event type 7?
Thanks.
It's not exposed to Brightscript currently, so you can't capture it. Hopefully Mark will have better news concerning that, as it would come in extremely handy, particularly for custom video players.
My Channels: http://roku.permanence.com - Twitter: @TheEndlessDev
Instant Watch Browser (NetflixIWB), Aquarium Screensaver (AQUARIUM), Clever Clocks Screensaver (CLEVERCLOCKS), iTunes Podcasts (ITPC), My Channels (MYCHANNELS)
Instant Watch Browser (NetflixIWB), Aquarium Screensaver (AQUARIUM), Clever Clocks Screensaver (CLEVERCLOCKS), iTunes Podcasts (ITPC), My Channels (MYCHANNELS)

RokuMarkn
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-25-2012
09:15 AM
Re: Video meta data - specifically length of video
That's correct, it's not currently available to Brightscript. There is a pending enhancement request to implement it, but I don't know when that will be released.
--Mark
--Mark
csPlay
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-26-2012
02:06 AM
Re: Video meta data - specifically length of video
Does that mean that if we use the component rovideoplayer, there is no way of knowing the full duration untill the end of the stream? (assuming we do not have a metadata for that specific stream)

TheEndless
Channel Surfer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-26-2012
09:36 AM
Re: Video meta data - specifically length of video
"csPlay" wrote:
Does that mean that if we use the component rovideoplayer, there is no way of knowing the full duration untill the end of the stream? (assuming we do not have a metadata for that specific stream)
That is correct. For non-Live HLS, I parse the M3U8 playlist to calculate the length. For MP4, without metadata, there's nothing to work with.
My Channels: http://roku.permanence.com - Twitter: @TheEndlessDev
Instant Watch Browser (NetflixIWB), Aquarium Screensaver (AQUARIUM), Clever Clocks Screensaver (CLEVERCLOCKS), iTunes Podcasts (ITPC), My Channels (MYCHANNELS)
Instant Watch Browser (NetflixIWB), Aquarium Screensaver (AQUARIUM), Clever Clocks Screensaver (CLEVERCLOCKS), iTunes Podcasts (ITPC), My Channels (MYCHANNELS)
bosborne
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-25-2013
06:46 PM
Re: Video meta data - specifically length of video
Is this still true? Not exposed to brightscript yet?

RokuMarkn
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-26-2013
07:54 AM
Re: Video meta data - specifically length of video
In 5.0 and later firmware, there is ifVideoPlayer.GetPlaybackDuration.
http://sdkdocs.roku.com/display/sdkdoc/ ... nasInteger
--Mark
http://sdkdocs.roku.com/display/sdkdoc/ ... nasInteger
--Mark