Forum Discussion

ToNyT's avatar
ToNyT
Visitor
9 years ago

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

7 Replies

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

    --Mark
  • 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=IsDownloadSegmentInfo

    How can i get chunk size info ?

    if you have any suggestions please let me know

    Thanks
  • "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=IsDownloadSegmentInfo

    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.
  • "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=IsDownloadSegmentInfo

    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?
  • "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=IsDownloadSegmentInfo

    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.
  • "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
  • "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.