YARP
Yet Another Robot Platform
Example for ffmpeg_grabber (ffmpeg_grabber_basic)

Instantiates ffmpeg_grabber device implemented by FfmpegGrabber. More...

+ Collaboration diagram for Example for ffmpeg_grabber (ffmpeg_grabber_basic):

Instantiates ffmpeg_grabber device implemented by FfmpegGrabber.

# read from an avi file
device ffmpeg_grabber
source my.avi

If this text is saved in a file called ffmpeg_grabber_basic.ini then the device can be created by doing:

yarpdev --file ffmpeg_grabber_basic.ini

Of course, the configuration could be passed just as command line options, or as a yarp::os::Property object in a program:

Property p;
p.fromConfigFile("ffmpeg_grabber_basic.ini");
// of course you could construct the Property object on-the-fly
PolyDriver dev;
dev.open(p);
if (dev.isValid()) { /* use the device via view method */ }

Here is a list of properties checked when starting up a device based on this configuration file. Note that which properties are checked can depend on whether other properties are present. In some cases properties can also vary between operating systems. So this is just an example

PROPERTYDESCRIPTIONDEFAULT
device
sourcemedia file to read fromdefault.avi
loopmedia should loop (default)
noloopmedia should not loop
syncsync on image or audio (if have to choose)?image
nodelaymedia will play in simulated realtime unless this is present
pacesimulated realtime multiplier factor (must be <1 right now)1.0
v4lif present, read from video4linux
v4l1if present, read from video4linux
v4l2if present, read from video4linux2
ieee1394if present, read from firewire
See also
FfmpegGrabber