Wowza Community

Stream class stream controller

Right, no smil in the controller, it’s acting on running objects. The source code is at the top of this thread. It’s short, simple, not much to it really.

Richard

It is getting repetitive, I think it’s all in that post already. Try it out, there’s a little Flash front end.

Richard

It’s a server-side switch that is not dependent on the client.

Richard

New info: The iphone/ipad is sensitive to encoding changes and will freeze. So server-side playlists may not work in those situations.

Richard

It’s a matter of knowing that there is a stream name, e.g., “Stream1” created by the scheduler. That controller will create a Stream from scratch too.

Richard

You can use HTTProviders. See this example:

http://www.wowza.com/community/t/-/245

Richard

Not familiar with that player, but usually need Flash CS or Flex/Flash Builder to compile.

Richard

Yes it is.

Richard

me? I’m EST in FLA

Richard

Playlist items are videos, like Extremists.m4v or actual live streams being published by an encoder.

Playlists and Streams are separate, they are “loosely coupled” You can only have one Playlist associated with a Stream at a time, but you can maintain many Playlists and Streams and change them around. Try it out with the controller app. You could have one Stream and many Playlists, and switch between Playlists to change what is playing on that Stream.

Richard

In the scheduler smil, to include the live stream, use “-2” for the start value:

<video src="liveStream_0.flv" start="-2" length="15" />

You don’t need the controller app to do it now. It might be broken anyway. Just use the scheduler for now.

Does the live stream really have a .flv extension? It’s possible, but a little unusual. In anycase, whatever stream name you are using in the live encoder is what you should use, extension or no extension.

fyi, mixing streams in the schedule that have different encodings will have mixed results. Should work in Flash, but IPhone, Silverlight and RTSP playback might not work very well or at all.

Richard

Maybe not possible. With this smil, users who are tuned in from the first moment will see 15 seconds of liveStream_0.flv, then 15 seconds of Extremists.m4v, then the livestream indefinitely (because length is -1). You could put a length on livestream so it stops periodically, then the two other 15 second segments will play again, then livestream will start again. But I think if livestream is stopped (e.g. the live encoder stops publishing), Stream1 will stop.

Richard

There’s no magic trick. There’s a million ways to arrange these parts. The event handlers of IMediaStreamActionNotify2 and IStreamNotify might be useful

Richard

Richard,

1/ Could it be possible to remove an item from a playlist dynamically just like it’s possible to add one ?

2/ If I add an item to playlist, then later restart WMS, the item won’t be played, which is normal as the module don’t rewrite SMIL file on addItemToPlaylist().

In this case, I’ll use my Flex app to rewrite SMIL file. Question is : openPlaylistOnStream() reloads the SMIL file without the need to restart WMS ?

Thank you.

Ok. So you mean that if I change SMIL file content and call openPlaylistOnStream(), controller won’t read SMIL ?

Controller works with in memory playlist ?

Ok. Let’s say ServerListener starts with streamschedule.smil, playing 1 stream Stream1, containing 1 playlist pl1.

I want to change something during playback, no matter what, using a Controller and without having to restart WMS.

For now, I can rewrite streamschedule.smil with a Flex app to reflect the changes.

In controller, could I code a specific openPlaylistOnStream() to open a new Stream ?

When I write “new”, I mean a Stream which was not previously in streamschedule.smil when ServerListener starts ?

And what about opening a new Playlist ?

I know we talk about this earlier and I’m sure my questions drive you crazy :wink:

By the way, hope you see what I’m trying to do …

Seems that switching from playlist containing files to playlist with live stream does not work on iPad. Works great with Flash.

Each file and live stream work on iPad. Switch operation between them don’t.

More to come …

I know Richard, I’m using a Flex app built from your FLA code.

Switching works on Flash client but not on iPad … Once again, more to come later …

Ok, this confirms what I experienced earlier.

Where does come this info ? Your own tests ? Apple ?

Just received your answer Richard. Don’t know where to go now :frowning:

I read all the postings in that thread and didn’t find how to make specific Stream entity common to both way to handle it.

Also, I don’t know where the error line in logs come from … Will investigate more on this …