1

I am trying to stream with uv4l over v4l2rtspserver

This is what I do:

  1. Start /dev/video0
 $ uv4l -nopreview --auto-video_nr --driver raspicam --encoding h264
 [core] Trying to loading driver 'raspicam' from built-in drivers...
 [core] Loading driver 'raspicam' from external plug-in's...
 [driver] Dual Raspicam & TC358743 Video4Linux2 Driver v1.9.63 built Oct  6 2018
 [driver] Detected camera ov5647, 2592x1944
 [driver] Selected format: 1920x1080, encoding: h264, H264 Video Compression
 [driver] Framerate max. 30 fps
 [driver] H264 costant bitrate: 8000000
 [core] Device detected!
 [core] Registering device node /dev/video0
  1. Try to stream over v4l2rtspstream:
 $ sudo v4l2rtspserver /dev/video0 -r -W 1920 -H 1080 -F 30
log level:500

[NOTICE] /home/v4l2rtspserver/src/main.cpp:594
        Create V4L2 Source.../dev/video0
[NOTICE] src/V4l2Device.cpp:117
        driver:raspicam capabilities:5000001 mandatory:1000001
[NOTICE] src/V4l2Device.cpp:120
        /dev/video0 support capture
[NOTICE] src/V4l2Device.cpp:122
        /dev/video0 support read/write
[NOTICE] src/V4l2Device.cpp:123
        /dev/video0 support streaming
[NOTICE] src/V4l2Device.cpp:147
        /dev/video0:H264 size:1920x1080
[NOTICE] src/V4l2Device.cpp:229
        fps:1/30
[NOTICE] src/V4l2Device.cpp:230
        nbBuffer:5
[NOTICE] /home/v4l2rtspserver/src/main.cpp:617
        Create Source .../dev/video0
[NOTICE] /home/v4l2rtspserver/src/DeviceSource.cpp:93
        begin thread
[NOTICE] /home/v4l2rtspserver/src/main.cpp:150
        Play this stream using the URL "rtsp://ip:8554/unicast"
[NOTICE] /home/v4l2rtspserver/src/DeviceSource.cpp:202
        V4L2DeviceSource::getNextFrame errno:16 Device or resource busy
[ERROR] /home/v4l2rtspserver/src/DeviceSource.cpp:107
        error:Device or resource busy
[NOTICE] /home/v4l2rtspserver/src/DeviceSource.cpp:118

even if device is not busy it always shows

[ERROR] /home/v4l2rtspserver/src/DeviceSource.cpp:107 V4L2DeviceSource::getNextFrame errno:16 Device or resource busy

 $ sudo fuser /dev/video0 returns nothing...

I am already confused here and it seems I can't get it work normally. Any advice would be good. Thanks in advance.

1 Answer 1

1

It seems uv4l needs to preload its library (see https://www.linux-projects.org/documentation/uv4l-core/) Something like :

export LD_PRELOAD=/usr/lib/uv4l/uv4lext/armv6l/libuv4lext.so

An alternative is to use the standard raspicam v4l2 driver

sudo modprobe -v bcm2835-v4l2

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.