User Tools

Site Tools


Virtual video device output (v4l2loopback) / RTMP streaming


Added in version 3.60, lebiniou can act as a video output device thanks to v4l2loopback.

See v4l2loopback for setup, then use the v4l2loopback output plugin to stream to any video software that supports V4L2 (for example OBS):

Make sure the v4l2loopback kernel module is loaded:

sudo modprobe v4l2loopback

Then list the available loopback devices lebiniou can use:

ls -1 /sys/devices/virtual/video4linux

The default is to stream to /dev/video2, so if it is in the command output you're good to go:

$ lebiniou [other arguments] -o SDL2,v4l2loopback

Else you need to use one of the other available loopback devices using an environment variable (example with a video123 named device):

$ LEBINIOU_V4L2LOOPBACK=/dev/video123 lebiniou [other arguments] -o SDL2,v4l2loopback


$ export LEBINIOU_V4L2LOOPBACK=/dev/video123
$ lebiniou [other arguments] -o SDL2,v4l2loopback


You can do RTMP streaming using the RTMP output plugin. You need ffpmpeg installed. For example, to run lebiniou with the SDL2 and RTMP plugins:

$ lebiniou [other arguments] -o SDL2,RTMP
  1. Set up Nginx to have RTMP streaming enabled like explained here
  2. Start Le Biniou
  3. Display the stream using e.g. vlc: connect to rtmp://localhost/live/stream?psk=key

You can change the stream URL by setting the LEBINIOU_RTMP_URL environment variable, like this:

LEBINIOU_RTMP_URL="rtmp://" lebiniou [other arguments] -o SDL2,RTMP

Encoding is done using ffmpeg, with these arguments:

-loglevel quiet -re -vcodec ppm -f image2pipe -i pipe: -c:v libx264 -b:v 5M -pix_fmt yuv420p -c:a:0 libfdk_aac -b:a:0 480k -f flv

This can be changed by setting the RTMP_FFMPEG_ARGS environment variable. Feel free to tell us if you find something better !

en/rtmp-streaming.txt · Last modified: 2022/09/25 14:48 by opale95