Skip to main content

viddec

The viddec command is used to manage video decoding for the SDI 1 and SDI 2 ports. This includes binding the video outputs to the streams and configuring properties such as the Output Resolution and Frame Rate.

Each decoder channel can support an alternate (secondary) stream as input which is switched to if the primary fails in order to minimize down-time. You can also select a Still Image such as a black screen that the decoder will display if it is no longer receiving video (for example, if the encoder stream has stopped or the network connection is lost).

Synopsis

viddec ID start
viddec ID stop
viddec ID set parameter=value [parameter=value ...]
viddec ID get [config, stats, all]
viddec ID clear

Actions

ActionDescription
startActivates decoding of the video input.
stopStops (mutes) decoding of the video input.
set

Modifies decoder video parameter(s).

A series of one or more parameter=value pairs can be specified at once. See Parameters below.

get

Displays decoder video status information.

You can specify to display the configuration (config), stats, or all.

clearClears the decoder's statistics.
helpDisplays usage information for the viddec command.

Parameters

ParameterDefaultDescription/Values

streamId

n/a

Specifies the primary stream to bind to the video output. Positive stream index. See Configuring Decoder Outputs.

altStreamId

n/a

Specifies the alternative stream to bind to the video output. Positive stream index. See Configuring Decoder Outputs.

frameRate

Auto

The output frame rate for the displays. Auto, 23, 24, 25, 29, 30, 50, 59, 60, 75

If Auto is selected, the actual frame rate generated will be the next highest valid frame rate supported by the SDI interface, plus the one that gives the best decimation factor. For example, 30Hz could be chosen instead of 29.970 Hz.

Values set which are impossible to implement will be treated as Auto. Reasons for not supporting the selection can range from “Display does not support the frame rate” or “Frame rate is undefined for the detected input resolution”.

stillImage

freeze

The type of static image to display when the decoder is not receiving a video stream.

  • freeze: continues to display the last decoded video frame.
  • black: displays a black screen.
  • blue: displays a blue screen.
  • bars: displays a series of vertical color bars across the width of the display.
  • mute: disables the video output.
  • custom: displays a custom static image. See mkstill.

NOTE: When the still image is substituted on the display outputs, the video frame rate and resolution will be maintained.

When the video decoder receives a new video stream, it will wait until it receives a new IDR frame and will re-start the display with that IDR frame.

stillDelay

3

The delay in seconds before the still image is displayed. 1...1000

stillFile

n/a

File name of custom still image.

resolution

n/a

The output resolution:

  • Auto: The decoder will select an output resolution that attempts to closely match the coded picture resolution, taking into account the capabilities of any displays connected to the HDMI interface.
  • Native: The output resolution will be exactly the same as the coded picture resolution. If the coded picture resolution is not compatible with the output interfaces, nothing will be displayed. See "Output Resolution" in SDI Decoder Settings.
  • 1080p, 720p, 1080i, 480i, 576i, 480p, 576p, Xga, Sxga, Vga, Svga, 1152x864p, 1280x768p, 1280x800p, 1360x768p, 1366x768p, 1400x1050p, 1440x900p, 1600x900p, 1600x1200p, 1680x1050p, 1920x1200p

syncmode

stc

The mode of synchronization of sound and picture for the decoded stream:

  • stc: Synchronizes with the encoder system clock by comparing the packet timestamp with the reference clock.
  • passthrough: Decodes packets without comparing the packet timestamp to synchronize video and audio. This may result in A/V sync issues, but may be required in circumstances where network performance hinders synchronization. See Video Decoder Buffering Passthrough.

buffering

automatic

(syncmode must be stc) The type of buffering to use. A jitter buffer temporarily stores arriving packets in order to remove the effects of jitter from the decoded stream.

  • Automatic: Automatic mode favors smooth playing content with good synchronization between audio and video. The incoming stream is monitored and the optimal required delay is determined so that stream packet and video picture jitter is absorbed. The calculated delay may change slowly as network and video conditions change. See “Mode” in SDI Decoder Settings.
  • Fixed: Fixed mode allows users to specify a delay to be added to the decode pipeline after the content is decoded. The amount of delay does not vary and artifacts may result if a too low value is used.

Note

The decoder has a minimum buffer set based on the resolution and frame-rate of the stream content. In addition, users can add more delay if desired: (1) to achieve a specific decoding latency for inter-channel synchronization purposes; (2) to deal with unusually large amounts of jitter in the stream; or (3) to allow A/V sync to occur when the stream content is highly out of sync. (See delay below.)
  • Adaptive (Low-Latency): The decoder measures the stream packet and video picture jitter and adds in a delay so that artifacts are minimized while also minimizing video latency. Provides backward compatibility with older decoder versions.

Note

Audio artifacts may occur if audio is streamed after video when using Adaptive Low Latency.
  • multisync: Use to synchronize the content across multiple channels to within one frame period. This is designed to allow down-stream equipment to switch smoothly between video and audio sources . You need to set the multiSyncDelay on all of the decoder channels to the same value. For the steps to configure multi-channel sync on Makito X Series encoders and decoders, see Multi-channel Synchronization.

delay

0 ms

The delay in ms when using stc syncmode with fixed buffering.

0..2000ms

Note

The maximum delay is 2000 ms. If for any reason the system requires more than this value to play smoothly, video or audio artifacts will be noticed.
multiSyncDelay1000 ms
The delay in ms required to ensure that two or more decoder channels are synchronized when using stc syncmode and multisync buffering .

0...10000 ms

Note

The difference in the values between the decoders cannot exceed 2000 ms.

viddec Examples

# viddec 1 get all

Returns video configuration information and statistics for decoder #1, such as:

Decoder ID             : 1
Configuration:
Stream ID : 1
Alternative Stream ID : (None)
State : STARTED
Resolution : Auto
Frame Rate : Auto
Still Image : Freeze
Still Delay : 3 (s)
Sync Mode : Stc
Buffering : Automatic
Statistics:
State : Running
Active Stream ID : 1
Hdmi Output : Yes
Up Time : 0 days 21 hours 33 minutes 17 seconds
Number of Restarts : 0
Audio vs Video delay : ~ 37 ms (Video late)
Video:
Algorithm : H.264
Profile : Main
Level : 4.0
State : Running
Sync Mode : Stc
Buffering : Automatic
Buffering Delay : 330 ms
Input Format : 1920x1080 Interlaced
Output Format : 1080i29
Still Image : Freeze (Not Active) [Count=0]
Bitrate : 6,034 kbps
Framerate : 29.97
Decoded Frames : 2,325,501 (100.00%)
Discarded Frames : 0 (0.00%)
Displayed Frames : 2,325,443 (100.00%)
Skipped Frames : 7 (0.00%) last one at 2019-01-17 13:40:31.322
Replayed Frames : 19 (0.00%) last one at 2019-01-17 13:40:31.222
Audio:
Algorithm : AACLC/ADTS
Implementation : Software
State : Running
Bitrate : 128 kbps
Sample Rate : 48 kHz
Number of Pairs : 1
Audio1 Input Layout : 2.0 (FrontL FrontR)
Audio Output Layout : 2.0 (FrontL FrontR)
Decoded Frames : 3,637,340 (100.00%)
Output Frames : 3,637,197 (100.00%)
Skipped Frames : 143 (0.00%)
KLV: Not Present
CC: Not Present
TC: Not Present
AFD: Not Present
# viddec 1 set stillimage=blue

Sets the static image to blue. You will receive the following confirmation:

Decoder configured successfully.
# viddec 1 get stats
Returns video configuration statistics for decoder #1, such as:
Decoder ID           : 1
Statistics:
State : Running
Active Stream ID : 3
Hdmi Output : Yes
Up Time : 1 days 0 hours 32 minutes 0 seconds
Number of Restarts : 0
Audio vs Video delay : ~ 39 ms (Video late)
Video:
Algorithm : H.264
Profile : Baseline
Level : 4.2
State : Running
Sync Mode : Stc
Buffering : Automatic
Buffering Delay : 440 ms
Input Format : 1920x1080 Progressive
Output Format : 1080p59
Still Image : Colorbars (Not Active) [Count=0]
Bitrate : 7,882 kbps
Framerate : 59.94
Decoded Frames : 5,291,184 (99.99%)
Discarded Frames : 302 (0.01%)
Displayed Frames : 5,286,432 (99.84%)
Skipped Frames : 4,560 (0.09%) last one at 2019-01-18 10:02:14.888
Replayed Frames : 3,701 (0.07%) last one at 2019-01-18 10:02:14.857
Audio:
Algorithm : AACLC/ADTS
Implementation : Software
State : Running
Bitrate : 128 kbps
Sample Rate : 48 kHz
Number of Pairs : 1
Audio1 Input Layout : 2.0 (FrontL FrontR)
Audio Output Layout : 2.0 (FrontL FrontR)
Decoded Frames : 4,139,042 (100.00%)
Output Frames : 4,139,009 (100.00%)
Skipped Frames : 33 (0.00%)
KLV: Not Present
CC: Not Present
TC: Not Present
AFD: Not Present

Tip

The stream type is automatically determined on decoder startup. The viddec Video Algorithm statistic shows which codec algorithm (H.264 or HEVC) is in use for a decode channel.

Video Decoder Buffering Passthrough

Passthrough is a special mode that instructs the decoder to bypass its internal jitter buffer and output video/audio as data becomes available to play (while maintaining AV sync). Normally, the decoder will adapt to the detected network jitter to preserve smooth play of the video. Passthrough mode is intended for use within QoS-enabled enterprise class networks that have well controlled network jitter.

The advantage of this mode is a perceptible reduced latency.

The side effect of passthrough is that, occasionally, even the most pristine networks may have issues that, when passthrough mode is enabled, are more likely to cause the decoder to drop or replay a video frame.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.