• SEARCH
  • DOWNLOADS
  • MY ACCOUNT
  • Buy (0)
  • CONTACT
  • Free Trial
Wowza Logo
  • PRODUCTS
  • DEVELOPER
  • SOLUTIONS
  • PRICING
  • RESOURCES
  • SUPPORT
  • My Account
  • Buy (0)
  • SEARCH
  • Ask a question
  • Forums
    • Wowza ClearCaster
    • Wowza Streaming Engine
    • Wowza Streaming Cloud
    • Wowza Player
    • Wowza GoCoder SDK
    • Wowza Developer Dojo
    • Topics
    • Questions
    • Articles
    • Users
    • Badges
  • Sign in
  • Community Home /
  • Wowza Streaming Engine /
  • On-Demand Streaming /
avatar image
Question by Andras Kovacs · Jul 06, 2011 at 01:50 PM · on-demand streaming

Dynamic stream switching

I have problem with stream switching with on demand (f4v file) content. The switch from stream A to B is extremely slow taking approx. 12-20sec. Most likely a keyframe is expected by the client from Wowza to start playing back. I am using Wowza version 2.2.3.

We were following Adobe documentation when implementing dynamic stream switching:

http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/net/NetStreamPlayTransitions.html#SWITCH

http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/net/NetStreamPlayOptions.html

Our code is something like this:

var streamOptions:NetStreamPlayOptions = new NetStreamPlayOptions();

streamOptions.streamName = "HQStream";

streamOptions.oldStreamName = "LQStream";

streamOptions.start = lqStream.start; // LQ Stream start position

streamOptions.len = lqStream.len; // LQ Stream length

streamOptions.transition = NetStreamPlayOptions.SWITCH;

I also added this property to application.xml, but no effect:

<Property>

<Name>enableDynamicStreamMarkers</Name>

<Value>true</Value>

<Type>Boolean</Type>

</Property>

Could you please advise on the above? What is wrong with this? Is keyframe alignment is required for fast stream switching?
Comment

People who like this

0 Show 0
10 |600 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

3 Replies

· Add your reply
  • Sort: 
avatar image

Answer by Richard Lanham · Jul 06, 2011 at 04:03 PM

JW player has Flash Dynamic Streaming features that work well with Wowza. See if your files work using this:

http://www.longtailvideo.com/support/jw-player/jw-player-for-flash-v5/16012/setting-up-rtmp-dynamic-streaming

Also try Flash HTTP (Sanjose) with OSMF player using server-side smil following the multi-bitrate section of vod tutorial:

http://www.wowza.com/forums/content.php?35-How-to-play-a-video-on-demand-file

The enableDynamicStreamMarkers property is not required with that version of Wowza, but can't hurt.

For encoding files that will be keyframe aligned, try MS Expression 4 encoder:

http://www.wowza.com/forums/content.php?192-Encoding-Suggestions-for-Video-on-Demand

Richard
Comment

People who like this

0 Show 1 · Share
10 |600 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Andras Kovacs · Jul 07, 2011 at 08:50 AM 0
Share
Unfortunately, it does not help. We know JW player example that is an OSMF based implementation as well. Adobe docs say this:

"Flash Media Server handles the actual switching of the streams for the user based on the client-originated request to do so. Once the server receives the request to switch the user's stream to a different stream (bandwidth), it will wait a short period for the optimal point to switch with minimal playback impact to the user. This occurs on the nearest keyframe for video-only content, the nearest audio sample for audio-only streams, and the combination of the two for video content with audio. This means that video encoded with a keyframe every six seconds could take up to six seconds, once the command to switch streams has been received by the server, to actually switch the content and send the transition-complete notification."

My questions are:

1. What could be technically causing the very long stream switching time?

2. How can I debug that?

3. We use ffmpeg for conversion. Expression is not playing here. Could you please provide best practices examples with ffmpeg?

See this example for the speed of stream switch: http://client.shellshaper.com/v/Player_Video.html
avatar image

Answer by Richard Lanham · Jul 07, 2011 at 12:11 PM

In our tests, ffmpeg does not produce keyframe aligned sets. Expression 4 does work in our tests, it is inexpensive and we recommend it highly for this purpose.

The only way I know to test alignment is to play the vod streams as live streams with the Stream class scheduler, then use this method to debug keyframe alignment:

http://www.wowza.com/forums/content.php?77-How-to-debug-encoder-multi-bitrate-key-frame-alignment

This is the Stream class scheduler that you can use to setup live streams with file sources:

http://www.wowza.com/forums/content.php?145-Stream-class-example-with-playlists-and-schedules-set-in-smil-file

Wowza does require keyframe alignment when switching at present. A future version of Wowza may force switching regardless of alignment.

Richard
Comment

People who like this

0 Show 1 · Share
10 |600 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image C F · Nov 25, 2011 at 12:07 AM 0
Share
In our tests, ffmpeg does not produce keyframe aligned sets. Expression 4 does work in our tests, it is inexpensive and we recommend it highly for this purpose.

I do have expressions encoder, but how can I get expressions encoder to publish to Wowza? I thought they were incompatible?
avatar image

Answer by Richard Lanham · Nov 24, 2011 at 04:49 PM

Expression 4 live streaming capabilities are not supported by Wowza, which does not accept pre-segmented Smooth streams. We recommend Expression 4 for encoding static files for multi-bitrate vod streaming.

http://www.wowza.com/forums/content.php?192-Encoding-Suggestions-for-Video-on-Demand

Richard
Comment

People who like this

0 Show 0 · Share
10 |600 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

2 People are following this question.

avatar image avatar image

Related Questions

Mpeg Dash seeking blocky green picture for VOD files. 2 Answers

Play mp4 in html 5 browser without plugin 3 Answers

Stream Timeout on Pause (HTTP Cupertino) 3 Answers

Help to create the first application with html5 + iPhone/iPad. 3 Answers

Problems using wowzaplaystart/wowzaplayduration 1 Answer

Hot Topics
  • AWS Hosting
  • Mobile SDK
  • Deployment Options
  • Load Balancing
  • Content Security
Product Sign-in
  • Wowza Streaming Cloud
  • Wowza Player
Under the Hood
  • Developer Tools
  • Wowza System Status
  • Test Players
  • Developer IDE
Resellers
  • Find a Reseller
  • Reseller Portal
  • Become a Reseller
Company
  • About Us
  • Blog
  • News
  • Events
  • Careers
  • Customers
  • Partners
  • Contact Us
Stay Connected
Get Monthly Newsletter
Select a Language
  • English
    • English
    • Español
    • 日本語
    • 한국어
    • हिन्दी भाषा
    • 中文
    • русский язык

© 2005–2019 Wowza Media Systems, LLC. All rights reserved.   Terms | Privacy | Trademarks | Legal


Enterprise
Social Q&A

  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Create an article
  • Forums
  • Wowza ClearCaster
  • Wowza Streaming Engine
  • Wowza Streaming Cloud
  • Wowza Player
  • Wowza GoCoder SDK
  • Wowza Developer Dojo
  • Explore
  • Topics
  • Questions
  • Articles
  • Users
  • Badges