Imaging solutions with Free Software &
Open Hardware

Who's online

There are currently 0 users online.

AVLD - Another Video Loopback Device

From ElphelWiki

AVLD is a video loopback device for GNU-Linux, written by Pierre Parent and licensed under GPL.

With AVLD you can use Elphel cameras for image acquisition in v4l (version 1) compatible applications, video conferencing, etc

Video is playing smoothly on a 2.4Ghz dual core notebook at 25fps in 1440x896,

and CPU usage is 'only' 20-25% per core

I could not test beyond the screen and the specific camera/sensor capabilities :)

Accessing Elphel camera streams through a v4l device (eg: /dev/video0)

After loading the AVLD module:

modprobe avld width=1440 height=896 fps=0

You just have to feed the video device:

mencoder rtsp:// -nosound -ovc raw -vf format=bgr24 -of rawvideo -o /dev/video0

(or /dev/video1 if you had already another video device driver loaded before)

And you can play the stream for testing:

mplayer tv:// -tv driver=v4l:device=/dev/video0:outfmt=rgb24 -cache 8192 -vo xv

You can change the device parameters when module is already loaded with:

echo "width=800 height=600 fps=0" > /dev/video0

Helper scripts

Note: To run those scripts you must patch avld/video_driver.c and rebuild the module before, using the patches found on the section below.

For skype, use avlfeed options WIDTH=640 HEIGHT=480 FPS=25 FORMAT=uyvy FILTER="scale=640:480", but generally FORMAT is bgr24

Usage: avldfeed [ -h ] [ <configuration_file> ] [ <OPTION=value> ... ]


      PALETTE=<0|1> (overriden by FORMAT)

avldfeed send the specified video stream to the avld video device.

Previous parameters are saved in /home/guest/.avldfeed so that you can
run the command again with no parameters or a subset, or with a
configuration file as first command argument (it will
replace /home/guest/.avldfeed)

avld-0.13 patches

(apply with "patch -P0 < filename.patch" in the avld sourcecode directory)

Opencv v4l capture initialization method was receiving a null frame size when it was run before watching once the stream with mplayer which is using an alternative initialization method.

I found a patch for skype compatibility on

And I did add "palette" to the list of the avld module expected arguments.

It breaks compatibility with applications using an older module version since "palette=0|1" MUST be specified with the other parameters when loading the module or when changing the parameters writing to the video device. But it avoid scanning twice the video buffer and remove the necessity to unload the module when the palette must be changed.

AVLD homepage: