Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Adobe AIR Development

Reply
Contributor
dukebigalow
Posts: 18
Registered: ‎03-17-2012
My Device: playbook

NetStream Smart Seek (seamless video loop)

[ Edited ]

Our problem is, that we want to play an video loop seamless, but cannot embed it into the program (it is dynamicly downloaded by another program). Therefore I was thinking to enable inBufferSeek and increase the backBuffer to 15 seconds. In the documentation is a note, that Smart Seek requires the following:

NetStream.inBufferSeek = true
The default value of inBufferSeek is false.
Flash Media Server 3.5.3 -> There I see the problem
Flash Player 10.1
ActionScript 3.0

The value of the buffers (backBufferLength and bufferLength) must be large enough to fulfill the seek request.


Is there a workaround, that Smart Seek would work, even if the video is a local video?
Or are there other ways to loop an video seamless?
ByteArray -> NetStream.appendBytes() -> our videos are mp4 and not FLV

Any help is appreciated. Thanks
Please use plain text.
Retired
dmalik
Posts: 427
Registered: ‎02-22-2012
My Device: BlackBerry Z10, BlackBerry Dev Alpha C, BlackBerry PlayBook

Re: NetStream Smart Seek (seamless video loop)

I've never used a Flash Media server so I don't know if that will loop video seamlessly. I'm not aware of a way to loop a video seamlessly without embedding it on your timeline as a movieclip.

 

Have a look at this Stackoverflow post about the same topic which will hopefully provide a bit more information for you.

 

Regards,

Dustin

Follow me on Twitter: @dustinmalik
-----------------------------------------------------------------------------------------------------
Keep up to date on BlackBerry development: http://devblog.blackberry.com/
Please use plain text.
Contributor
dukebigalow
Posts: 18
Registered: ‎03-17-2012
My Device: playbook

Re: NetStream Smart Seek (seamless video loop)

[ Edited ]

Thanks for your thoughts.
I've already searched stackowerflow for this and came across that post.
Tried all of it, but nothing seams to improve performance.
It's not a second pause. There is more of a hiccup at the loop.
As far as I understand the principle of smart seek, it just keeps the data in the buffer, so the seek operation wouldn't empty it and load the video again (that's the problem at the loop, if I'm not mistaken).
Please someone correct me if I'm wrong.

Quote from the documentation:
"Flash Media Server 3.5.3 and Flash Player 10.1 work together to support smart seeking. Smart seeking uses back and forward buffers to seek without requesting data from the server. Standard seeking flushes buffered data and asks the server to send new data based on the seek time." 

Please use plain text.
Retired
dmalik
Posts: 427
Registered: ‎02-22-2012
My Device: BlackBerry Z10, BlackBerry Dev Alpha C, BlackBerry PlayBook

Re: NetStream Smart Seek (seamless video loop)

I was doing a bit more research for you and stumbled across LoaderMax by Greensock. I have used a few classes from Greensock in the past and they have always worked well but have never tried LoaderMax. Give it a try and let me know if it works for you. 

 

Here is a tutorial on how to use LoaderMax.

 

Regards,

Dustin

Follow me on Twitter: @dustinmalik
-----------------------------------------------------------------------------------------------------
Keep up to date on BlackBerry development: http://devblog.blackberry.com/
Please use plain text.
Contributor
dukebigalow
Posts: 18
Registered: ‎03-17-2012
My Device: playbook

Re: NetStream Smart Seek (seamless video loop)

So I tried that and was not able to produce an improvement in the loop quality.
If I'm right, LoaderMax is just another wrapper around the NetConnection,NetStream and Video classes.
Therefore the result couldn't be better as the "native" way. Am I wrong? 

Please use plain text.
Retired
dmalik
Posts: 427
Registered: ‎02-22-2012
My Device: BlackBerry Z10, BlackBerry Dev Alpha C, BlackBerry PlayBook

Re: NetStream Smart Seek (seamless video loop)

I thought they may have written some methods that would have helped with performance. I know TweenMax helped with tweening performance a lot. Like I said previously I've never tried using LoaderMax. If LoaderMax doesn't work I'm not sure what else to suggest at the moment. Sorry. 

 

Dustin

Follow me on Twitter: @dustinmalik
-----------------------------------------------------------------------------------------------------
Keep up to date on BlackBerry development: http://devblog.blackberry.com/
Please use plain text.
Contributor
dukebigalow
Posts: 18
Registered: ‎03-17-2012
My Device: playbook

Re: NetStream Smart Seek (seamless video loop)

So my findings with LoaderMax were, that it helps you handle multiple videos and the transitions between them.
So I decided to use VideoLoader class, repeat it indefinitely and the result was, that the video had a one second gap in between. 
So I tried to load two same videos and play them alternately. No improvements. The gap was gone, but if one played smooth, the other lagged and skipped multiple frames.
Has anyone another idea, how to use LoaderMax in a way, to loop a video seamlessly?

Please use plain text.