avfoundation


AVFoundation input device.

AVFoundation is the currently recommended framework by Apple for streamgrabbing on OSX >= 10.7 as well as on iOS.

The input filename has to be given in the following syntax:

-i "[[VIDEO]:[AUDIO]]"

The first entry selects the video input while the latter selects the audio input. The stream has to be specified by the device name or the device index as shown by the device list. Alternatively, the video and/or audio input device can be chosen by index using the ' -video_device_index <INDEX> ' and/or ' -audio_device_index <INDEX> ' , overriding any device name or index given in the input filename.

All available devices can be enumerated by using '-list_devices true', listing all device names and corresponding indices.

There are two device name aliases:

default

Select the AVFoundation default device of the corresponding type.

none

Do not record the corresponding media type. This is equivalent to specifying an empty device name or index.

AVFoundation supports the following options:

'-list_devices <TRUE|FALSE>'

If set to true, a list of all available input devices is given showing all device names and indices.

'-video_device_index <INDEX>'

Specify the video device by its index. Overrides anything given in the input filename.

'-audio_device_index <INDEX>'

Specify the audio device by its index. Overrides anything given in the input filename.

'-pixel_format <FORMAT>'

Request the video device to use a specific pixel format. If the specified format is not supported, a list of available formats is given and the first one in this list is used instead. Available pixel formats are: monob, rgb555be, rgb555le, rgb565be, rgb565le, rgb24, bgr24, 0rgb, bgr0, 0bgr, rgb0, bgr48be, uyvy422, yuva444p, yuva444p16le, yuv444p, yuv422p16, yuv422p10, yuv444p10, yuv420p, nv12, yuyv422, gray

'-framerate'

Set the grabbing frame rate. Default is ntsc, corresponding to a frame rate of 30000/1001.

'-video_size'

Set the video frame size.

'-capture_cursor'

Capture the mouse pointer. Default is 0.

'-capture_mouse_clicks'

Capture the screen mouse clicks. Default is 0.