FFmpeg AV capture¶
Register name used to load filter: ffavin
This filter may be automatically loaded during graph resolution.
Reads from audio/video capture devices using FFmpeg.
See FFmpeg documentation (https://ffmpeg.org/documentation.html) for more details.
To list all supported grabbers for your GPAC build, use gpac -h ffavin:*.
Device identification¶
Typical classes are dshow on windows, avfoundation on OSX, video4linux2 or x11grab on linux
Typical device name can be the webcam name:
FaceTime HD Cameraon OSX, device name on windows,/dev/video0on linuxscreen-capture-recorder, see http://screencapturer.sf.net/ on windowsCapture screen 0on OSX (0=first screen), orscreenNfor short- X display name (e.g.
:0.0) on linux
The general mapping from ffmpeg command line is:
Example
You may need to escape the dev option if the format uses ':' as separator, as is the case for AVFoundation:
Options¶
src (str): url of device, video://, audio:// or av://
fmt (str): name of device class. If not set, defaults to first device class
dev (str, default: 0): name of device or index of device
copy (enum, default: A): set copy mode of raw frames
- N: frames are only forwarded (shared memory, no copy)
- A: audio frames are copied, video frames are forwarded
- V: video frames are copied, audio frames are forwarded
- AV: all frames are copied
sclock (bool, default: false): use system clock (us) instead of device timestamp (for buggy devices)
probes (uint, default: 10, minmax: 0-100): probe a given number of video frames before emitting (this usually helps with bad timing of the first frames)
* (str): any possible options defined for AVInputFormat and AVFormatContext (see gpac -hx ffavin and gpac -hx ffavin:*)