Skip to main content

Automatic push

Creating an automatic recording/push

Creating an automatic recording can be done through the option add an automatic push. There you can create an automatic push.

Picture of the add an automatic push panel

The only thing to create an automatic push that will record when a stream is active is simply fill in a push target and make sure the delay before retry is set to any number but 0.

However automatic pushes allow for greater control when they should go active, you can determine whether they should use variables or a scheduled time to go active. For more on this, please read the calendar scheduling guide or the custom variable scheduling guide.

Active pushes/recordings & stopping them

Active pushes can be found under the pushes header. You will see an added button to stop all pushesif there are any active pushes. You can see both the status of recordings and stop them here. Both automatic and single pushes will be shown here.

Picture of active pushes within MistServer

Keep in mind that if you stop an automatic recording that it will activate again if the activate conditions still match, so you might overwrite your previous recording.

Examples

Here we'll give a few examples of sources so you can get an idea of how recordings would work and what they would insert.

For timing reasons we will assume the date Friday, November 3, 2023 12:00:00 PM The stream name will be livestream with wild card name +wildcard_01

Recording MKV with the full stream name

/path/to/directory/$stream.mkv

This would insert the stream name and wildcard name so the file would become livestream+wildcard_01.mkv.

Recording TS with just the base name

/path/to/directory/$basename.mkv

This would insert only the stream name so the file becomes livestream.mkv.

Recording MKV with just the wild card name

/path/to/directory/$wildcard.mkv

This would insert only the wildcard part, so the file becomes +wildcard_01.mk

Recording MKV to a stream specific folder with unique start name every time

/path/to/directory/$basename/D$yday_H$hour_M$minute_S$second.mkv

This would record to a folder named livestream and there a file named D307_H12_M00_S00.mkv would be created. If this push starts again it would update to the new time, for example 1 hour 45min and 37 seconds later it would be: D307_H13_M45_S37.mkv

Recording TS to a unique stream using datetime & stream name

/path/to/directory/$datetime.$stream.ts

This would create a file named 2023.11.03.12.00.00.livestream+wildcard_01.ts

Creating a HLS playlist

/path/to/directory/$livestream/segments/$segmentCounter.ts?m3u8=../index.m3u8

This would create a folder livestream in which the playlist index.m3u8 and the folder segments which contains all the HLS segments, by default in segments of 60 seconds.

Pushing towards an external SRT source

srt://example.com:8889?streamid=examplestream

This would SRT push towards the server example.com on UDP port 8889 using the parameter streamid=examplestream to select the stream to push against.

Pushing RTMP

rtmp://example.com/live/examplestream

This would push RTMP towards the server example.com on TCP port 1935 (default) towards application live and the stream examplestream.

Pushing RTMPS

rtmps://live-api-s.facebook.com:443/rtmp/FB-randomizedtoken?usertoken?

This would push RTMP towards the server live-api-s.facebook.com on TCP port 443 using application rtmp. The streamname contains a ? so an extra ? at the end has been added to make sure the full RTMP address is used.