SmartNvidiaTranscoder
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
The path to the main configuration file.
–console-log
Tells service 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: smnvtrc.log.json
The path to the logging configuration file.
–log-file
Default Value: smnvtrc_%i_%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:
- i — server instance ID,
- 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 will be rotated only on service restart.
–instance-id, -i
Server instance ID.
Configuration File
The default location of the configuration file is: /opt/smartlabs/smartmedia/nvidia-transcoder/config/config.json
Basic Parameters
instances, [array{object}]
List of configurations for server instances.
id, string
Server instance ID.
interface, string
The interface to listen on for incoming connections.
port, integer
The port for incoming FastCGI connections.
threads, integer
Default Value: 4
Number of working threads.
card, integer
Video card number. A list of all video cards in the system can be obtained using the command nvidia-smi -L
box_parser_buffer_size, data size
Default Value: 10M
The size of the buffer used for parsing of MP4-boxes, which are transferred between the network transcoder and SmartMEDIA Conveyor service.
Each media sample should fit in the buffer, thus this value must be more than the maximum I-frame size within the video stream. In case of a high-bitrate stream, such as UHD/4K streams, this value might need to be increased.
idle_interval_sec, integer
Default Value: 300
The period of client inactivity (in seconds), after which the TCP connection and the transcoding session are closed to save resources.
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.
pts_order_err_interval_frames , integer
Default Value: 0
Interval (in frames) during which frames with incorrect PTS order are counted. A value of 0 disables this feature.
pts_order_err_threshold_frames , integer
Default Value: 0
Number of frames with incorrect PTS order. When this number is reached within the interval ‘pts_order_err_interval_frames’ the pipeline will be recreated. Sometimes the video starts playing with a ‘slow motion’ effect. This is caused by the incorrect order of PTS at the output of the decoder. To fix this problem you need to recreate the pipeline. A value of 0 disables this feature.
Configuration Example
JSON |
{ “instances” : [ { “id” : “inst01”, “interface” : “192.168.1.56”, “port” : 7784, “threads” : 4, “card” : 0, “box_parser_buffer_size” : “10M”, “rpc_port” : 49988, “rpc_event_queue_size” : 5000, “pts_order_err_interval_frames”: 1800, “pts_order_err_threshold_frames”: 20 } ] } |
Supported RPC Methods
See also the “RPC Methods Common to all Services” chapter.
GetGpuMetrics()
The method returns the metrics of the GPU bound to the current server instance.
Call Example (python)
After the call below
Python |
rpcResult = trc.GetGpuMetrics() |
the following response will be returned to rpcResult:
GetSessions()
The method returns session list.
Call Example (python)
After the call below
Python |
rpcResult = trc.GetSessions() |
the following response will be returned to rpcResult:
JSON |
[ { “ip”: “10.65.6.190”, “port”: “37616”, “channelId”: “CH_1”, “mediaType”: “video”, “config”: { “id”: “vtrc0”, “decode_encrypted”: “false”, “deinterlacing”: “auto”, “a53cc”: “false”, “complete_frame_in_nalu”: “true”, “double_rate_deinterlacing”: “false”, “async_depth”: “4”, “crop”: { “h”: “65535”, “w”: “65535”, “x”: “65535”, “y”: “65535” }, “out”: [ { “frame_rate_numerator”: “30”, “frame_rate_denominator”: “1”, “gop_size”: “50”, “bitrate”: “9216000”, “maxrate”: “0”, “bufsize”: “0”, “rc_init_occupancy”: “0”, “quality”: “0”, “width”: “720”, “height”: “576”, “codec”: “h264”, “pix_fmt”: “nv12”, “preset”: “best_speed”, “use_mfe”: “false”, “bframes_num”: “0” } ] } }, { “ip”: “10.65.6.190”, “port”: “37618”, “channelId”: “CH_1”, “mediaType”: “audio”, “config”: { “id”: “atrc0”, “decode_encrypted”: “true”, “out”: [ { “bitrate”: “196608”, “channels_count”: “2”, “sample_rate”: “48000” } ] } } ] |