How to schedule streaming with Wowza Streaming Engine

左心房为你撑大大i 提交于 2019-12-25 02:06:21

问题


I am trying to schedule a playlist on a Wowza server, so that videos get played successively (like a TV channel). I started following this tutorial :

http://www.wowza.com/forums/content.php?145-How-to-schedule-streaming-with-Wowza-Streaming-Engine-%28ServerListenerStreamPublisher%29

In /usr/local/WowzaStreamingEngine/conf/Server.xml I added this in ServerListeners :

<ServerListener
   <BaseClass>com.wowza.wms.plugin.collection.serverlistener.ServerListenerStreamPublisher</BaseClass>
</ServerListener>

In /usr/local/WowzaStreamingEngine/conf/Application.xml I added this in Modules :

<Module>
  <Name>streamPublisher</Name>
  <Description>Schedules streams and playlists.</Description>
  <Class>com.wowza.wms.plugin.collection.module.ModuleStreamPublisher</Class>
</Module>

I created a smil file in /usr/local/WowzaStreamingEngine/content/ana.smil containing this :

<?xml version="1.0" encoding="UTF-8"?>
<smil>
    <head>
    </head>
    <body>

        <stream name="live"></stream>

        <playlist name="pl1" playOnStream="live" repeat="true" scheduled="2013-09-25 16:00:00">
            <video src="mp4:sample.mp4" start="5" length="5"/>
            <video src="mp4:sample.mp4" start="50" length="5"/>
            <video src="mp4:sample.mp4" start="150" length="5"/>
        </playlist>
    </body>
</smil>

I rebooted the server...

Now I was expecting to see the stream coming to my Application "live through the Stream called "live"... But nothing shows.

I guess I missed a step, maybe adding streamPublisherSmilFile property as said in Wowza link I posted above ... But where do I set that ?

Thanks for you help. Regards, John


回答1:


You need to add both the Server and Application Properties

Server Properties

/usr/local/WowzaStreamingEngine/conf/Server.xml

 <!-- Properties defined here will be added to the IServer.getProperties() collection -->
<Properties>
   <Property>
      <Name>...</Name>
      <Value>...</Value>
      <Type>...</Type>
   </Property>
</Properties>

Application Properties

/usr/local/WowzaStreamingEngine/conf/{APP_NAME}/Application.xml

Eg: for the live app:

/usr/local/WowzaStreamingEngine/conf/live/Application.xml

  <!-- Properties defined here will be added to the IApplication.getProperties() and IApplicationInstance.getProperties() collections -->
<Properties>
   <Property>
      <Name>...</Name>
      <Value>...</Value>
      <Type>...</Type>
   </Property>
</Properties>

You also need to copy the module .jar file from the add-on collection to:

/usr/local/WowzaStreamingEngine/lib

And then restart Wowza.




回答2:


pre requirement: in wowza, the hierarchy of config files is in this order:

1- wowza-dir/conf/specific_application_name/Application.xml    
2- wowza-dir/conf/Application.xml   
3- wowza-dir/Server.conf

if something(setting,config,...) is set in some of these 3 config files, wowza will select the most specific config file. It means if you set your content directory in both conf/your_app/Application.xml and conf/Application.xml ,wowza will choose the directory mentioned in conf/Application.xml. The same rule is true for other things like smil files and ... .

OK now let's back to our problem: There are two ways of scheduled streaming using wowza:
1- Server Listener: you set setting of streaming and scheduling in server config file(Application.xml)
2- Application Module: you set settings in application config file(Application.xml)

for example if you have my_stream_sched.smil file containing stream_schedule in your my_app_content_directory, in the server listener mode, the smil file is loaded when server starts and if you wanna change that, you need to restart the server! In application module, you only need restart application.




回答3:


We need to add the server and application properties as given in the link to Server.xml and Application.xml of the application.

Link : http://www.wowza.com/forums/content.php?145-How-to-schedule-streaming-with-Wowza-Streaming-Engine-%28ServerListenerStreamPublisher%29

And copy the jar to /usr/local/WozaStreamingEngine/lib/ , then restart the WowzaStreaming engine.

Do check the logs for loading of both modules i:e ServerListenerStreamPublisher and ModuleStreamPublisher.

Edit the /usr/local/WowzaStreamingEngine/content/ana.smil file for scheduling the stream,and restart the application only.No server restart is required.



来源:https://stackoverflow.com/questions/29104416/how-to-schedule-streaming-with-wowza-streaming-engine

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!