1000 FAQs, 500 tutorials and explanatory videos. Here, there are only solutions!
Video streaming: recording your live videos
This guide explains how to record or archive all your broadcasts, which can be useful for creating TV replays or to view videos recorded by surveillance cameras, for example.
Enabling or disabling automatic live recording
To activate this option:
- Open the Manager (manager.infomaniak.com)
- Go to Video streaming
- Click the stream concerned
- Enable live recording via the stream dashboard
Once this feature has been enabled, the stream will be automatically and perpetually recorded from the time that it is sent to (or pulled by) the Infomaniak platform. Therefore, we recommend you remain vigilant over your FTP space, which could quickly become saturated. If necessary, you can also manually schedule recordings via the scheduling tool.
How automatic recording works
Once this option has been enabled, an mp4 file will be automatically generated after each broadcast, which will be transferred to the VOD or FTP space you have configured.
Important information:
- A broadcast is defined as the time between the connection and disconnection to the video encoder.
- Recording quality: in the case of a multi-bitrate stream, the maximum source quality will be maintained.
- Limitation of file size: in the case of continuous broadcast, you can define the maximum duration of each mp4 file. This option allows you to avoid generating files that are too big and to ensure that your archives are saved in the FTP or VOD space of your choice. Once the duration is reached, the recording is automatically stopped and then sent by FTP and a new recording is started.
Customizing the names of recordings
To enable you to easily identify and classify your archives, the name of the recordings is dynamically customizable using parameters specified between curly brackets.
E.g.: template_{stream_id}_{date|format:YYYY-MM-dd_hh:mm:ss}_{fragment_id|from:1|prefix:fragment_(|suffix:)}.{extension}
- stream_id // represents the stream identifier in the form of a chain of characters.
- date | format: ISO 8601 // date of the recording.
- time | format: ISO 8601 // time of the recording.
- datetime | format: ISO 8601 // date and time of the recording.
- fragment_id | from: number | prefix: string | suffix: string // number of the fragment in case the recording is fragmented with the possibility of providing a prefix and/or suffix. Each fragment will be incremented, "from" indicating the first reference fragment.
- extension // final extension of the file.
These settings are optional and their order is totally free. They can be used as many times as you wish. If you provide the same option several times, only the last will be taken into account. Any non-recognized option will simply be ignored.
Example 1
Situation: we have two daily programmes, the first starts at 10:00 and the second at 20:05. By configuring file naming in this way: template_{date|format:hh:mm:ss}, we obtain the following file names:
For 5 December 2019:
- The first recording at 10:00 will be called: template-10:00:00.mp4
- The second recording at 20:05 will be called: template-20:05:00.mp4
For 6 December 2019:
- The first recording at 10:00 will be called: template-10:00:00.mp4
The recording of the previous day will be overwritten and replaced by this one. - The second recording at 20:05 will be called: template-20:05:00.mp4
The recording of the previous day will be overwritten and replaced by this one. - Etc.
This logic can be particularly useful for a looped recording system, e.g. for a surveillance video. The user will only retrieve the video in case of need, avoiding the necessity to archive a potentially infinite number of videos that could saturate the FTP space.
Exemple 2
Situation: this time we have a perpetual recording, 24/7, with a file duration limited to 360 minutes. By configuring file naming in this way: template_{date|format:YYYY-MM-dd}_{fragment_id|from:1|prefix:fragment_(|suffix:)}.{extension}, we obtain the following file names:
- The first file of the day at 0:00 will be named: template_2019-02-05.mp4
- The second file of the day at 6:00 will be named: template_2019-02-05_fragment(1).mp4
- The third file of the day at 12:00 will be named: template_2019-02-05_fragment(2).mp4
- The fourth file of the day at 18:00 will be named: template_2019-02-05_fragment(3).mp4
By configuring file naming in this way: template_{date|format:YYYY-MM-dd}_{fragment_id|from:0|prefix:fragment_(|suffix:)}.{extension}, we obtain the following file names:
- The first file of the day at 0:00 will be named: template_2019-02-05_fragment(0).mp4
- The second file of the day at 6:00 will be named: template_2019-02-05_fragment(1).mp4
- The third file of the day at 12:00 will be named: template_2019-02-05_fragment(2).mp4
- The fourth file of the day at 18:00 will be named: template_2019-02-05_fragment(3).mp4