Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
ToNyT
Visitor

During a video stream, how can i get chunk size

Hi,

I need to get what's the byte size for a downloaded chunk.... what's the way?

Have you some suggestion?

Thanks
0 Kudos
7 REPLIES 7
RokuMarkn
Visitor

Re: During a video stream, how can i get chunk size

What do you mean by "chunk" in this context? And why do you need to know the size?

--Mark
0 Kudos
ToNyT
Visitor

Re: During a video stream, how can i get chunk size

Hi Mark,

if you think that my post is in a wrong section, please, move this thread to the correct place.

I need to know the size for debugging utilities.
Running a smooth streaming session, i wont' know, what's the size (byte) of a downloaded chunk.

I find this project on github
https://github.com/belltown/Roku-NewVideoPlayer/blob/master/source/Utils.brs

Take a look on line 602, we find it: IsDownloadSegmentInfo, and on line 611 we can find: _debug ("SegSize: " + info.SegSize.ToStr (), "> ")

Can i suppose that "IsDownloadSegmentInfo", and "SegSize", give us info about chunks?

I read some values ​​, but I do not know what they mean.

Functions used in this project are available on roku, but nothing is described on official documentation:
https://sdkdocs.roku.com/dosearchsite.action?where=sdkdoc&spaceSearch=true&queryString=IsDownloadSeg...

How can i get chunk size info ?

if you have any suggestions please let me know

Thanks
0 Kudos
belltown
Roku Guru

Re: During a video stream, how can i get chunk size

"ToNyT" wrote:
Hi Mark,

if you think that my post is in a wrong section, please, move this thread to the correct place.

I need to know the size for debugging utilities.
Running a smooth streaming session, i wont' know, what's the size (byte) of a downloaded chunk.

I find this project on github
https://github.com/belltown/Roku-NewVideoPlayer/blob/master/source/Utils.brs

Take a look on line 602, we find it: IsDownloadSegmentInfo, and on line 611 we can find: _debug ("SegSize: " + info.SegSize.ToStr (), "> ")

Can i suppose that "IsDownloadSegmentInfo", and "SegSize", give us info about chunks?

I read some values ​​, but I do not know what they mean.

Functions used in this project are available on roku, but nothing is described on official documentation:
https://sdkdocs.roku.com/dosearchsite.action?where=sdkdoc&spaceSearch=true&queryString=IsDownloadSeg...

How can i get chunk size info ?

if you have any suggestions please let me know

Thanks

roVideoScreenEvent and roVideoPlayerEvent contain these undocumented event types: 31 - IsDownloadSegmentInfo(), and 37 - IsSegmentDownloadStarted(). I'm not sure why they're undocumented. I've found them useful for debugging HLS streams. You can figure out the event fields from the GitHub file you linked to.

IsDownloadSegmentInfo() does contain the size of each downloaded HLS segment. I'm not sure whether it would apply to smooth streams as well. You could try it and see.
0 Kudos
ToNyT
Visitor

Re: During a video stream, how can i get chunk size

"belltown" wrote:
"ToNyT" wrote:
Hi Mark,

if you think that my post is in a wrong section, please, move this thread to the correct place.

I need to know the size for debugging utilities.
Running a smooth streaming session, i wont' know, what's the size (byte) of a downloaded chunk.

I find this project on github
https://sdkdocs.roku.com/dosearchsite.action?where=sdkdoc&spaceSearch=true&queryString=IsDownloadSeg...

How can i get chunk size info ?

if you have any suggestions please let me know

Thanks

roVideoScreenEvent and roVideoPlayerEvent contain these undocumented event types: 31 - IsDownloadSegmentInfo(), and 37 - IsSegmentDownloadStarted(). I'm not sure why they're undocumented. I've found them useful for debugging HLS streams. You can figure out the event fields from the GitHub file you linked to.

IsDownloadSegmentInfo() does contain the size of each downloaded HLS segment. I'm not sure whether it would apply to smooth streams as well. You could try it and see.

Hi belltown,
i have tryed to play an ism, stream format, using your Git code.
That's the Manifest link:
http://playready.directtaps.net/smooths ... m/Manifest
Updating the search link on documentation ( https://sdkdocs.roku.com/display/sdkdoc/roVideoScreen#roVideoScreen-SupportedInterfaces i have found info about ism support, so i modified categories.xml file in your code, to play that contents. 

Starting the video i read this for example:


...
uiPlayVideo. roVideoScreenEvent [31]-isDownloadSegmentInfo. Message: Download segment info. Index: 58. Data: 0
     Sequence:         58
     Status:           0
     SegBitrate:       2962
     DownloadDuration: 535
     SegUrl:           http://playready.directtaps.net/smoothstreaming/SSWSS720H264/SuperSpeedway_720.ism/QualityLevels(2962000)/Fragments(video=1161160000)
     SegSize:          831499
     BufferSize:       0
     BufferLevel:      0
     SegType:          2
--
uiPlayVideo. roVideoScreenEvent [31]-isDownloadSegmentInfo. Message: Download segment info. Index: 59. Data: 0
     Sequence:         59
     Status:           0
     SegBitrate:       2962
     DownloadDuration: 535
     SegUrl:           http://playready.directtaps.net/smoothstreaming/SSWSS720H264/SuperSpeedway_720.ism/QualityLevels(2962000)/Fragments(video=1181180000)
     SegSize:          846702
     BufferSize:       0
     BufferLevel:      0
     SegType:          2
-

...


You said: "I'm not sure whether it would apply to smooth streams as well".  Why do you think so?
0 Kudos
belltown
Roku Guru

Re: During a video stream, how can i get chunk size

"ToNyT" wrote:
"belltown" wrote:
"ToNyT" wrote:
Hi Mark,

if you think that my post is in a wrong section, please, move this thread to the correct place.

I need to know the size for debugging utilities.
Running a smooth streaming session, i wont' know, what's the size (byte) of a downloaded chunk.

I find this project on github
https://sdkdocs.roku.com/dosearchsite.action?where=sdkdoc&spaceSearch=true&queryString=IsDownloadSeg...

How can i get chunk size info ?

if you have any suggestions please let me know

Thanks

roVideoScreenEvent and roVideoPlayerEvent contain these undocumented event types: 31 - IsDownloadSegmentInfo(), and 37 - IsSegmentDownloadStarted(). I'm not sure why they're undocumented. I've found them useful for debugging HLS streams. You can figure out the event fields from the GitHub file you linked to.

IsDownloadSegmentInfo() does contain the size of each downloaded HLS segment. I'm not sure whether it would apply to smooth streams as well. You could try it and see.

Hi belltown,
i have tryed to play an ism, stream format, using your Git code.
That's the Manifest link:
http://playready.directtaps.net/smooths ... m/Manifest
Updating the search link on documentation ( https://sdkdocs.roku.com/display/sdkdoc/roVideoScreen#roVideoScreen-SupportedInterfaces i have found info about ism support, so i modified categories.xml file in your code, to play that contents. 

Starting the video i read this for example:


...
uiPlayVideo. roVideoScreenEvent [31]-isDownloadSegmentInfo. Message: Download segment info. Index: 58. Data: 0
     Sequence:         58
     Status:           0
     SegBitrate:       2962
     DownloadDuration: 535
     SegUrl:           http://playready.directtaps.net/smoothstreaming/SSWSS720H264/SuperSpeedway_720.ism/QualityLevels(2962000)/Fragments(video=1161160000)
     SegSize:          831499
     BufferSize:       0
     BufferLevel:      0
     SegType:          2
--
uiPlayVideo. roVideoScreenEvent [31]-isDownloadSegmentInfo. Message: Download segment info. Index: 59. Data: 0
     Sequence:         59
     Status:           0
     SegBitrate:       2962
     DownloadDuration: 535
     SegUrl:           http://playready.directtaps.net/smoothstreaming/SSWSS720H264/SuperSpeedway_720.ism/QualityLevels(2962000)/Fragments(video=1181180000)
     SegSize:          846702
     BufferSize:       0
     BufferLevel:      0
     SegType:          2
-

...


You said: "I'm not sure whether it would apply to smooth streams as well".  Why do you think so?

Because I haven't personally tried it with smooth streams, and because at the time there was no documentation for IsDownloadSegmentInfo. It looks like they added the documentation after I posted about its omission, although I can't tell for sure because this stupid new forum theme doesn't have posting dates any more. From what you posted, it looks like it's working though.
0 Kudos
EnTerr
Roku Guru

Re: During a video stream, how can i get chunk size

"belltown" wrote:
... at the time there was no documentation for IsDownloadSegmentInfo. It looks like they added the documentation after I posted about its omission, although I can't tell for sure because this stupid new forum theme doesn't have posting dates any more. From what you posted, it looks like it's working though.

You reported 7/21 11:52am, "they" added to docs within the hour. Amazingly fast by any standard. Much gratitude goes @RokuMarkN
0 Kudos
belltown
Roku Guru

Re: During a video stream, how can i get chunk size

"EnTerr" wrote:

You reported 7/21 11:52am, "they" added to docs within the hour. Amazingly fast by any standard. Much gratitude goes @RokuMarkN

I see that now. Thanks for the tip about "hovering" over "last week" to see the actual timestamp. Thanks also to RokuMarkN for the speedy doc update.
0 Kudos
Need Assistance?
Welcome to the Roku Community! Feel free to search our Community for answers or post your question to get help.

Become a Roku Streaming Expert!

Share your expertise, help fellow streamers, and unlock exclusive rewards as part of the Roku Community. Learn more.