Results 1 to 2 of 2

Thread: Schedule a live stream to run for x seconds

  1. Default Schedule a live stream to run for x seconds

    I'm creating a scheduler that can start a live stream at a defined date/time. Using the ServerListenerStreamPublisher as a starting point, I use the following code to create the playlist and start playing:
    private class StreamListener implements IStreamActionNotify {
      public void onPlaylistItemStart(Stream stream, PlaylistItem playlistItem) {
        WMSLoggerFactory.getLogger(null).info("PlaylistItem started");
      public void onPlaylistItemStop(Stream stream, PlaylistItem playlistItem) {
        WMSLoggerFactory.getLogger(null).info("PlaylistItem stopped");
    Stream stream = Stream.createInstance(appInstance, streamname);
    stream.addListener( new StreamListener() );
    Playlist playlist = new Playlist("mytest");
    playlist.addItem("udp://", -2, 3600);;
    As you can see, I'm trying to play this live stream for exactly one hour. To my surprise, I see that the StreamListener.onPlaylistItemStart and StreamListener.onPlaylistItemStop get called directly after each other. This happens only when the source is a live stream (I also tried with a .stream file, same result) - when I try it with sample.mp4, it works as expected.

    My intention is to use the startMediaCasterStream/stopMediaCasterStream inside onPlaylistItemStart/onPlaylistItemStop

    Is this behavior as designed?

  2. #2
    Join Date
    May 2013


    Refer to ticket #107444

Similar Threads

  1. Replies: 1
    Last Post: 09-25-2014, 04:17 AM
  2. How to schedule live stream with StreamPublisher?
    By in forum Wowza Streaming Server Java API
    Replies: 4
    Last Post: 03-28-2014, 01:31 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts