ffmpegraspberry-pimmaplive-streamingvideo4linux

Raspberry Pi ffmpeg video4linux2, v4l2 mmap no such device


On my Raspberry pi I've installed ffmpeg. At the begin I type

uv4l --driver raspicam --auto-video_nr --width 640 --height 480 --encoding jpeg

to run driver. Then I check if devoce0 is registered:

ls -la /dev/video*

and it returns video0 so it is registered. Then I type command to run server:

ffmpeg -v verbose -r 5 -s 640x480 -f video4linux2 -i /dev/video0 http://localhost/webcam.ffm

and the camera lights up for a while and then turns off and I get error like bellow:

[video4linux2, v4l2] mmap: No such device /dev/video0: No such device

What I should do to resolve it? It looks like internal error one of these libraries.

This command works:

uv4l --driver raspicam --auto-video_nr --encoding h264 --width 640 --height 480 --enable-server on

Solution

  • Try adding the following line at the bottom of the file /etc/modules and rebooting your Raspberry Pi.

    bcm2835-v4l2
    

    Mine now looks like this in toto:

    # /etc/modules: kernel modules to load at boot time.
    #
    # This file contains the names of kernel modules that should be loaded
    # at boot time, one per line. Lines beginning with "#" are ignored.
    
    bcm2835-v4l2
    

    This ensures that the Broadcom Video For Linux 2 (v4l2) driver is loaded at all subsequent reboots.