DekTec logo
Command-Line Options for ffmpeg and ffplay  

Command-Line Options for ffmpeg and ffplay

This page details the command-line options for 'ffmpeg' and 'ffplay' introduced by DekTec. These options are designed to facilitate real-time input and output when using DekTec devices, as well as to provide support for the .sdi file format. They are supplemental to the extensive range of options already offered by ffmpeg and ffplay.

 

Quick Overview

Explore the specialized command-line options added to FFmpeg for seamless integration with DekTec devices and the .sdi file format.

Main

-f dektec

(input/output)

-i <serial>[:<port>]

(input)

<serial>[:<port>]

(output)

-url:<stream> <url>

(input/output)

SMPTE 2110

-aspp <num>

(audio output)

-bps <bits>

(audio input)

-n_channels <num>

(audio input)

-pf <pixel_format>

(video output)

-pm <mode>

(video output)

-ps <bytes>

(audio/video output)

-pt <type>

(audio/video output)

-sample_rate <rate>

(audio input)

-sch <mode>

(video output)

SDI

-sdi_standard <std>

(sdi output)

-calc_crc 0|1

(.sdi output)

Supported DekTec Adapters

DTA-2110 ST 2110 1x 10G SFP+
DTA-2172 SDI 2x in or out
DTA-2174B SDI 4x in or out
DTA-2178 SDI 8x in or out

Input/Output via DekTec Devices

When using FFmpeg commands ('ffmpeg' or 'ffplay') to handle real-time streams originating from or directed to a DekTec device, adhere to the following option structure:

For input:

ffmpeg|ffplay [<ffmpeg_args>] [<dektec_args>] -f dektec -i <serial>[:<port>]

This sets the DekTec device identified by the specified serial number and optional port as the input source. If no port is specified, port 1 will be used by default.

For output:

ffmpeg [<ffmpeg_args>] [<dektec_args>] -f dektec <serial>[:<port>]

This designates the DekTec device with the given serial number and optional port as the destination for the output stream. If the port is omitted, port 1 will be used as the default.

Main Options

-f dektec (input/output)

Explicitly instruct 'ffmpeg' or 'ffplay' to use a DekTec device for input or output.

-i <serial>[:<port>] (input)

Set the serial number and optional port for the DekTec device providing the input stream. Defaults to port 1 if no port is specified.

<serial>[:<port>] (output)

Set the serial number and optional port for the DekTec device receiving the output stream. Defaults to port 1 if no port is specified.

-url:<stream> <url> (input/output)

Specify the URL for a video ('v') or audio ('a') stream.

SMPTE 2110 Options

-aspp <num> (audio output)

Set the number of audio samples per RTP packet. Default is 48. Minimum value is 1. Maximum value depends on the audio properties. Common values are 6 and 48.

-bps <bits> (audio input)

Specify the audio bit depth per sample. Allowed values are 16 and 24.

-n_channels <num> (audio input)

Specify the number of audio channels. Allowed range is from 1 to 64.

-pf <pixel_format> (video output)

Specify the pixel format. Default is auto. Other values are 8 and 10. Automatic pixel format conversion is done if the video pixel format doesn't match this argument.

-pm <mode> (video output)

Set the SMPTE 2110 packing mode. Allowed values are block, line, and general. Default is block.

-ps <bytes> (audio/video output)

Specify the RTP payload size in bytes. Default is -1 and automatically sizes the RTP packets. Allowed range is from 1 to 1440.

-pt <type> (audio/video output)

Specify the RTP payload type. Default is 96. Allowed range is from 96 to 127.

-sample_rate <rate> (audio input)

Specify the audio sample rate. Allowed values are 32000, 44100, 48000, and 96000.

-sch <mode> (video output)

Set the SMPTE 2110 scheduling mode. Allowed values are gapped and linear. Default is gapped.

SDI Options

-sdi_standard <std> (real-time SDI output)

Force a specific SDI standard. Otherwise the standard will automatically be deduced from the SDI input stream.

-calc_crc <0|1> (.sdi file output)

Enable ('1') or disable ('0') the calculation of CRC checksums for each SDI line in the .sdi output file. Default is '1'. Disabling ('0') can speed up ffmpeg.
When using a DekTec SDI output device, the line CRCs are computed automatically by the hardware, making this option redundant.

Example Command Lines

Decode the video and audio of the first service from the MPEG-2 Transport Stream file input.ts. Then, output the uncompressed video and audio as SMPTE 2110 streams via a DTA-2110 device, targeting the specified multicast URLs.

ffmpeg -i input.ts -url:v 239.0.0.5:5678 -url:a 239.0.0.6:5680 \
       -f dektec 211000054

Receive and display a SMPTE 2110 video stream via a DTA-2110 device, with auto-detection of video parameters enabled by the DekTec FFmpeg extension.

ffplay -url:v 239.0.0.5:5678 -f dektec -i 2110000054

Receive a SMPTE 2110 video and audio stream via a DTA-2110 device, and display the video in a window while playing the audio through the computer's audio output. The DekTec FFmpeg extension automatically detects both the video and audio formats.

ffplay -url:v 239.0.0.5:5678 -url:a 239.0.0.5:5680 -f dektec -i 2110000054

Receive a SMPTE 2110 audio-only stream via a DTA-2110 device and play it through the system's default audio output. In this example, auto-detection is bypassed by specifying the audio format directly in the command line.

ffplay -url:a 239.0.0.5:5680 -sample_rate 48000 -bps 24 -n_channels 2 \
       -f dektec -i 2110000054

Decode a Transport Stream file and play it out as a real-time SDI stream via a DTA-2178 device on port 3.

ffmpeg -i input.ts -f dektec -i 2178000024:3

Receive a real-time SDI stream via a DTA-2178 device on port 1. Display the video in a window and play the audio through the system's default audio output.

ffplay -f dektec -i 2178000024:1

Decode the video and audio of the first service in an MPEG Transport Stream and convert them to SDI format, saving the output as an .sdi file.

ffmpeg -i input.ts output.sdi

Read an .sdi file and display its video content in a window, while playing the audio through the system's default audio output.

ffplay input.sdi