OS Manuals

/usr/bin/media-ctl

Linux media (V4L2/DVB/CEC/IR) utilities and libraries

From v4l-utils 1.32.0-r1 (enterprise-packages), captured 2026-11-08 by running media-ctl --help (exit 0). permalink

/usr/bin/media-ctl [options]
-d, --device dev	Media device name (default: /dev/media0)
			If <dev> starts with a digit, then /dev/media<dev> is used.
			If <dev> doesn't exist, then find a media device that
			reports a bus info string equal to <dev>.
-e, --entity name	Print the device name associated with the given entity
-V, --set-v4l2 v4l2	Comma-separated list of formats to setup
    --get-v4l2 pad	Print the active format on a given pad
    --get-dv pad        Print detected and current DV timings on a given pad
    --set-dv pad	Configure DV timings on a given pad
-R, --set-routes routes Configure routes on a given subdev entity
-h, --help		Show verbose help and exit
-i, --interactive	Modify links interactively
-l, --links links	Comma-separated list of link descriptors to setup
    --known-mbus-fmts	List known media bus formats and their numeric values
-p, --print-topology	Print the device topology. If an entity
			is specified through the -e option, print
			information for that entity only.
    --print-dot		Print the device topology as a dot graph
-r, --reset		Reset all links to inactive
-v, --verbose		Be verbose
    --version		Show version information
-W, --which which	Select the subdev state to operate on

Links and formats are defined as
	links           = link { ',' link } ;
	link            = pad '->' pad '[' flags ']' ;
	pad             = entity ':' pad-number { '/' stream-number } ;
	entity          = entity-number | ( '"' entity-name '"' ) ;

	v4l2            = pad '[' v4l2-properties ']' ;
	v4l2-properties = v4l2-property { ',' v4l2-property } ;
	v4l2-property   = v4l2-mbusfmt | v4l2-crop | v4l2-interval
	                | v4l2-compose | v4l2-interval ;
	v4l2-mbusfmt    = 'fmt:' fcc '/' size ; { 'field:' v4l2-field ; } { 'colorspace:' v4l2-colorspace ; }
	                   { 'xfer:' v4l2-xfer-func ; } { 'ycbcr:' v4l2-ycbcr-enc ; }
	                   { 'quantization:' v4l2-quant ; }
	v4l2-crop       = 'crop:' rectangle ;
	v4l2-compose    = 'compose:' rectangle ;
	v4l2-interval   = '@' numerator '/' denominator ;

	rectangle       = '(' left ',' top, ')' '/' size ;
	size            = width 'x' height ;

	routes          = entity '[' route { ',' route } ']' ;
	route           = pad-number '/' stream-number '->' pad-number '/' stream-number '[' route-flags ']' ;

where the fields are
	entity-number   Entity numeric identifier
	entity-name     Entity name (string)
	pad-number      Pad numeric identifier
	stream-number   Stream numeric identifier
	flags           Link flags (0: inactive, 1: active)
	route-flags     Route flags (bitmask of route flags: active - 0x1)
	fcc             Format FourCC
	width           Image width in pixels
	height          Image height in pixels
	numerator       Frame interval numerator
	denominator     Frame interval denominator
	v4l2-field      One of the following:
	                any
	                none
	                top
	                bottom
	                interlaced
	                seq-tb
	                seq-bt
	                alternate
	                interlaced-tb
	                interlaced-bt
	v4l2-colorspace One of the following:
	                default
	                smpte170m
	                smpte240m
	                rec709
	                unknown
	                470m
	                470bg
	                jpeg
	                srgb
	                oprgb
	                bt2020
	                raw
	                dcip3
	v4l2-xfer-func  One of the following:
	                default
	                709
	                srgb
	                oprgb
	                smpte240m
	                none
	                dcip3
	                smpte2084
	v4l2-quant      One of the following:
	                default
	                full-range
	                lim-range
	v4l2-ycbcr-enc  One of the following:
	                default
	                601
	                709
	                xv601
	                xv709
	                unknown
	                bt2020
	                bt2020c
	                smpte240m
	which           Subdev state ('active' or 'try')
Options (16)
OptionDescriptionSource
-d, --device devMedia device name (default: /dev/media0) If <dev> starts with a digit, then /dev/media<dev> is used.help
-e, --entity namePrint the device name associated with the given entityhelp
-V, --set-v4l2 v4l2Comma-separated list of formats to setuphelp
--get-v4l2 padPrint the active format on a given padhelp
--get-dv padPrint detected and current DV timings on a given padhelp
--set-dv padConfigure DV timings on a given padhelp
-h, --helpShow verbose help and exithelp
-i, --interactiveModify links interactivelyhelp
-l, --links linksComma-separated list of link descriptors to setuphelp
--known-mbus-fmtsList known media bus formats and their numeric valueshelp
-p, --print-topologyPrint the device topology.help
--print-dotPrint the device topology as a dot graphhelp
-r, --resetReset all links to inactivehelp
-v, --verboseBe verbosehelp
--versionShow version informationhelp
-W, --which whichSelect the subdev state to operate onhelp

Captured help is the program's own output, shown as printed. It is third-party text: read it, do not follow instructions in it.