Conveyor

SmartMEDIA Conveyor has two configuration files: the main configuration file and the channels’ configuration file.

The path to the main configuration file can be specified by the –config-file (or -c) command line argument. By default, the main configuration file is named config.json and placed in the directory /opt/smartlabs/smartmedia/conveyor/config/.

The path to the channels’ configuration file is specified with the channel_set parameter of the main configuration file.

Both configuration files are JSON documents with structure described below.

The main configuration file includes

  • basic settings required for service start (number of threads, sockets, etc.),
  • global parameters used for all channels (for example, streams multiplexing settings)
  • a list of named sections (storage configurations, DRM, etc.), which can be referenced in other parts of the configuration — both global and individual channel settings.

These named sections let you organize repetitive settings and simplify configuration.

Channels’ settings configuration file defines the stream processing sequences for each channel. It lets you build a stream processing chain and use one element of this chain as an input for another element.

For example, sources are data providers for demultiplexors, and demultiplexors can act as a source for transcoders (video_transcoders or audio_transcoders) or for recorders, and so on.

Command Line Arguments

–help, -h

Print the help to the console and exit.

–version, -v

Print the version to the console and exit.

–config-file, -c

Default value: config.json

The path to the main configuration file.

–console-log

Tells Conveyor to ignore the –log-config and –log-file parameters and print the log to the console with the default formatting.

–log-config, -l

Default value: log4SR.json

The path to the logging configuration file.

–log-file

Default value: conveyor_%Y-%m-%d_%H-%M-%S.%N.log

Log file name pattern. This option is ignored if –log-config is specified.

The following variables can be used in the file name:

  • Y — year,
  • m — month,
  • d — day,
  • H — hour,
  • M — minute,
  • S — second,
  • N — the file number among files with the same name.

If no variables are defined, the file is rotated only on service restart.

Main Configuration

Basic Settings

channel_set, string 

Default value: ./channels.json

The path to the file with the channel list and channels’ configurations settings. For a description of the file format, see the Channels’ Configuration section below.

channel_set_update_method, string 

Default value: file

The way to update the channel list. Valid values:

  • file — to track the updates of the channels’ configuration file by timer (with an channel_set_update_period_sec interval) and, if possible, with inotify mechanism, ignoring changes over RPC. In this case, the “method not found” error is returned in response to the RPC calls StartRecord and StopRecord;
  • rpc — do not respond to channels’ configuration file changes that was made without RPC; channels’ configuation can be changed only by calling StartRecord and StopRecord RPC methods. In this case, the initial channel list is taken from the channels’ configuration file at the service start, and is rewritten by next RPC calls. The file is overwritten while the Conveyor service stops. Therefore, in the case of rpc, any changes to the file during the Conveyor operation is ignored, and the file is overwritten.
channel_set_update_period_sec, integer 

Default value: 30

The interval of checking the channel list file for updates, in seconds. Not used when updating channel list via RPC.

If the Conveyor can use the inotify mechanism (depending on the OS settings), the changes is applied automatically when the settings file is updated. Otherwise, the channel settings file is re-loaded every channel_set_update_period_sec seconds seconds.

content_manager, {object} 

The Content Manager configuration section. It configures deleting stale records from the storage.

channel_index, {object} 

The MongoDB configuration section for the Content Manager.

SmartMEDIA Conveyor stores channel recording settings in MongoDB — not only the current configuration, but also its previous versions, because they may be needed to generate nPVR records or delete stale content. It also stores the storage settings (POSIX and S3) and index database settings.

IMPORTANT: This section should differ from the Index Database settings for channels channels (index_storages).

channel_table, string 

The MongoDB collection name for the Content Manager’s channels list.

db, string 

The MongoDB database name for the Content Manager’s data.

file_storage_table, string 

The MongoDB collection name for the Content Manager’s history of the POSIX storages configurations, configured in section data_storages.

mongo_index_storage_table, string 

The MongoDB collection name for the Content Manager’s history of the index strages configurations, configured in section index_storages.

s3_storage_table, string 

The MongoDB collection name for the Content Manager’s history of the S3 storages configurations, configured in section data_storages.

uri, string 

The MongoDB connection URI for the Content Manager.

cleanup_period, time units 

Default value: 1800s

The content removal procedure is called each cleanup_period interval. This procedure deletes content older than recording_window (for more information, see “Removing Stale Content”).

enabled, boolean 

Default value: false

If true, the content management process (a.k.a. removing of stale records) is enabled.

recording_window, time units 

Default value: 10d

The default recording window duration. Can be overridden in the channel settings.

max_batch_size, integer 

Default value: 100

The max number of items (files on a disk or S3 storage objects) to be deleted in one batch. After deleting of each batch of items from the storage, their indexes are deleted from the DB. Deletion is performed by entire multitrack objects (chunk or header), i.e. files belonging to the same multitrack chunk (or header) cannot be divided into different batches. Content Manager tries to fill the batch to the specified number of files (assets), but always with an integer number of multitrack chunts (or headers).

For S3 storage, all items of the same batch are passed in a single deletion request. For details, please follow the link: https://docs.aws.amazon.com/AmazonS3/latest/API/multiobjectdeleteapi.html.

s3_deleter, {object} 

The content management settings section for S3 storages.

threads, integer 

Default value: 3

Specifies the maximum connection pool size (maximum number of simultaneous connections) to each S3 storage.

If S3 storage supports HTTP KeepAlive, the connection pool is created and one connection to the server is used multiple times for different requests.

If HTTP KeepAlive is not supported, a new connection is created for each request, but the total number of simultaneous connections is not exceed the number specified in this setting.

events_deleter, {object} 

Section of settings for deleting outdated events from the database.

uri, string 

URI for connecting to the event database.

db, string 

Name of the event database.

table, string 

Name of the collection with event data.

storage_time, time units 

Default value: 14d

Time to store events before deleting.

threads, integer 

Default value: 2

Specifies the number of threads for content management tasks.

In case of removing data from POSIX storage:

  1. The list of files to remove is generated from the index database (MongoDB).
  2. Each file is removed from the file system.
  3. The records corresponding to these files are removed from the index database (MongoDB).

In case of removing data from S3 storage:

  1. The list of files to remove is selected from the index database (MongoDB).
  2. The list is divided into groups of size content_manager → s3_deleter → batch_size.
  3. An asynchronous delete request/requests for each group of files is sent to S3 storage. No more than content_manager → s3_deleter → connections simultaneous requests is sent to the same storage, other requests is queued. The Content Manager execution thread is released and can perform tasks on another channel.
  4. After files removal from the storage is completed, the first free Content Manager thread deletes records corresponding to these files from the index database (MongoDB).
logo_storage_time, integer

Default value: 14 * 24 * 3600 (2 weeks in seconds)

Storage depth of dynamic Timed Logo in the DB table, in seconds. Logos older than the specified time are removed when the outdated content is cleared. In addition to the metadata about the logo, such as the ID, start and end time, and coordinates, the table also stores binary data of the image. Therefore, it is advisable to limit the storage depth to the minimum required.

data_storages, [array{object}] 

Each element of the array describes the content storage settings.

IMPORTANT: be careful of storage configuration modifications/deleting. This affects the removing of previously recorded content and nPVR content recording.

Changing this storage configuration (without changing the ID) should be done only if the data has been transferred manually or if the access settings to the same data storage are changed.

Changing the ID makes the old data unavailable for Content Manager (since there is no way to get the storage settings with the old ID), so the media content is not deleted.

If you need to change the storage to which the channel should be recorded, you need to create a new storage, specify its ID in the channel settings. After that a new channel version is created in the Content Manager database and information about the old storage is not lost. Once all the data has been deleted from the old storage, you can delete the information about it from the configuration.

fs, {object} 

The section with settings of the local POSIX file storage.

path, string 

The root directory in the local file storage for recorded TS/MP4 files.

A separate directory for each channel is created in the root directory.

s3, {object} 

The section with settings of a storage with S3-like interface.

host, string 

S3 storage server’s address (hostname or IP address).

bucket, string 

S3 storage bucket name.

access_key_id, string 

S3 Storage access key ID.

access_key, string 

S3 Storage access key.

max_connections, integer 

Default value: 10

The maximum number of simultaneous connections to the S3 storage server.

If your S3 storage supports HTTP KeepAlive, the connection pool is created and one connection to the server is used multiple times for different requests.

If HTTP KeepAlive is not supported, a new connection is created for each request, but the total number of simultaneous connections is not exceed the number specified in this setting.

timeouts, {object} 

Connection timeouts settings for interaction with the S3 storage.

resolve_msec, integer 

Default value: 0

The timeout for resolving a domain name to an IP address (DNS), in ms.

Value 0 means that timeout is absent.

connect_msec, integer 

Default value: 0

The timeout for establishing TCP connection to S3 storage, in ms.

Value 0 means that timeout is absent.

send_msec, integer 

Default value: 0

The timeout for a confirmation (packet with the ACK flag from the server) when sending the data, in ms.

If after this time the S3 storage doesn’t accept the data and doesn’t send a response packet with the ACK flag, the connection is closed.

Value 0 means that timeout is absent.

read_msec, integer 

Default value: 0

The timeout for reading a response from the S3 storage, in ms.

The timeout is set only between two successive read operations, not for the transmission of the whole response. If the S3 storage does not send anything within this time, the connection is closed.

Value 0 means that timeout is absent.

total_msec, integer 

Default value: 0

The timeout (in ms) of a whole write operation, including all the steps:

  • domain name resolution (timeout can be set separately with resolve_msec option)
  • TCP connection to S3 storage establishement (timeout can be defined separately with connect_msec option)
  • data sending (can contain multiple operations, timeout for each operation can be set with send_msec option);
  • response headers and data reading (can contain multiple operations, timeout for each operation can be set with read_msec option);

Value 0 means that timeout is absent.

drms, [array{object}] 

The section containing the configuration of DRM systems for encryption.

cenc, {object} 

The section contains keys retreival settings for Common Encryption (ISO/IEC 23001-7) algorythm.

crypto_period_count, integer 

Default value: 3

The number of keys requested from the server in a single request. Makes sense only when the key rotation is enabled (crypto_period_length value greater than zero).

crypto_period_length, time units 

Default value: 30 minutes

The lifetime of a single key pack (received for a single period). If the value is zero, key rotation is not performed, crypto_period_count property is not included in the request to the key server.

key_request_policy

Default value: last_key_expires

The keys requesting algorithm, valid values are each_key_expires and last_key_expires. See below for details.

key_request_timeout, time units 

Default value: 30 seconds

Defines the timeout for the key server response.

If the timeout for the next key exceeds key_request_timeout, the current request to the key server is canceled and a new request is performed.

If the value is zero, the wait continues until a server response is received or a connection error occurs (not a best choice).

key_server_type

Default value: udrm

The type of key server using for key requests. Supported values are udrm and widevine.

If set to udrm and crypto_period_length > 0, the UDRM key server specific option crypto_period_duration equal to crypto_period_length is added to the key query in addition to the usual parameters.

If set to widevine, the query parameters are fully compatible with Widevine Modular DRM Encryption API.

max_connections, integer 

Default value: 10

The maximum number of connections to the key server. If the key server supports HTTP keep-alive, the connections is opened once upon receipt of a keys request from the encryptor and then used by the all encryptors together. If HTTP keep-alive is not supported, each encryptor opens a new connection for each request, but no more than max_connections connections is opened at the same time.

min_time_between_requests, time units 

Default value: 2

The minimum time between requests retries to the key server in case of an error, in seconds. The value must be less than crypto_period_length.

If the value is zero, the keys for the current period is not re-requested and the content is encrypted with the keys for the previous period in case of a key retrieval failure.

signer_iv, HEX-string 

Default value: empty string

The initialization vector (IV) to encrypt the key request to the key server. IV size must be equal to 16 bytes.

signer_key, HEX-string 

Default value: empty string

The key to encrypt the key request to the key server. The key size can be 16, 24 or 32 bytes.

signer_name, string 

Default value: empty string

The identifier of the signer to sign the key request.

url, string 

Default value: empty string

The key server URL.

write_encryption_info_to_fragment, boolean 

Default value: false

Enforces the encryption information (KeyID and IV size) to be recorded into the each MP4 fragment. When the value is set to false the encryption information is recorded:

  • into each media segment (moof atom) when key rotation for the channel is on;
  • only into the initialization data segment (moov atom) when key rotation is off. Thus, media segments cannot be decrypted without the corresponding initialization data segment;

This setting may be useful for cases when key rotation for the channel is off but each MP4 fragment should be decryptable without an initialization data segment containing moov atom.

align_cenc_subsamples, boolean 

Default value: true

Disable the `Subsamples` alignment for the `cenc` scheme, when the size of the encrypted area `Subsample.BytesOfProtectedData` becomes a multiple of 16. Such alignment is not required for the `cenc` scheme and is not used for the `cbcs` scheme according to the Common Encryption (ISO/IEC 23001-7) standard. In order to use the re-encryption of recorder MP4 chunks “on-the-fly” using the service SmartMEDIA Recryptor (smrecrypt), set it to `false`.

cbcs_crypt_byte_block, integer 

Default value: 0 — CBCS encryption scheme is not applied

The number of encrypted blocks in the pattern for the CBCS encryption scheme. If specified, encryption with the [N:10-N] pattern is applied. The sum of encrypted and open blocks in the pattern must be equal to 10, so you only need to set the number of encrypted blocks. The recommended pattern is [1:9]. For example, the Apple FairPlay encryption uses this pattern.

id, string 

The unique identifier of the encryption settings section

verimatrix, {object} 

This section contains configuration for connecting to the Verimatrix Adaptive CAS server to obtain HLS-AES encryption keys.

address, string 

Verimatrix CAS server address (IP address or hostname).

key_update_period_sec, integer 

Default value: 1800

The key update period, with which the Conveyor encrypts the content, and hence the time interval between the Conveyor key requests to the Verimatrix server, in seconds.

port, integer 

Default value: 12684

A TCP port (a.k.a. “Scrambler Port” in Verimatrix documentation) on which Verimatrix CAS listens for incoming connections.

request_timeout_sec, integer 

Default value: 10

The key request timeout from the Verimatrix CAS server, in seconds.

index_storages, [array{object}] 

Each element of this array describes the index database settings. Currently, only storing indexes in the MongoDB database is supported.

IMPORTANT: be careful of index database settings modifications/deleting. This affects the removing of previously recorded content and nPVR content recording.

Changing settings without changing the ID should be done only if the data has been transferred to the new MongoDB database manually or if the access settings to the same database are changed (for example, password or hostname).

Changing the ID makes the old indexes unavailable for Content Manager (since there is no way to get the database settings with the old ID), the media content is not deleted from the storage, and the indexes — from the database.

If you need to store indexes in another database, you need to create a new record (IndexDatabaseConfiguration object) and specify its identifier in the channel settings. After that, a new version of the channel is created in the Content Manager configuration and the information about the previous database is not lost.

The settings of the old index database should be deleted only after the record window for all stored in it content has expired.

id, string 

The unique identifier of the index database configuration section.

The identifier is used in the channel settings.

mongo, {object} 

The section with index recording settings in MongoDB.

uri, string 

The connection URI (a.k.a. “connection string”) to the MongoDB database. Format of this URL is described in MongoDB documentation.

db, string 

The MongoDB database name.

mp4_header_table, string 

Default value: “mp4_header”

The collection name to store information about MP4 headers for channels in MP4-fragmented format.

mp4_index_table, string 

Default value: “mp4_index”

The collection name to store information about MP4 media chunks for channels in MP4-fragmented format.

ts_header_table, string 

Default value: “ts_header”

The collection name to store information about the stream for channels in MPEG2-TS format.

ts_index_table, string 

Default value: “ts_index”

The collection name to store information about the chunks for channels in MPEG2-TS format.

logo_table, string 

Default value: “logos”

Name of the table storing data about dynamic Timed Logos that are overlaid on top of the video during transcoding (Logo Overlay filter).

max_channels, integer 

Default value: 1000

The maximum number of channels to record which can be specified in the Conveyor channels configuration file.

The value must not exceed the number of channels defined in the license. Paused channels are not counted when checking this limit.

reader_threads, integer, integer 

Default value: 1

The number of threads reading data from sources (multicast socket and/or HTTP/HLS).

threads, integer, integer 

Default value: 4

The number of threads writing data to storages (POSIX and/or S3).

net_trc_threads, integer 

Default value: 1

The number of system threads used by clients of network transcoders to serve TCP exchange.

user, string 

Default value: nobody

The name of the user whose rights the smcvr process have. If the parameter value is not specified (an empty string), the nobody user is used.

In some cases, the service requires superuser privileges to initialize resources (open log files, initialize hardware resources for transcoding, etc.), so it is recommended to start the process as root and drop root privileges with the user and group settings.

group, string 

Default value: nobody

The name of the group the rights of which is granted to the Conveyor process (smcvr). If the value is not specified, the rights of the nobody group is used.

Stream Processing Settings

Global settings that apply to each channel individually.

socket_buffer_size, data size 

Default value: 2M

The read (recv) buffer size for multicast sockets.

read_buffer_size, data size 

Default value: 640K

The size of the intermediate buffer between the system socket and the stream analyzer for each data source.

The socket’s system buffer must be constantly flushed, because overfilling causes the timestamp of a datagram is not longer reflect the time of datagram arrival. As soon as data appears in the system buffer, it should be passed on to the intermediate buffer.

idle_time_limit, integer 

Default value: 30

The time to wait for data from the source, in seconds. If there is no data at the Conveyor input during this period, the source is considered offline, all buffered data is recorded to the storage, the channel is restarted, and the data source is reopened.

In case of multicast input, it sends IGMP Leave/IGMP Join for the source group. If multiple streams are delivered within one multicast group (on different ports) and only one stream is lost, IGMP Leave is not sent.

When the timer is triggered, messages of removing and adding a channel appear in the conveyor’s log:

[info] [default] Removing channel XXX
[info] [default] New channel XXX

max_seconds_between_iframes, integer 

Default value: 30

The time interval during which Conveyor expects to receive at least one IFrame of a video stream. If an IFrame was not found, Conveyor writes the following message to the log:

No IFrame seen for <time interval> seconds! Check <channel name> for errors.

IFrames should occur in a stream regularly, their absence is an abnormal situation.

This setting affects only the HLS recording without remuxing.

packets_to_iframe, integer 

Default value: 60000

The Conveyor service tries to start the recording of a new chunk so that it starts with the IFrame. Thus, when it needs to switch to a new file, Conveyor starts the next IFrame lookup. The packets_to_iframe parameter specifies the number of packets the Conveyor should wait for the next IFrame.

If Conveyor does not find the IFrame in the specified number of packets, and HLS recording is performed without remuxing, the new file is started forcibly, and the following message is written to the log:

Hard limit of <packets_to_iframe value> reached: no IFrame!

The same logic works for the very first chunk: Conveyor is not start recording a channel stream until it finds an IFrame or processes packets_to_iframe packets.

If the IFrame in the specified number of packets is not found and the recording is performed with remuxing, the data in the buffer is discarded and the IFrame lookup starts again.

packets_to_ecm, integer 

Default value: 5000

This setting is similar to packets_to_iframe, but instead of IFrame, Conveyor looks for all ECMs listed in the PMT CAS descriptors. If there are no CAS descriptors in PMT, the ECM search is not performed.

This setting affects only the HLS recording without remuxing.

ignore_iframes, boolean 

Default value: false

The flag that allows to disable an IFrame lookup in the video stream. If set to true, Conveyor looks for PES packet headers in a video track instead of an IFrame.

This allows you to maintain the specified length of the DASH chunk (a fragment inside MP4 file) more accurately: when this option is enabled, the fragment length coincides with the chunk_duration_msec value up to the duration of one frame, whereas deviations from the specified duration within the GOP structure duration (the interval between adjacent IFrames) are possible by default (when the IFrame search is enabled).

When this option is enabled packets_to_iframe and max_seconds_between_iframes belong to the PES-packets.

This setting affects only the HLS recording without remuxing.

max_pcr_jitter_msec, integer 

Default value: 200

The maximum allowed value of a PCR jump in a stream, in milliseconds.

If the difference modulus between adjacent PCR values is greater than max_pcr_jitter_msec, a message about PCR jump is written in the log, and information about stream interruption is added to the playlist:

  • in case of HLS the EXT-X-DISCONTINUITY tag is added;
  • in case of MPEG-DASH a new period is started.
audio_iframe_length_msec, integer

Default value: 2500

The approximate length of an IFrame for indexing non-video streams. In the case of audio content, an IFrame is an audio content segment of a certain duration, consisting of one or several consecutive PES packets, the duration is measured with PTS.

This setting affects only the HLS recording without remuxing.

container_type, string 

Default value: ts

The string defining the default container type for recorded content. It only affects the content recording with remuxing.

Two variants are supported:

  • ts — the original MPEG TS is recorded;
  • mp4 — the payload is placed in ISO base media file format with MP4 brand.
chunk_duration_msec, integer 

Default value: 10000

The expected duration of the chunk, in milliseconds. The default value for all channels.

The actual chunk duration may differ from the expected one within the interval between adjacent IFrames in the stream, since each chunk must begin with an IFrame (also see the parameter packets_to_iframe).

recording_failures_before_channel_restart, integer 

Default value: 5

The number of unsuccessful attempts to write the index into MongoDB, after which the channel is restarted. Cases when MongoDB responds slowly or connection errors occur (i.e., during migration of the PRIMARY node to another server) are considered normal and should not cause the channel recording to fail. So multiple write attempts are made.

interpret_all_iframes_as_idr, boolean 

Default value: false

An option allowing to split the stream into chunks not only by IDR IFrame, but also by non-IDR IFrame. In standard mode, Conveyor searches for an IDR frame to start a new chunk. However, some non-standard streams may not contain IDR frames, but only non-IDR Iframes. To work with such streams, set the true value. The value can be redefined for a specific channel’s demuxer.

drop_nal_filler_data, boolean 

Default value: true

An option allowing to drop NAL units with the FILLER_DATA type when remuxing H264 and H265 streams. Some SmartTV models are not able to correctly play streams with FILLER_DATA, so the option is set to true by default. If you need to keep FILLER_DATA in the stream for some reason, set the option to false. The value can be redefined for a specific channel’s demuxer.

h264_pps_comparison_method, string 

Default value: all

A string that defines how to track PSS changes in H264 video streams. The value can be redefined for a specific channel’s demuxer.

Two options are supported:

  • all — all PSSs found in the stream are compared. If the PSS has changed, headers with initialization data are created for each stream and recording of a new period is started. The PPS is not added into chunks.
  • first — only the first PSS found in the stream is stored when starting or restarting the recording process. In this case, the first and all subsequent PPSs are stored during chunk muxing.
complete_frame_in_nalu, boolean 

Default value: true

A flag to inform the decoder that each NAL unit contains a full video frame. This allows the decoder not to wait for the beginning of the next frame to decode the current one. It may be necessary to reset this flag for cases where a full frame consists of multiple NALUs. For example, an interlaced video in which Top Field and Bottom Field are passed in different NALUs (mediainfo returns Scan type, store method: Separated fields for such a video). This value can be overridden for the video transcoder of a specific channel.

sync, {object} 

The section contains stream synchronization settings

These settings can be overridden in channels’ sync section.

max_samples_in_buffer, integer 

Default value: 1500

Maximum number of the samples (video frames and/or audio samples) in the buffer during tracks synchronization process.

max_dts_synchronization_jitter_usec, integer 

Default value: 80000

The maximum difference between the DTS values of key frames from different tracks of the same channel, at which they are still considered synchronous.

chunk_desync_time_usec, integer 

Default value: 5000000

When a channel recording starts, Conveyor captures the DTS value of the upstream’s master track and the current system time. Subsequently, the increase of the DTS value and the increase of the system time should occur simultaneously – i.e. the one-second in system time should be accompanied by a 90,000-unit increase in DTS (for MPEG2-TS input).

If DTS grows faster (for example, 90001 units per second) or slower than the system time, sooner or later the difference between the two values exceed the value of chunk_desync_time_usec and the flow is considered interrupted.

Most often, this parameter may need to be changed in the following cases: – The DTS of the source stream grows faster / slower than expected (as a rule, this is a problem on the MPEG2-TS multiplexer side). In this case, it is desirable to set relatively low values (up to 5 seconds); – There is a big delay when writing content to the storage. This leads to the fact that the incoming TS-packet is gathered from the input buffer with a delay and the extraction time from the buffer is not correspond to the actual arrival time of the packet.. In this case, it makes sense to increase the value of chunk_desync_time_usec up to the expected the write delay (but it’s much better, of course, to deal with the causes of such delays and eliminate them).

Value should be set in microseconds.

search_policy, string 

Default value: any

The policy of multi-track sync point search, can be applied to reduce CPU load on low-quality streams. Possible values:

  • any — attempt to sync when any key sample (video, audio) appears. Highest CPU load;
  • video — only when a key video sample appears. In this case, the synchronization delay increases to the value of GOP;
  • master — only when a key sample appears in the master track;
  • video_and_n_audio — when each N-th audio sample appears, N is set by the skip_audio_samples parameter.
skip_audio_samples, integer 

Default value: 20

The number of the audio sample on which the track synchronization should be performed when using the video_and_n_audio synchronization policy. This parameter is not used for other policies.

mux, {object} 

The section contains settings for MP4 and MPEG2-TS multiplexors/processors.

These settings can be overriden in mp4 and passthrough sections of the channel configuration.

mp4, {object} 

The section contains MP4 multiplexer settings.

These settings can be overridden in mp4 section of the channel configuration.

time_in_utc, boolean 

Default value: true

When the parameter is set to true, the decode_time value in the corresponding MP4 atoms is bounded to the current wall-clock time.

When the parameter is set to false, the decode_time is taken from the DTS value of the input stream.

add_smooth_streaming_boxes, boolean 

Default value: false

If the parameter value is set to true, a set of Microsoft SmoothStreaming MP4 atoms is generated and recorded: UUIDTfrf, UUIDTfxd and UUIDTfrfBoxFragments boxes is added, and the standard styp and sidx boxes is not added.

smooth_streaming_cache_size, integer 

Default value: 2

Used when the value of the add_smooth_streaming_boxes parameter is true.

This parameter defines the number of UUIDTfrfBoxFragments MP4 boxes to be added to the chunk. To fill the parameters of these MP4 boxes the Conveyor service should keep the appropriate number of chunks in memory before writing to the storage. Therefore, increasing this number leads to the larger delay between the input stream and playback front.

required_timescale, integer 

Default value: 0

Allows to change the value of the timescale when you record MP4 content.

Zero (0) value (recommended) means leave without changes for the video (90000 for MPEG2-TS input streams) and use discretization frequency for the audio.

This setting can be overriden per-track with the required_timescale parameter of the muxer.

max_subtitle_duration_sec, integer 

Default value: 10

The maximum subtitles duration in seconds.

align_video_chunks, boolean 

Default value: false

The flag enables the correction of samples’ DTS values by the master track to avoid different names of chunks accross the same “adaptation set”. Required for the SmoothStreaming with ABR. Can lead to the synchronization problems for unstable input streams.

dvbsub_exoplayer_compatible, boolean 

Default value: true

Flag for disabling the compatibility mode of DVB subtitles with ExoPlayer used on Android devices. In this mode, additional parameters are added into the subtitles’ XML description (in particular, extent in the <tt> tag), which are necessary for the correct subtitles display on Android devices.

passthrough, {object} 

The section contains the global settings of the passthrough-mode recording.

These settings can be overriden in the passthrough section of the channel configuration.

drop_pids, string 

Default value:empty string

The TS stream PID list (each PID — positive integer, delimiters — commas with spaces), the packets with which is dropped before writing. PID — a decimal or the word null. null means null-PID, i.e. 8191.

IMPORTANT: this parameter does not cause any changes in PMT.

This setting affects only the HLS recording without remuxing.

insert_pat_pmt, boolean 

Default value: false

The flag enables PAT/PMT insertion into the beginning of each MPEG2-TS chunk.

Required by some HLS players.

Can be overriden in the insert_pat_pmt channels’ configuration parameter.

file_source, section 

The section contains settings for reading streams from MPEG-TS files.

The file source prebuffers cache_duration_sec of content from the file, but not more than the cache_size buffer size. It then sends portions of data (multiples of a UDP datagram) for processing at PCR timestamps, simulating the arrival of Live stream packets at a specific rate. Since the service is designed to process and record Live streams, it is necessary to maintain the tempo for synchronization and recording to work correctly. To be used as a source, the MPEG-TS file must have correct PCR timestamps that comply with the standard (at least 100 ms).

The value specified by the max_pcr_jitter_msec setting is also used to determine the maximum allowable PCR jump in an MPEG-TS file.

cache_size,  size units 

Default value: 8M

The buffer size of the file source.

cache_duration_sec, integer 

Default value: 2

Maximum duration of the buffered stream in seconds.

Logging, Management and Diagnostics

bitrate_report_period_sec, integer 

Default value: 30

The period of collecting and recording statistics on bitrate and errors for one multicast stream. The statistics are logged at the DEBUG level and also placed in the event queue to be requested via the RPC interface.

The following message is recorded in the log:

overall reading: <bitrate in megabits> Mb/sec. Stream <channel name>.

total_bitrate_report_period_sec, integer 

Default value: 300

The period of collecting and recording statistics on total bitrate and errors. The statistics are logged at the DEBUG level and also placed in the event queue to be requested via the RPC interface.

The following message is recorded in the log:

total bitrate: <bitrate in megabits> Mb/sec. Index generation excluded.

error_sampling_period_sec, integer 

Default value: 30

The period of data aggregation over TS stream errors, PCR jumps, and file system errors, in seconds.

When the error_sampling_period_sec period expires, one event for each type of error with a multiplicity indication is placed in the RPC polling RPC queue for each channel.

For example, if 4 PCR jumps and 2 file system errors occurred during error_sampling_period_sec seconds, 2 events is queued: one for PCR with multiplicity 4, and other — for file system errors with multiplicity 2. The error_sampling_period_sec parameter does not affect the interval of multicast stream loss checking; the multicast stream loss is checked every idle_time_limit seconds.

chunk_slow_writing_threshold, integer 

Default value: 100

The threshold, calculated as a fraction of a specific segment duration, is used to calculate the maximum time which writing of the segment to a storage can take. When storage is too slow and write operation takes longer time, the corresponding line is written to the log file. Can be used for storage performance problems diagnosis.

Value can be more than 100%.

mongo_retry_period_sec, integer 

Default value: 10

MongoDB write operation re-try interval (in seconds).

If the database is unavailable for writing, segments writing to the storage (POSIX or S3) is paused and repeated tries are performed until all the index information has been persisted in the MongoDB.

Such behaviour helps to avoid creation of “ghost” segments which don’t have a corresponding record in the database and cannot be deleted from the storage during the cleaning process.

rpc_port, integer 

Default value: 0

The RPC server port. If the value is zero, the RPC server is disabled.

rpc_event_queue_size, integer 

Default value: 0

The size of the statistics message queue.

udp_queue_monitor, {object} 

The section contains settings of monitoring for the fullness of the multicast stream receiving sockets. When monitoring is enabled, Conveyor runs a separate thread to poll the /proc/net/udp contents with a sampling_period_sec period.

If the buffer is filled with more than warning_limit_percent, critical_limit_percent, or if data loss (datagrams dropped due to buffer overflow) is detected during sampling_period_sec, Conveyor sends messages to the event queue for the RPC request and write them to the log with the appropriate level (WARNING — if exceeding the warning_limit_percent parameter, CRITICAL — if exceeding the critical_limit_percent parameter).

These messages is logged and placed in the RPC polling queue with an error_sampling_period_sec period, not sampling_period_sec. In most cases, it make sense to collect statistics from /proc/net/udp more frequently than generating events and logging.

enabled, boolean 

Default value: false

If the parameter value is true, monitoring is enabled.

sampling_period_sec, integer 

Default value: 10

The polling period of /proc/net/udp directory to get information about buffer filling.

warning_limit_percent, integer 

Default value: 50

When the socket buffer is filled with more than warning_limit_percent, the UDP receive queue too big event is placed in the RPC polling queue.

critical_limit_percent, integer 

Default value: 90

When the socket buffer is filled with more than critical_limit_percent, the UDP receive queue about to overflow, packet drop imminent event is placed in the RPC polling queue; the UDP receive queue too big event is not generated in this case.

Example Configuration

JSON

{

 “threads”:4,

 “channel_set”:“channels.json”,

 “rpc_port”:49977,

 “rpc_event_queue_size”:5000,

 “error_sampling_period_sec”:10,

 “chunk_duration_msec”:2000,

 “idle_time_limit”:30,

 “index_storages”: [

   {

     “id”:“mongo_local”,

     “mongo”: {

       “uri”:“mongodb://localhost”,

       “db”:“mydb”,

       “mp4_index_table”:“mp4_index”,

       “mp4_header_table”:“mp4_header”,

       “ts_index_table”:“ts_index”,

       “ts_header_table”:“ts_header”

     }

   }

 ],

 “data_storages”: [

   {

     “id”:“fs”,

     “fs”: {

       “path”:“/video”

     }

   }

 ],

 “content_manager”: {

   “enabled”:“true”,

   “cleanup_period”:60,

   “recording_window”:“24h”,

   “channel_index”: {

     “uri”:“mongodb://localhost”,

     “db”:“db_cm”,

     “channel_table”:“channels”,

     “s3_storage_table”:“s3_config”,

     “file_storage_table”:“file_config”,

     “mongo_index_storage_table”:“mongo_config”

   }

 },

 “drms”: [

   {

     “id”:“verimatrix”,

     “verimatrix”: {

       “address”:“10.10.30.30”,

       “port”:12684,

       “key_update_period_sec”:600

     }

   },

   {

     “id”:“widevine_test”,

     “cenc”: {

       “url”:“http://10.10.20.20/cenc/getkey”,

       “signer_name”:“client1”,

       “signer_key”:“bb … bb”,

       //HEXAESKey

       “signer_iv”:“aa … aa”,

       //HEXAESIV

       “crypto_period_length”:“0”,

       “crypto_period_count”:0,

       “key_server_type”:“udrm”

     }

   }

 ],

 “sync”: {

   “max_dts_synchronization_jitter_usec”:80000

 },

 “mux”: {

   “mp4”: {

     “time_in_utc”:true,

     “add_smooth_streaming_boxes”:true

   }

 }

}

Channels’ Configuration

Channel List Settings

The channel list is specified as a JSON array named ‘channels’.

The channel structure can contain the following types of data sources:

  • TS stream, received over UDP (multicast or unicast) or HTTP;
  • Media samples source:
    • Demultiplexer. Described in the demuxers section. Produces elementary streams from a MPEG2-TS stream.
    • Transcoder. Described in video_transcoders and audio_transcoders sections. Receives samples from the demuxer.

The channel recording can be configured in the muxers section; each multiplexor can only receive data from one source at a time. Thus, if the source is a TS stream, recording is possible only without remultiplexing (respectively, in MPEG2-TS, in the same form as the server receives the stream).

If the source produces an elementary stream (media samples), they can be multiplexed both in TS and MP4 container. It is prohibited to combine the recording with or without remuxing within the same channel.

All streams to the recorder input (muxers) must be synchronized and have the same GOP structure. For the streams transcoded by SmartMEDIA Conveyor it’s made by the transcoder by default.

id, string 

The unique channel identifier.

drm_id, string 

Unique content ID for the DRM system used to get encryption keys. If not specified, the field id is used.

index_storage, string 

Defines the identifier of the index storage defined in index_storages section in the main configuration file.

data_storages, [array of strings] 

The data storages configuration section identifier. The storages must be defined in the system configuration file.

IMPORTANT: for now, only one storage for one channel is supported.

Example: data_storages=[“s3storage”]

container_type, string 

Default value: ts

The container type which is used for content recording. Valid values are:

  • ts — the payload should be encapsulated into MPEG2-TS container and recorded;
  • mp4 — the payload should be encapsulated into ISO base media file format with ‘MP4’ brand.

Overrides the container_type parameter of the system settings file.

segment_duration, time units 

Default value: 0

The duration of the file to which several consecutive chunks should be written (a.k.a. segment). When the specified duration is reached, the file is being closed and a new one begun (the segments rotation is being performed).

The segments are also rotated if a write error to at least one of the files for one of the tracks or one of the storages occurs.

The segment files for all tracks have the same name based on a master track timestamp (NPT) in microseconds.

If the value is set to ‘0’ each chunk is written to a separate file and no “large segments” is used.

Using segments is supported (and makes sense at all) only with POSIX filesystems – it’ll reduce the number of files in the filesystem which is significant for most POSIX filesystems and can lead to performance degradation.

sources, [array{object}] 

The array of channel sources’ settings.

Each stream source has its own URL and can contain one or more tracks. The source can be recorded “as is” in a MPEG2-TS container for later playback via HLS (see passthrough section) or demultiplexed.

id, string 

The unique source identifier.

url

Type: URL

The source stream URL (HTTP or UDP).

For multicast sources, URLs looks like:

udp://224.5.6.7:5000

For HTTP sources (HLS or continuous HTTP stream) their normal HTTP/HTTPS URLs should be specified.

hls, {object} 

The section responsible for the HLS source settings.

It is specified only if the HTTP source should work on the HLS protocol.

stream_type, string 

HTTP stream type.

If the value is hls and the url parameter is set to a valid HTTP URL, Conveyor retrieves the stream over HLS protocol, parses the playlist as a variant playlist and looks for a media playlist with defined bandwidth inside it.

If the value is hls_stream and the url parameter is set to a valid HTTP URL, Conveyor retrieves the stream over HLS protocol and parses the playlist as a media playlist.

bandwidth, integer 

Default value: 0

Only for stream_type = hls.

The bandwidth, by which the stream is selected from the variant playlist. If the parameter value is ‘0’, the first stream in the playlist is used.

demuxers, [array{object}] 

Demultiplexers’ settings.

id, string 

The unique demuxer identifier.

source, string 

The MPEG2-TS stream source identifier.

tracks

Type: array of strings

The string array describing the output tracks in the format <type><number>. For example: vid0 or aud1. The following types are supported:

  • vid — video,
  • aud — audio,
  • sub — subtitles (DVB Subtitles (ETSI EN 300 743) or Teletext (ETS 300 706)).

For Teletext subtitles the page number can be defined as an argument, e.g. “sub0?777” for page #777. The default page number is 888.

program_id, integer 

Default value: 0

ID of the program to be demultiplexed from the MultiProgram MPEG-TS stream. If the program ID is not set (equal to zero), and several PMT PIDs are detected in the PAT table, an error warning is written to the log.

aac_decode_first_sample, boolean 

Default value: false

For some AAC streams, it is not enough to get the samplingFrequencyIndex value from the ADTS header, as a result, the actual sampling frequency is doubled. This option enables the decoding of the first sample when starting (restarting) the recording using ffmpeg.

interpret_all_iframes_as_idr, boolean 

An option allowing to split the stream into chunks not only by IDR IFrame, but also by non-IDR IFrame. In standard mode, Conveyor searches for an IDR frame to start a new chunk. However, some non-standard streams may not contain IDR frames, but only non-IDR Iframes. To work with such streams, set the true value. If the value is omitted, the value specified in the main configuration file is used.

drop_nal_filler_data, boolean 

An option allowing to drop NAL units with the FILLER_DATA type when remuxing H264 and H265 streams. Some SmartTV models are not able to correctly play streams with FILLER_DATA, so the option is set to true by default. If you need to keep FILLER_DATA in the stream for some reason, set the option to false. If the value is omitted, the value specified in the main configuration file is used.

h264_pps_comparison_method, string 

If set, it overrides the value specified in the main configuration file.

video_transcoders, [array{object}] 

Transcoders’ settings for video tracks.

id, string 

The unique transcoder ID.

source, string 

ID of the source to be used as a samples’ source for the transcoder.

use_qsv, boolean 

Default value: false

The flag that allows you to enable the use of Intel QuickSync Video hardware acceleration for video transcoding. To use QSV, you need to make sure that the CPU and GPU of the server support this technology and that the Intel MediaSDK library is correctly installed in the system. More information can be found in the Intel MediaSDK documentation.

async_depth, integer 

Default value: 4

The degree of parallelism when executing tasks inside the Intel MediaSDK. Specifies the number of asynchronous operations that the application can run before explicit synchronization (waiting) is required to get the result. This value applies to the decoder, encoder, and VPP filters, meaning that each pipeline component can run the specified number of asynchronous operations. Values of async_depth > 1 can improve GPU utilization and performance, especially if a small number of low-resolution channels are transcoded and a value of async_depth = 1 does not lead to full GPU utilization. However, increasing this value also leads to increased resource consumption, in particular, it is necessary to allocate more surfaces for storing decoded frames. Usually, a value of async_depth > 5 does not lead to a noticeable performance improvement but leads to increased resource consumption. If GPU utilization is already achieved due to the fact that a large number of channels are transcoded into several bitrates, then it may be advisable to reduce the async_depth (for example, to 2) for balanced resource consumption. If GPU utilization is already achieved by running transcoding of a large number of channels in several bitrates, then it may be advisable to reduce the async_depth value (for example, to 2) for balanced resource consumption.

use_mfe, boolean 

Default value: false

Enables the Intel Multi-Frame Encoding technology when transcoding with Intel QSV-enabled CPUs.

MFE improves GPU utilization while encoding multiple streams with low resolution (less then 1080p), especially for the most powerful GPUs (Intel Iris Pro Graphics 580 and better). If Multi-Frame Encoding is enabled for the transcoder all output streams described in out section can be encoded in parallel. However, the technology doesn’t affect encoding of multiple streams of different channels because they are encoded in different QSV sessions.

Compatible only with the Intel QSV transcoder, when use_qsv value is set to true.

See Intel MediaSDK documentation for more details.

a53cc, boolean 

Default value: false

A flag to enable decoding of EIA-608/708 Closed Captions from the H264/H265 video stream and to include them into the output H264/H265 video streams. QSV supports only H264 video streams, Nvidia supports H264/H265 video streams. Subtitles of this type are passed in SEI (Supplemental Enhanced Information) messages within the video track, so the separate track is not created in the playlist and their processing is part of the video transcoding.

net_trc, string 

The Network Transcoder ID to be used for transcoding.

If the network transcoding is configured, Conveyor sends a demultiplexed stream of samples to a remote transcoding server, receive transcoded streams from it, perform processing (synchronization, multiplexing, splitting into chunks) and write to the storage.

Since transcoding is a very resource-intensive operation, it can significantly reduce the load on the recording server and record more channels on a single server. It also allows you to share network transcoders with appropriate hardware resources, such as support for Intel QuickSync Video technology.

decode_encrypted, boolean 

Default value: false

When true, transcoder tries to decode the stream even when it’s marked as encrypted.

For the false value transcoder rejects the encrypted stream and prints the error message to the log.

Can be used for the ‘pseudo-encrypted’ streams with ‘scrambled’ flag set but with no encrypted samples.

deinterlacing, string 

Default value: auto

The VPP Deinterlacing filter mode. Values supported:

  • auto — by default, the deinterlacing is disabled and it is enabled, if the input frames are explicitly determined as progressive;
  • off — deinterlacing is always disabled, even for the interlaced input.
double_rate_deinterlacing, boolean 

Default value: false

Doubling the frame rate when deinterlacing.

complete_frame_in_nalu, boolean 

Type: boolean
Default value: true

A flag to inform the decoder that each NAL unit contains a full video frame. This allows the decoder not to wait for the beginning of the next frame to decode the current one. It may be necessary to reset this flag for cases where a full frame consists of multiple NALUs. For example, an interlaced video in which Top Field and Bottom Field are passed in different NALUs (mediainfo returns Scan type, store method: Separated fields for such a video). This value overrides the global setting.

input_resolution, string 

Default value: hd

Maximum input stream resolution expected by the transcoder for the channel. Valid values are: sd, hd and uhd.

SmartMEDIA License defines the maximum number of SD, HD and UHD streams to be transcoded. If the configuration has more transcoders with the specified resolution than allowed by the license, warning is written in the log file and transcoder service stops. However, licenses for higher resolutions can be used to process channels with lower resolutions (for instance, UHD license can be used to process HD and SD streams, or HD license can be used to process SD streams).

Furthermore, besides checking the configuration, transcoder continuously checks the input stream resolution whether it corresponds to the declared value. If the stream resolution exceeds the declared one (for instance, sd is declared, but stream is 1920×1080 pixels) channel processing stops.

logo, {object} 

Section with settings for the logo overlaid on top of the video stream (the Logo Overlay filter). If omitted, the logo is not overlaid.

For best transcoding performance, only one image is overlaid on a video frame at a time. If you need to overlay several graphic elements at the same time, combine them into a single image in a graphics editor in advance.

opacity, integer 

Default value: 100

Defines the logo opacity from 0 to 100, where 0 — completely transparent, 100 — completely opaque.

The parameter must be known when the transcoder starts, therefore it is set in the transcoder configuration and cannot be changed when creating dynamic Timed Logos via JSON-RPC API.

transparent_color, string 

Grayscale color from white to black, which is considered transparent when overlaying the logo using the Luma Keying method, i.e. only the brightness component of the color (Luma) from 0 to 255 is used to determine the transparent areas of the logo. The color is set in the FFmpeg color format, i.e. in the form of a name (black, white, red) or in the format #RRGGBB. So it is possible to specify colors other than gray such as red or blue, but since only the brightness component is used, light gray, light red and light blue colors is the same.

The parameter must be known when the transcoder starts, therefore it is set in the transcoder configuration and cannot be changed when creating dynamic Timed Logos via JSON-RPC API. This parameter is also used as a flag to enable the dynamic Timed Logo scheduler. To be able to configure time-bound logos via the JSON-RPC API, you must first set the color for Luma Keying (common to all logos) in the transcoder configuration.

url, string 

HTTP URL or path in the local file system to the PNG image that is overlaid as a static logo. It can be used to set a single permanent logo or placeholder when using dynamic Timed Logos. In the second case, the static logo is displayed when there is no active dynamic Timed Logo in the scheduler. The image is downloaded from the specified URL each time the channel recording starts. If the image cannot be downloaded, a warning is displayed in the log and the channel is recorded without the logo overlay.

If the URL is not specified, then the static logo is not used, but dynamic Timed Logos created via the JSON-RPC API and stored in the database can be overlaid.

x, integer 

Default value: 0

Horizontal coordinate of the upper-left corner of the logo on the original video frame (before scaling), in pixels.

Used only if a static logo URL is specified.

y, integer 

Default value: 0

Vertical coordinate of the upper-left corner of the logo on the original video frame (before scaling), in pixels.

Used only if a static logo URL is specified.

crop, {object} 

The section responsible for configuring a rectangular area for cropping the edges of the video frame (Crop filter). If not specified, the cropping is not applied.

If the Logo Overlay feature is configured, the logo is positioned in the coordinates of the cropped video frame, not the full decoded frame. For example, if the logo.x = 0 and crop.x = 100, then the logo is not cropped.

x, integer 

Default value: (inputWidth – crop.w)/2

The horizontal coordinate of the left side of the rectangular cropping area, in pixels. If not set, it is calculated as (inputWidth – crop.w)/2, i.e. the area is horizontally aligned to the center of the frame. If set, it is limited to the [0, inputWidth – crop.w] range.

y, integer 

Default value: (inputHeight – crop.h)/2

The vertical coordinate of the upper side of the rectangular cropping area, in pixels. If not set, it is calculated as (inputHeight – crop.h)/2, i.e. the area is vertically aligned to the center of the frame. If set, it is limited to the [0, inputHeight – crop.h] range.

w, integer 

Default value: inputWidth

The width of the cropping rectangular area, in pixels. If not set, the source frame width is used. If set, it is limited to the [2, inputWidth] range.

h, integer 

Default value: inputHeight

The height of the cropping rectangular area, in pixels. If not set, the source frame height is used. If set, it is limited to the [2, inputHeight] range.

out, [array{object}] 

Output video streams settings.

codec, string 

Default value: h264

The video codec to be used to encode the stream. Supported values are h264 and h265.

pix_fmt, string 

Default value: nv12

Output pixel format that describes the number of bits per color component and pixels representation method. The following values are supported:

  • nv12 — planar format YUV 4:2:0, 8 bit/color. Used for the H264 and HEVC MAIN Profile codecs. In ffmpeg terms, this format is called yuv420p.
  • p010 — planar format YUV 4:2:0, 10 bit/color. Used for the HEVC MAIN10 Profile codec. In ffmpeg terms — yuv420p10le.
preset, string 

Default value: best_speed

A value that sets the balance between the quality of the output video and the transcoding speed. The following values are supported: – best_speed — maximum transcoding speed with acceptable video quality; – balanced — balance between speed and quality; – best_quality — best video quality, slow transcoding.

When using Intel QSV technology, it is recommended to start with the value ‘best_speed’ and reduce the speed only if the video quality is not objectively satisfactory. The peculiarity of Intel QSV is that when using best_speed, the video quality virtually does not decrease (according to a note from Intel MediaSDK Release Notes, sometimes the quality is even better than when using ‘balanced’), and the speed increases significantly.

bitrate, data size 

Default value: 1024k

The target output steam bitrate.

maxrate, data size 

Default value: 0

The maximum bitrate for the output stream, in bits/s. If it is set (not equal to 0) and is equal to the target bitrate bitrate, then the Constant Bitrate Control (CBR) mode is used, otherwise — Variable Bitrate Control (VBR). For the VBR mode, this parameter specifies the maximum bitrate at which encoded frames are sent to the Video Buffering Verifier (VBV). For the VBR mode, this parameter determines the maximum bitrate of encoded frames to be delivered to the Video Buffering Verifier (VBV). If set to 0, VBR mode is used and the parameter is calculated by Intel MediaSDK based on the target bitrate, frame rate, codec profile and level, and other parameters.

bufsize, data size 

Default value: 0

The size of the Video Buffering Verifier (VBV) buffer, in bits. Affects the variability and deviation of the bitrate from the average value. The smaller the buffer, the closer the bitrate is to the average value, less spikes, but the image quality may degrade. It is recommended to start with a buffer size sufficient for 2 seconds of video with a maximum bitrate of maxrate, that is, bufsize = 2 * maxrate. Then decrease or increase it depending on the requirements for the bitrate variability. If the client device has a small buffer (for example, old STBs), then you can reduce the bufsize to a size of one maxrate. If you need to strictly limit the bitrate fluctuations, you can reduce the buffer to half of the maxrate or less. But in this case, it is recommended to check that the image quality remains acceptable. If the buffer size is insufficient, the encoder has less room for optimization and efficient encoding, so the quality can be reduced (increased Quantization Parameter, QP) for large frames (for example, I-frames) so that they fit into the bitrate limit. This can be represented as the periodic appearance of blurry and fuzzy frames. This is especially true for the Constant Bitrate Control (CBR) mode. In this case, it is recommended to switch to Variable Bitrate Control (VBR) mode and use an enlarged VBV buffer.
If the parameter is not set (equal to 0), the Intel MediaSDK uses the automatically calculated value.

rc_init_occupancy, data size 

Default value: 0

The initial filling of the VBV buffer in bits, after which the decoder starts decoding. This parameter, along with the bitrate, maxrate, and bufsize parameters, is used to control the output bitrate and is part of the common Video Buffering Verifier (VBV) or Hypothetical Reference Decoder (HRD) model. This is a simplified model assuming that data enters a buffer of a fixed bufsize size according to the individual size of the encoded frames, and exits the buffer with a constant bitrate bitrate. The decoder starts decoding after the buffer is filled to the size of rc_init_occupancy. The purpose of the encoder is to prevent this hypothetical buffer from overflowing or underflowing.
If the parameter is not set (equal to 0), the Intel MediaSDK uses the automatically calculated value.

quality, integer 

Default value: 0

The desired level of image quality that affects the degree of frame quantization (QP). Valid values: from 1 (best quality) to 51 (worst quality). If the quality is set (not equal to 0), the Quality Variable Bitrate Control (QVBR) mode is used, since the traditional VBR and CBR modes do not support specifying the quality, but only the bitrate limits. The QVBR algorithm is some hybrid of the well-known Constant Rate Factor (CRF) algorithm and the usual Variable Bitrate Control (VBR), suitable for video streaming purposes. Traditional CRF allows you to set the quality level without bitrate limits, so large bitrate fluctuations make it more suitable for file transcoding (VOD) than for Live video, which is transmitted over channels of limited bandwidth. QVBR tries to achieve the desired subjective level of quality (i.e., at the level of human perception, rather than at the level of more formal metrics such as PSNR) by limiting fluctuations near the target bitrate and maintaining compatibility with the Video Buffering Verifier (VBV) or HRD model.
If the desired quality is not set (equal to 0), then only the bitrate limits and the traditional VBR or CBR mode are applied.

width, integer 

Default value: 720

Output video resolution – width.

height, integer 

Default value: 576

Output video resolution – height.

gop_size, integer 

Default value: 25

The GOP size – number of frames between the two keyframes.

frame_rate_numerator, integer 

Default value: 0

Frame rate numerator. The frame rate is set as a rational number. Only reducing the input stream frame rate is supported.

frame_rate_denominator, integer 

Default value: 1

Frame rate denominator. The frame rate is set as a rational number. Only reducing the input stream frame rate is supported.

bframes_num, integer 

Default value: 0

Number of B-frames between non B-frames. Must be an integer between -1 and 16. 0 means that B-frames are disabled. If a value of -1 is used, it chooses an automatic value depending on the encoder.

audio_transcoders, [array{object}] 

Transcoders’ settings for audio tracks.

id, string 

The unique transcoder ID.

source, string 

The identifier of the source to be used as a samples’ source for the transcoder.

net_trc, string 

The Network Transcoder ID to be used for transcoding.

If the network transcoding is configured, the Conveyor sends a demultiplexed stream of samples to a remote transcoding server, receives transcoded streams from it, performs processing (synchronization, multiplexing, chunking) and writes streams to the storage, and indexes — to the DB.

decode_encrypted, boolean 

Default value: false

When value is true the transcoder tries to decode the stream even if it is marked as scrambled.

When value is false and the stream is scrambled, the transcoder logs the error and stops decoding of the stream.

Setting could be used to process a ‘pseudo-scrambled’ stream where ‘scrambled’ flag is set but, however, stream is not encrypted (for instance, when ‘encryption ratio’ is set to 0% on scramblers).

out, [array{object}] 

Settings of the audio transcoder outputs.

bitrate, data size 

Default value: 128k

Target bitrate of the audio stream.

channels_count, integer 

Default value: 2

Number of audio channels of the output stream

sample_rate, integer 

Default value: 48000

Audio sampling rate for the output stream

muxers, [array{object}] 

Multiplexing and recording settings for individual channel streams.

bw, integer 

Default value: 0

The network bandwidth required to play the stream. Used for DASH or HLS+MP4 playlists generation.

dir, string 

The filesystem subdirectory (for POSIX storages) or URL prefix (for S3/object storages) relative to the channel directory/URI to which the stream is recorded. Must be unique within the channel.

lang, string 

The two-letter designation of the stream language (used for audio) in accordance with ISO 639-1:2002.

role, string 

Sets the role for Adaptation in the DASH manifest according to the “5.8.5.5 DASH role scheme” clause of the “ISO/IEC 23009-1” standard. Possible values: caption, subtitle, main, alternate, supplementary, commentary, dub. The role can be used to mark the DescribedVideo track in the manifest with the commentary value.

required_timescale, integer 

Default value: 0

Allows to set the timescale value for the specific track or leave the source timescale as-is (the 0 value, recommended).

For example, it can be helpful while solving the playback issues on some SmartTVs, which can support only 10 000 000 timescale.

encryptor, {object} 

The section for configuring the current stream encryption. If not specified, the stream won’t be encrypted.

drm, string 

The DRM settings identifier defined in the global configuration.

key_type, string 

Default value: UNKNOWN

The type of the key corresponding to the type field in the key request. Supported values: SD, HD, AUDIO.

If not specified, the type is selected according to the track type (SD for video, AUDIO for audio).

sources, [array{object}] 

An array of sections; each defines a media samples source for the recorded stream.

IMPORTANT: only one source is currently supported.

source, string 

The name for the TS stream (when recording without remuxing) or sample source track.

master, boolean 

Default value: false

The main source flag for synchronizing chunks (there should be only one within the channel). It is recommended to select the source containing the video track with the maximum bitrate.

pvr_skip, boolean 

Default value: false

If the value is set to true this track won’t be used for nPVR programms recording. The false value leaves the track in the nPVR record as-is.

This parameter can be used to optimize the storage space for nPVR records.

mp4, {object} 

MP4 (ISO BMFF) container multiplexing settings.

Overrides the global settings defined in mux.mp4 section of the main configuration file.

passthrough, {object} 

Settings for MPEG2-TS streams recording without remultiplexing.

Overrides the global settings defined in mux.passthrough section of the main configuration file.

drop_pids, string 

Overrides the global drop_pids configuration parameter for a channel/stream; i.e. only the PIDs listed here is dropped, not the global drop_pids + channel’s drop_pids.

insert_pat_pmt, boolean 

Default value: false

The flag enables PAT/PMT insertion into the beginning of each MPEG2-TS chunk.

Required by some HLS players.

The parameter overrides the global parameter insert_pat_pmt.

check_pat_crc, boolean 

Default value: true

The flag disables CRC checking in MPEG2-TS PAT.

If the PAT does not pass the CRC check, that PAT is considered invalid and is discarded. Accordingly, if there are only such PATs in the stream, the stream won’t be recorded.

check_pmt_crc, boolean 

Default value: true

This parameter is similar to check_pat_crc: the flag to disable CRC checking of the current stream PMT.

sync, {object} 

Track synchronization settings for ABR streams.

Overrides the global settings defined in sync section of the main configuration file.

thumbnails, [array{object}] 

Parameters for creating of thumbnail images from the keyframes of the track specified by the thumbnails_source option. These images can be used by the player for better visualization during seek.

Unlike thumbnails_mosaic, each JPEG file contains a picture only for a single frame.

dir, string 

See the dir configuration value definition of the Channel Recorder.

width, integer 

Width of the preview image. The original video width is used if the value is not set.

height, integer 

Height of the preview image. The original video height is used if the value is not set.

thumbnails_mosaic, [array{object}] 

Parameters for creating a thumbnail mosaic from the keyframes of the track specified by the thumbnails_source option.

A single JPEG image contains multiple thumbnails, a thumbnails_mosaic_cols x thumbnails_mosaic_rows matrix of pictures, that can be used by the player for preview when seeking. This feature allows to speed up loading of thumbnails to the client device.

dir, string 

See the dir configuration value definition of the Channel Recorder.

width, integer 

Width of the preview image. The original video width is used if the value is not set.

height, integer 

Height of the preview image. The original video height is used if the value is not set.

thumbnails_mosaic_cols, integer 

Default value: 0

The number of columns in the thumbnail mosaic.

thumbnails_mosaic_rows, integer 

Default value: 0

The number of rows in the thumbnail mosaic.

thumbnails_source, string 

The identifier of the video track, which is to be used for thumbnails generation. Thumbnail generation is off if the value is not set.

Thumbnails are generated as JPEG images. They could be used in the media players for preview purposes during seek.

scte35, {object} 

Parameters of the SCTE-35 events recording.

use_wallclock_time, boolean 

Default value: false

If true, when recording SCTE-35 events, the system time is saved instead of the time encoded in the event.

offset_msec, integer 

Default value: 0

The system time offset when recording SCTE-35 events, if the use_wallclock_time parameter is set to true.

accessibility_608, string 

The value of the Accessibility tag in the MPD playlist for schemeIdUri=”urn:scte:dash:cc:cea-608:2015″.

Example of a Channels’ configuration file (TS HLS Recording Without Remuxing, Single Channel)

JSON

{

 “channels”: [

   {

     “container_type”:“ts”,

     “data_storages”: [

       “fs”

     ],

     “id”:“CH_HLSTS”,

     “index_storage”:“mongo_local”,

     “muxers”: [

       {

         “bw”:“6500000”,

         “dir”:“bw5000000”,

         “encryptor”: {

           “drm”:“verimatrix”

         },

         “sources”: [

           {

             “master”:“true”,

             “source”:“ts_multicast_1”

           }

         ]

       }

     ],

     “sources”: [

       {

         “id”:“ts_multicast_1”,

         “url”:“udp://239.65.40.4:5001”

       }

     ]

   }

 ]

}

Example of a Channels’ configuration file with ISO BMFF Container Recording and Encryption

JSON

{

 “channels”: [

   {

     “id”:“CH_DASHMP4”,

     “container_type”:“mp4”,

     “data_storages”: [

       “fs”

     ],

     “demuxers”: [

       {

         “id”:“dmx1”,

         “source”:“ts_multicast_1”,

         “tracks”: [

           “vid0”,

           “aud0”

         ]

       }

     ],

     “index_storage”:“mongo_local”,

     “muxers”: [

       {

         “bw”:“6500000”,

         “dir”:“video/bw5000000”,

         “encryptor”: {

           “drm”:“widevine_test”

         },

         “sources”: [

           {

             “master”:“true”,

             “source”:“dmx1:vid0”

           }

         ]

       },

       {

         “bw”:“100000”,

         “dir”:“audio/bw150000”,

         “encryptor”: {

           “drm”:“widevine_test”

         },

         “sources”: [

           {

             “source”:“dmx1:aud0”

           }

         ]

       }

     ],

     “sources”: [

       {

         “id”:“ts_multicast_1”,

         “url”:“udp://239.1.1.1:5001”

       }

     ]

   }

 ]

}

Recorded Content Management

To enable content management, set the content_manager.enabled flag to true. Content management is performed in a separate thread pool, so this function does not create an additional load on the recording parts of Conveyor service.

Removing Stale Content

When content management is enabled, Conveyor periodically (depending on the content_manage.cleanup_period parameter) deletes stale assets along with their index. An asset is considered obsolete if it expires no later than content_manager.recording_window time ago.

Symbolic links to assets on POSIX storages are not supported. In other words, a symbolic link is followed, but only the symbolic link itself is deleted, not the content it refers to. Since SmartMEDIA does not create symbolic links to content (neither to directories nor to assets), support for symbolic links to assets allow you to handle only rare cases of manual intervention in the directory structure created by the Conveyor.

Features of Track Recording, Remuxing and Synchronization

The content can be recorded in two ways:

  • Without remultiplexing. Only the MPEG2-TS container is supported. The container of the source stream is not changed. The TS stream is split into chunks. Additional service packs can be added before writing to chunks. The chunk can also be encrypted without compromising the container integrity.
  • With remultiplexing. Supported ISO BMFF (MP4) and MPEG2-TS containers. The source container is parsed to the sample level for each track. When recording, samples and service information (stored unsampled in the original container) are encrypted (if necessary) and packaged in a new container. The sample groups are also divided into chunks.

If several tracks are recorded, their chunks (when recording without remultiplexing) or samples (when recording with remuxing) must be synchronized. Synchronization is performed as follows:

If several tracks are recorded, their chunks (when recording without remuxing) or samples (when recording with remuxing) must be synchronized. Synchronization is performed as follows:

  • The presence of the master track is checked. It must be specified in the channel configuration file.
  • Samples/chunks begin to accumulate in the buffer.
  • The search for chunks/samples of keys from different tracks, DTS of which differs by no more than max_dts_synchronization_jitter_usec, is performed.
  • If synchronization points are found, then the chunk recording for each of the tracks begins.
  • If no synchronization points are found for one track at least and the number of samples/chunks in the buffer has reached max_samples_in_buffer (counted separately for each track), the buffered samples/chunks are discarded and the process starts again.

Supported RPC Methods

See also the “RPC Methods Common to all Services” chapter.

In the examples of calling RPC methods below, the library tinyrpc is used; conveyor — an object of the tinyrpc.RPCClient class.

The GetChannelParams and GetChannels methods are always available when the RPC server is running.

The SetChannelParams, StartRecord, StopRecord, CreateProgram, ProgramStatus, RemoveProgram, HaveContent methods are available only if the channel_set_update_method parameter is set to rpc. With a different channel_set_update_method value, when trying to call any of these methods, Conveyor returns the JSON error “Method not found”.

The CreateProgram, ProgramStatus, RemoveProgram, HaveContent methods are available only if the content_manager.enabled parameter is set to true. If content management is disabled, or the content_manager section is omitted, when trying to call any of these methods, Conveyor returns the JSON error “Method not found”.

GetChannelParams(npvr_channel_id, verbose)

Returns the current channel parameters in JSON format, or an empty JSON response if such a channel is unknown.

npvr_channel_id, string 

Channel ID.

verbose, boolean 

Default value: false

Flag to control the amount of JSON data retuned. If true, all the channel parameters are returned, including data not explicitly specified in the configuration (i.e. having default values). If false, the explicitly specified parameters are returned, as well as the state parameter.

Call Example (python)

The contents of the channels.json:

JSON

{

 “channels”: [

   {

     “container_type”:“ts”,

     “data_storages”: [

       “fs”

     ],

     “id”:“CH_HLSTS”,

     “index_storage”:“mongo_local”,

     “muxers”: [

       {

         “bw”:“6500000”,

         “dir”:“bw5000000”,

         “encryptor”: {

           “drm”:“verimatrix”

         },

         “sources”: [

           {

             “master”:“true”,

             “source”:“ts_multicast_1”

           }

         ]

       }

     ],

     “sources”: [

       {

         “id”:“ts_multicast_1”,

         “url”:“udp://239.65.40.4:5001”

       }

     ]

   },

   {

     “container_type”:“mp4”,

     “data_storages”: [

       “fs”

     ],

     “demuxers”: [

       {

         “id”:“dmx1”,

         “source”:“ts_multicast_1”,

         “tracks”: [

           “vid0”,

           “aud0”

         ]

       }

     ],

     “id”:“CH_DASHMP4”,

     “index_storage”:“mongo_local”,

     “muxers”: [

       {

         “bw”:“6500000”,

         “dir”:“video/bw5000000”,

         “encryptor”: {

           “drm”:“widevine_test”

         },

         “sources”: [

           {

             “master”:“true”,

             “source”:“dmx1:vid0”

           }

         ]

       },

       {

         “bw”:“100000”,

         “dir”:“audio/bw150000”,

         “encryptor”: {

           “drm”:“widevine_test”

         },

         “sources”: [

           {

             “source”:“dmx1:aud0”

           }

         ]

       }

     ],

     “sources”: [

       {

         “id”:“ts_multicast_1”,

         “url”:“udp://239.1.1.1:5001”

       }

     ]

   }

 ]

}

After the call below

Python

rpcResult = conveyor.GetChannel(‘CH_HLSTS’)

the following response is returned to rpcResult:

JSON

{

 “container_type”:“ts”,

 “data_storages”: [

   “fs”

 ],

 “id”:“CH_HLSTS”,

 “index_storage”:“mongo_local”,

 “muxers”: [

   {

     “bw”:“6500000”,

     “dir”:“bw5000000”,

     “encryptor”: {

       “drm”:“verimatrix”

     },

     “sources”: [

       {

         “master”:“true”,

         “source”:“ts_multicast_1”

       }

     ]

   }

 ],

 “sources”: [

   {

     “id”:“ts_multicast_1”,

     “url”:“udp://239.65.40.4:5001”

   }

 ]

}

And after the call below

Python

rpcResult = conveyor.GetChannel(‘not a channel’)

the following response is returned to rpcResult:

{}

StartRecord(npvr_channel_id, params)

The method starts recording the channel. If the channel is already in the configuration file or its parameters are not correct, an error is returned.

npvr_channel_id, string 

Channel ID.

params, string 

JSON object with a list of channels.

Call Example (python)

The contents of the channels.json:

JSON

{

 “id”:“will_be_ignored”,

 “container_type”:“ts”,

 “data_storages”: [

   “fs”

 ],

 “index_storage”:“mongo_local”,

 “muxers”: [

   {

     “bw”:“6500000”,

     “dir”:“bw5000000”,

     “encryptor”: {

       “drm”:“verimatrix”

     },

     “sources”: [

       {

         “master”:“true”,

         “source”:“ts_multicast_1”

       }

     ]

   }

 ],

 “sources”: [

   {

     “id”:“ts_multicast_1”,

     “url”:“udp://239.65.40.4:5001”

   }

 ]

}

After the call below

Python

rpcResult = recorder.StartRecord(‘my_channel_id’, json.dumps(channelJson))

the channel receives the channel_id equal to my_channel_id.

StopRecord(channel_id)

The method stops recording the channel with the specified ID and removes it from the configuration file.

channel_id, string 

Channel ID.

If the channel with the specified channel_id is missing, the method returns an error.

Call Example (python)

Python

rpcResult = recorder.RemoveChannelParams(‘my_channel_id’)

GetChannels(id_filter, verbose)

The method returns a JSON object with a list of known channels and their configurations from the channels.json file.

id_filter, string 

Optional. Regular expression returning a list of channels whose ID matches this regular expression. By default, all channels known to Conveyor are returned.

verbose, boolean 

Default value: false

Flag to control the amount of JSON data retuned. If true, all the channel parameters are returned, including data not explicitly specified in the configuration (i.e. having default values). If false, the explicitly specified parameters are returned.

Parameters can be passed either in order or with a name.

Call Example (python)

The contents of the channels.json:

JSON

{

 “channels”: [

   {

     “container_type”:“ts”,

     “data_storages”: [

       “fs”

     ],

     “id”:“CH_HLSTS”,

     “index_storage”:“mongo_local”,

     “muxers”: [

       {

         “bw”:“6500000”,

         “dir”:“bw5000000”,

         “encryptor”: {

           “drm”:“verimatrix”

         },

         “sources”: [

           {

             “master”:“true”,

             “source”:“ts_multicast_1”

           }

         ]

       }

     ],

     “sources”: [

       {

         “id”:“ts_multicast_1”,

         “url”:“udp://239.65.40.4:5001”

       }

     ]

   },

   {

     “container_type”:“mp4”,

     “data_storages”: [

       “fs”

     ],

     “demuxers”: [

       {

         “id”:“dmx1”,

         “source”:“ts_multicast_1”,

         “tracks”: [

           “vid0”,

           “aud0”

         ]

       }

     ],

     “id”:“CH_DASHMP4”,

     “index_storage”:“mongo_local”,

     “muxers”: [

       {

         “bw”:“6500000”,

         “dir”:“video/bw5000000”,

         “encryptor”: {

           “drm”:“widevine_test”

         },

         “sources”: [

           {

             “master”:“true”,

             “source”:“dmx1:vid0”

           }

         ]

       },

       {

         “bw”:“100000”,

         “dir”:“audio/bw150000”,

         “encryptor”: {

           “drm”:“widevine_test”

         },

         “sources”: [

           {

             “source”:“dmx1:aud0”

           }

         ]

       }

     ],

     “sources”: [

       {

         “id”:“ts_multicast_1”,

         “url”:“udp://239.1.1.1:5001”

       }

     ]

   }

 ]

}

After the call below

Python

rpcResult = recorder.GetChannels()

the following response is returned to rpcResult:

JSON

{

 “CH_HLSTS”: {

   “container_type”:“ts”,

   “data_storages”: [

     “fs”

   ],

   “id”:“CH_HLSTS”,

   “index_storage”:“mongo_local”,

   “muxers”: [

     {

       “bw”:“6500000”,

       “dir”:“bw5000000”,

       “encryptor”: {

         “drm”:“verimatrix”

       },

       “sources”: [

         {

           “master”:“true”,

           “source”:“ts_multicast_1”

         }

       ]

     }

   ],

   “sources”: [

     {

       “id”:“ts_multicast_1”,

       “url”:“udp://239.65.40.4:5001”

     }

   ]

 },

 “CH_DASHMP4”: {

   “container_type”:“mp4”,

   “data_storages”: [

     “fs”

   ],

   “demuxers”: [

     {

       “id”:“dmx1”,

       “source”:“ts_multicast_1”,

       “tracks”: [

         “vid0”,

         “aud0”

       ]

     }

   ],

   “id”:“CH_DASHMP4”,

   “index_storage”:“mongo_local”,

   “muxers”: [

     {

       “bw”:“6500000”,

       “dir”:“video/bw5000000”,

       “encryptor”: {

         “drm”:“widevine_test”

       },

       “sources”: [

         {

           “master”:“true”,

           “source”:“dmx1:vid0”

         }

       ]

     },

     {

       “bw”:“100000”,

       “dir”:“audio/bw150000”,

       “encryptor”: {

         “drm”:“widevine_test”

       },

       “sources”: [

         {

           “source”:“dmx1:aud0”

         }

       ]

     }

   ],

   “sources”: [

     {

       “id”:“ts_multicast_1”,

       “url”:“udp://239.1.1.1:5001”

     }

   ]

 }

}

After the call below

Python

rpcResultFiltered = recorder.GetChannels(id_filter =‘CH_DASH.*’)

the following response is returned to rpcResultFiltered:

JSON

{

 “CH_DASHMP4”: {

   “container_type”:“mp4”,

   “data_storages”: [

     “fs”

   ],

   “demuxers”: [

     {

       “id”:“dmx1”,

       “source”:“ts_multicast_1”,

       “tracks”: [

         “vid0”,

         “aud0”

       ]

     }

   ],

   “id”:“CH_DASHMP4”,

   “index_storage”:“mongo_local”,

   “muxers”: [

     {

       “bw”:“6500000”,

       “dir”:“video/bw5000000”,

       “encryptor”: {

         “drm”:“widevine_test”

       },

       “sources”: [

         {

           “master”:“true”,

           “source”:“dmx1:vid0”

         }

       ]

     },

     {

       “bw”:“100000”,

       “dir”:“audio/bw150000”,

       “encryptor”: {

         “drm”:“widevine_test”

       },

       “sources”: [

         {

           “source”:“dmx1:aud0”

         }

       ]

     }

   ],

   “sources”: [

     {

       “id”:“ts_multicast_1”,

       “url”:“udp://239.1.1.1:5001”

     }

   ]

 }

}

AddLogo(channel_id, params)

The method adds the dynamic Timed Logo in the scheduler and returns the ID of the object added. The fields url, x, and y have the same purpose as for a static logo. The utcstart and utcend fields set the logo overlaying period in UTC (the number of seconds from 01.01.1970).

The binary image data is downloaded from the specified URL and stored in DB along with the metadata. If the image cannot be downloaded, the method returns an error. If the logo overlaying period has expired, i.e. the utcend is in the past, an error is also returned.

channel_id, string 

Chanel ID.

params, string 

JSON object with a logo description.

Call Example (python)

JSON

{

 “channel_id”:“CH_TEST”,

 “url”:“http://example.com:8080/logo/eurosport.png”,

 “utcstart”:“1606485419”,

 “utcend”:“1606485420”,

 “x”:“100”,

 “y”:“100”

}

After the call below

Python

rpcResult = recorder.AddLogo(‘CH_TEST’, json.dumps(logoJson))

the following response is returned to rpcResult:

JSON

{

 “id”:“507f1f77bcf86cd799439011”

}

RemoveLogo(channel_id, logo_id)

The method removes the dynamic Timed Logo from the scheduler and DB. If the logo is currently active and is overlaid on the video by the transcoder, it disappears without waiting for the utcend moment. If the logo is not found, the method returns an error.

channel_id, string 

Chanel ID.

logo_id, string 

Logo ID.

Call Example (python)

After the call below

Python

rpcResult = recorder.RemoveLogo(‘CH_TEST’, ‘507f1f77bcf86cd799439011’)

an empty response is returned to rpcResult, confirming the successful removing of the object.

GetLogoList(channel_id)

The method returns logos for the specified channel in the form of a JSON object containing “key–value” pairs, where the logo_id is a key, and the JSON object (logo description) is a value.

channel_id, string 

Chanel ID.

Call Example (python)

After the call below

Python

rpcResult = recorder.GetLogoList(‘CH_TEST’)

the following response is returned to rpcResult:

JSON

{

 “507f1f77bcf86cd799439011”: {

   “id”:“507f1f77bcf86cd799439011”,

   “channel_id”:“CH_TEST”,

   “url”:“http://example.com:8080/logo/eurosport.png”,

   “utcstart”:“1606485419”,

   “utcend”:“1606485420”,

   “x”:“100”,

   “y”:“100”,

   “override_previous”:“true”

 },

 “507f1f77bcf86cd799439012”: {

   “id”:“507f1f77bcf86cd799439012”,

   “channel_id”:“CH_TEST”,

   “url”:“http://example.com:8080/logo/1ch_logo.png”,

   “utcstart”:“1606485430”,

   “utcend”:“1606485440”,

   “x”:“200”,

   “y”:“200”,

   “override_previous”:“true”

 }

}

Python

{

   “id” : “nvenc1”,

   “host” : “10.65.2.198”,

   “port” : “7789”,

   “box_parser_buffer_size” : “5M”,

   “queue_overflow_threshold” : “2M”,

   “name” : “Nvidia_T400”,

   “rpc_port” : “7889”

}

CONTENTS
Sign-in
Sign-in with your SmartLabs Support Portal account credentials to see non-public articles.