Raspberry Pi ffmpeg video4linux2, v4l2 mmap no such device

江枫思渺然 提交于 2019-12-24 07:58:08

问题


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

回答1:


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.



来源:https://stackoverflow.com/questions/48035955/raspberry-pi-ffmpeg-video4linux2-v4l2-mmap-no-such-device

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!