cutcutcodec.core.classes.layout.AllLayouts

class cutcutcodec.core.classes.layout.AllLayouts(*args, **kwargs)[source]

Parse the ffmpeg -layouts command line.

Attributes

individualsdict[str, str]

To each channel canonical name in lower case, associate the description (readonly).

layoutsdict[str, tuple[str, …]]

To each layouts name, associate the names of the channels (readonly).

property individuals: dict[str, str]

To each channel canonical name in lower case, associate the description.

Examples

>>> from pprint import pprint
>>> from cutcutcodec.core.classes.layout import AllLayouts
>>> pprint(AllLayouts().individuals)
{'bc': 'back center',
 'bfc': 'bottom front center',
 'bfl': 'bottom front left',
 'bfr': 'bottom front right',
 'bl': 'back left',
 'br': 'back right',
 'dl': 'downmix left',
 'dr': 'downmix right',
 'fc': 'front center',
 'fl': 'front left',
 'flc': 'front left-of-center',
 'fr': 'front right',
 'frc': 'front right-of-center',
 'lfe': 'low frequency',
 'lfe2': 'low frequency 2',
 'sdl': 'surround direct left',
 'sdr': 'surround direct right',
 'sl': 'side left',
 'sr': 'side right',
 'tbc': 'top back center',
 'tbl': 'top back left',
 'tbr': 'top back right',
 'tc': 'top center',
 'tfc': 'top front center',
 'tfl': 'top front left',
 'tfr': 'top front right',
 'tsl': 'top side left',
 'tsr': 'top side right',
 'wl': 'wide left',
 'wr': 'wide right'}
>>>
property layouts: dict[str, list[str]]

To each layouts name, associate the names of the channels.

Examples

>>> from pprint import pprint
>>> from cutcutcodec.core.classes.layout import AllLayouts
>>> pprint(AllLayouts().layouts)  
{'2.1': ('fl', 'fr', 'lfe'),
 ...
 'stereo': ('fl', 'fr')}
>>>