Wowza Community

LoopUntilLive/StreamPublisher not letting application shutdown

Just what the title says really. I had these running on an older version of WowzaMediaServer 3…and it worked fine. Once there were no connections to the stream, the application would shut down.

Now they just keep running. That’s problematic do to my license. I can’t have them pile up. Is this a bug? Because the docs say “and unload the streams when the application is shut down.”

Well, it’s not letting it shut down. One thing I did notice that is different than now is that JWPlayer would not show “Live Broadcast” when the looping video was playing. Now, it does. I’ve looked through everything, I could use a pointer here.

Thanks,

-Chris

EDIT: I’m looking at the GitHub for it, my understanding of Java is…limited. I do C++ and javascript mostly. If anyone can provide a pointer to how to even compile Java, I’d be very thankful.

Nobody? I use the LoopUntilLive because the new version of JWPlayer shows an ugly message when there is no live stream found, and it doesn’t let you try to reload the stream after that.

Loop until live was a life saver, and now it’s failing me.

Still nothing eh? I guess I should point out that I think it worked last time on WowzaMediaServer is because it treated the looping video as a VOD, and not a live stream.

My money is on WowzaStreamingEngine handling LoopUntilLive differently, and in that case, nothing is going to fix this problem.

I think I have a solution, but need someone to compile it (or at least link me to a page where there’s a quick & easy tutorial on compiling Java)

ServerListenerStreamPublisher.java has a class called StreamListener, with a method called onPlaylistItemStop. It looks like that’s where the stream can stop, as long as it’s not a repeating video.

Well, if we take from the wsi-plugin-limitstreamviewers module, a method called getViewerCounts I think we can modify the onPlaylistItemStop to check the viewer count too. So, looping video or not, if the viewer count == 0, the stream will unpublish, and the app will stop.

Anybody up for this?

Here are the githubs:

https://github.com/WowzaMediaSystems/wse-plugin-limitstreamviewers/blob/master/src/com/wowza/wms/plugin/ModuleLimitStreamViewers.java

https://github.com/WowzaMediaSystems/wse-plugin-streampublisher/blob/master/src/com/wowza/wms/plugin/streampublisher/ServerListenerStreamPublisher.java

-Chris

Looking over more Docs, I believe one can get the Client Count from the appInstance as well, so it should be simplier than what I posted above.

No interest on fixing this module?

Line 169 of ServerListenerStreamPublisher.java, change:

if (!stream.getRepeat() && stream.isUnpublishOnEnd())

to:

if (!stream.getRepeat() && stream.isUnpublishOnEnd() || appInstance.getClientCount () == 0 )

Hi Chris, to clarify, the LoopUntilLive module unloads/destroys the stream objects when the application is shutdown either through the UI or through an API call. It does not unload/remove the stream (and thus does not shutdown the application instance) when there are no more player connections to the stream. The looping VOD asset is streamed as live, and is similar to having an encoder constantly publishing the stream to the application (hence also why JWPlayer shows the Live Broadcast icon).

You can also look into customizing the available source code to fit your requirements. You can compile the Java code using Eclipse. We have a Wowza IDE that you can install for easier compiling.

That’s exactly what I did.