Streaming
Virtual Video Device Output (v4l2loopback)
Added in version 3.60, Le Biniou 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 Le Biniou 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 named device video123
):
$ LEBINIOU_V4L2LOOPBACK=/dev/video123 lebiniou [other arguments] -o SDL2,v4l2loopback
or:
$ export LEBINIOU_V4L2LOOPBACK=/dev/video123
$ lebiniou [other arguments] -o SDL2,v4l2loopback
RTMP
You can do RTMP streaming using the
RTMP
output plugin. You need ffpmpeg
installed. For example, to run Le Biniou with the SDL2
and RTMP
plugins:
$ lebiniou [other arguments] -o SDL2,RTMP
To setup a stream:
- Set up Nginx to have RTMP streaming enabled like explained here
- Start Le Biniou
- 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://stream.example.com/live/myStream?psk=myKey" 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!