Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • MP4 for H.264 + AAC codecs
  • WebM for VP8 + Vorbis codecs
  • TS for H.264 + ADTS

Quick manual on testing

Stream recording

...

turns on recording for the streams captured from RTSP IP cameras.

Forming the name of the stream record file

By default, the file name is formed by template specified with stream_record_policy_template parameter:

...

Recording to MPEG-TS container

By default, H264 streams are recorded to MP4 container and VP8 streams to WebM. Since build 5.2.610, H264 streams can also be recorded to TS container using the following parameter

Code Block
themeRDark
streamrecord_recordh264_policyto_template=stream-{mediaSessionId}-{login}

The following elements can be used in template:

...

ts=true

Known limits

1. VLC before 3.0.8 can not play TS recordings.

2. TS recordings can not be rewound while playing in VLC.

Forming the name of the stream record file

By default, the file name is formed by template specified with stream_record_policy_template parameter:

Code Block
languagebash
themeRDark
stream_record_policy_template=stream-{mediaSessionId}-{login}

The following elements can be used in template:

ElementDescriptionMaximum size
{streamName}Stream name
{duration}

File duration, for MP4 recordings only


{startTime}Recording start time20 characters
{endTime}Recording end time20 characters
{sessionId}Session ID in BASE64 encoding60 characters
{mediaSessionId}Media session ID36 characters
{login}Login32 characters
{audioCodec}Audiocodec4 characters
{videoCodec}Videocodec4 characters

...

Audio track bitrate configuration for FDK AAC codec

...

codec

Since 5.2.428, the ability is added to set audio track bitrate mode for recording with FDK AAC codec. By default, mode 5 is set (VBR 112 kbps). This value can be changed with the following parameter

Code Block
themeRDark
record_fdk_aac_bitrate_mode=5

The following bitrate modes are possible:

  • 0 - CBR
  • 1-5 - VBR

Note that recording files playback by file timestamps using nginx module ngx_http_mp4_module is possible for VBR recordings only.

Audio channels configuration

Since build 5.2.610 it is possible to set audio channels count for recordings using the following parameter

Code Block
themeRDark
record_audio_codec_channels=2

By default, audio channels count set to 2 (stereo). To record stream with monophonic audio, the following should be set

Code Block
themeRDark
record_fdkaudio_aaccodec_bitrate_mode=5

The following bitrate modes are possible:

  • 0 - CBR
  • 1-5 - VBR

...

channels=1

Client side

If stream recording is enabled on the server, whether the stream is recorded or not is determined by the value of record parameter passed into the createStream function in the script of the publisher client:

...