Start / stop outgoing stream using API

Hi

I have a always on RTMP camera in a conference room, that streams to my Wowza Engine (using Source Authentication).

How can I start/stop the outgoing live stream using the API?

(I only want to allow people from outside to look at specific times)

We have an article on how to list, create, update, and remove stream targets at the URL below.

https://www.wowza.com/docs/stream-targets-query-examples-push-publishing

Maybe I’ve miss understood the use of Stream Targets, I thought they were only used to redistribute to CDNs, youtube, etc?

But are you saying I can use them to stop/start a regular outgoing stream? (Where viewing on /live/myStream/playlist.m3u8, with HLS/mpeg-dash)

In the guide it seems like they are redistributing the stream to it’s self? (“host”: “localhost”) Does that mean the same instance of wowza?

Hi @Anders Gunnarsson, yes stream targets are used to push a stream to another server, CDN or other distributed destinations; not for a regular outgoing stream. The article above refers to settings for stream targets admin.

Wowza uses localhost rather than actual IP addresses as people might use that actual IP address for testing. It is assumed that the person who is managing the server is logged directly into the server.

This is why localhost is used in the API call.

`curl -X GET \
-H 'Accept:application/json; charset=utf-8' \
-H 'Content-Type:application/json; charset=utf-8' \
"http://localhost:8087/v2/servers/_defaultServer_/vhosts/_defaultVHost_/applications/live/adv"

Ok, but I don’t have a need to redistribute anywhere, I prefer to use the regular wowza outgoing live stream, but I need to start/stop it (even that the incoming stream isn’t stopped).

Do you have suggestions on how to do that?

Hi Anders,

If you’re looking to restrict playback to a specific time or for only certain users then using Secure Token might be a good optio

https://www.wowza.com/docs/how-to-protect-streaming-using-securetoken-in-wowza-streaming-engine#securetoken-query-parameters

Otherwise, if you’re looking to control when a playback stream is created by the Application, you could control the source publishing credentials or MediaCaster stream file connections using the REST API.

https://www.wowza.com/docs/stream-management-query-examples

https://www.wowza.com/docs/live-sources-query-examples

Best regards,
Andrew

Servers do not push content to players. Players “pull” content from streaming media servers. For example.

Encoder --> Wowza Streaming Engine <-- Clients connect to server for playback.

The article below will show you how to configure an RTMP encoder to send a live stream to Wowza Streaming Engine and play back the content via Apple HLS.

https://www.wowza.com/docs/how-to-set-up-live-streaming-using-an-rtmp-based-encoder

This is an example of an Apple HLS playback URL.

http://[wowza-address]:1935/live/myStream/playlist.m3u8

Servers do not push content to players. Players “pull” content from streaming media servers. For example.

Encoder --> Wowza Streaming Engine <-- Clients connect to server for playback.

The article below will show you how to configure an RTMP encoder to send a live stream to Wowza Streaming Engine and play back the content via Apple HLS.

https://www.wowza.com/docs/how-to-set-up-live-streaming-using-an-rtmp-based-encoder

This is an example of an Apple HLS playback URL.

http://[wowza-address]:1935/live/myStream/playlist.m3u8

You have a few choices on when you want to perform streaming.

1) Manually start and stop your live stream.

2) Use our Stream Scheduler plugin.

https://www.wowza.com/docs/how-to-schedule-streaming-with-wowza-streaming-engine-streampublisher

Yes, what I’m trying to achieve is something like

Encoder --> Wowza Streaming Engine [Conversion & Streaming Start/Stop] <-- Clients connect to server for playback.

Both so that users can’t connect, and that wowza doesn’t keep converting (wasting cpu) during that time.

Maybe ModuleTranscoderControl is close, but that cant be controlled remotely.

Seems like Wowza Cloud has a REST API for their Scheduling, is that possible for Streaming Engine?
https://www.wowza.com/docs/how-to-schedule-a-transcoder-by-using-the-wowza-streaming-cloud-rest-api

Take a look at our stream publisher module.

https://www.wowza.com/docs/how-to-schedule-streaming-with-wowza-streaming-engine-streampublisher