RpiName
Posts: 716
Joined: Sat Jul 06, 2013 3:14 am

Re: Video4Linux2 driver ready!

Wed Dec 24, 2014 1:48 am

To use motion in daemon mode, load the driver with --extension-presence=true or permanently add this option to /etc/uv4l.conf and restart the driver or reboot.

KaiK
Posts: 2
Joined: Tue Dec 23, 2014 4:48 pm

Re: Video4Linux2 driver ready!

Wed Dec 24, 2014 7:09 am

Hi,

yeah. that did the job. Thanks!

We have to add

Code: Select all

export LD_PRELOAD=/usr/lib/uv4l/uv4lext/armv6l/libuv4lext.so
in the first line of /etc/init.d/motion (before name=...)

and add

Code: Select all

extension-presence = 1
in the last line of /etc/uv4l/uv4l-raspicam.conf (which is the config of the uv4l driver)

Regards
Kai

pumpkinpi
Posts: 141
Joined: Fri Apr 18, 2014 7:11 pm

Re: Video4Linux2 driver ready!

Wed Mar 04, 2015 3:02 am

Ok. I am stumped. Not sure what has changed in my setup. I am sure it is something simple. Running 'motion' for security with built in Noir cameras. I am now getting the grey screens on my video streams that say "Unable to open video device". One computer is a RPi2 (new) and the other is a RPiB+. Both are fully updated (which was recently done).

Now, the RPiB+ ALSO analyzes the video stream from a network camera. This stream works correctly and motion is identified. This tells me the driver is working and loading it is just having difficulty with the /dev/video0 device.

I start motion from a python script at certain times and this has worked well for months. This is the command I use to run it from python:

Code: Select all

os.popen('/usr/bin/sudo LD_PRELOAD=/usr/lib/uv4l/uv4lext/armv6l/libuv4lext.so motion -c /etc/motion/motion.conf')
Seems to start as it used to. The driver doesn't seem to have access to the local cameras.

Any help?

pumpkinpi

RpiName
Posts: 716
Joined: Sat Jul 06, 2013 3:14 am

Re: Video4Linux2 driver ready!

Wed Mar 04, 2015 9:44 am

pumpkinpi wrote: Any help?
pumpkinpi
Try to load the driver with --extension-presence=1 command line option or put the option in the config file.

pumpkinpi
Posts: 141
Joined: Fri Apr 18, 2014 7:11 pm

Re: Video4Linux2 driver ready!

Wed Mar 04, 2015 12:47 pm

So, I placed the last line here:

Code: Select all

# imgfx = none
# metering = average
# rotation = 0
# hflip = no
# vflip = no
# shutter-speed = 0
# drc = off
extension-presence=1
in /etc/uv4l/uv4l-raspicam.conf.

And it works!

Thanks,
pumpkinpi

pumpkinpi
Posts: 141
Joined: Fri Apr 18, 2014 7:11 pm

Re: Video4Linux2 driver ready!

Tue Mar 10, 2015 11:56 pm

Ok, I have a minor issue here and I am not sure if it is related to above. Basically, whenever I start motion, it is now starting motion twice (two threads). This is what I see:

Code: Select all

[23410504] Processing thread 0 - config file /etc/motion/motion.conf
[23410504] Processing config file /etc/motion/thread1.conf
[23410504] Processing config file /etc/motion/thread2.conf
[23410504] Processing config file /etc/motion/thread1.conf
[23410504] Processing config file /etc/motion/thread2.conf
[23410504] Motion 3.2.12 Started
[23410504] Motion going to daemon mode
I am initiating it from a python script command:

Code: Select all

os.popen('/usr/bin/sudo LD_PRELOAD=/usr/lib/uv4l/uv4lext/armv6l/libuv4lext.so motion -c /etc/motion/motion.conf')
Everything in my motion setup has remained the same. I changed that uv4l-raspicam.conf setting above. Is this a motion issue?

Thanks,
pumpkinpi

RpiName
Posts: 716
Joined: Sat Jul 06, 2013 3:14 am

Re: Video4Linux2 driver ready!

Wed Mar 11, 2015 8:16 am

pumpkinpi wrote:This is what I see:

Code: Select all

[23410504] Processing thread 0 - config file /etc/motion/motion.conf
[23410504] Processing config file /etc/motion/thread1.conf
[23410504] Processing config file /etc/motion/thread2.conf
[23410504] Processing config file /etc/motion/thread1.conf
[23410504] Processing config file /etc/motion/thread2.conf
[23410504] Motion 3.2.12 Started
[23410504] Motion going to daemon mode
I am initiating it from a python script command:

Code: Select all

[/quote]

UV4L has nothing to do with the above output. Motion does not appear to be started twice though..IMHO

pumpkinpi
Posts: 141
Joined: Fri Apr 18, 2014 7:11 pm

Re: Video4Linux2 driver ready!

Wed Mar 11, 2015 10:54 am

Thanks. That is what I suspected but wanted to check.

Pp

pantipkak
Posts: 14
Joined: Tue Dec 23, 2014 8:09 am

Re: Video4Linux2 driver ready!

Wed Mar 25, 2015 5:24 am

Will it work on Rpi2

pumpkinpi
Posts: 141
Joined: Fri Apr 18, 2014 7:11 pm

Re: Video4Linux2 driver ready!

Wed Mar 25, 2015 11:09 am

Yes, for sure.

superrei
Posts: 16
Joined: Tue Mar 10, 2015 8:45 am

Re: Video4Linux2 driver ready!

Thu Mar 26, 2015 7:17 am

Hi,

Mainly I have no problem on installation and getting WebRCT working. But I have 2 problems:
  1. When I start playing the media stream with the browser in my Android phone, only a still frame can be display, but it works fine on my desktop computer.
  2. I cannot change the resolution and format with the camera control page. After I clicked on the "Apply" button. I go to the home page and open the Camera Control page again. Values in the 3 fields will fall back. Staying at 640 x 480, YUV 4:2:0.

RpiName
Posts: 716
Joined: Sat Jul 06, 2013 3:14 am

Re: Video4Linux2 driver ready!

Thu Mar 26, 2015 9:20 am

superrei wrote: [*]When I start playing the media stream with the browser in my Android phone, only a still frame can be display, but it works fine on my desktop computer.
Have you tried with a recent version of Chrome for Android?
superrei wrote: [*]I cannot change the resolution and format with the camera control page. After I clicked on the "Apply" button. I go to the home page and open the Camera Control page again. Values in the 3 fields will fall back. Staying at 640 x 480, YUV 4:2:0.[/list]
Only the default 640x480 is possible at the moment. Resolution setting (and Audio) with WebRTC are work-in-progress.

RpiName
Posts: 716
Joined: Sat Jul 06, 2013 3:14 am

Re: Video4Linux2 driver ready!

Thu Mar 26, 2015 10:09 am

superrei wrote: When I start playing the media stream with the browser in my Android phone, only a still frame can be display, but it works fine on my desktop computer.
Update:
It looks like the video element in the page requires the autoplay attribute to be set:
Try this test page (update the signalling server address to the correct one (your Rpi host)):

http://www.linux-projects.org/downloads ... ample.html

superrei
Posts: 16
Joined: Tue Mar 10, 2015 8:45 am

Re: Video4Linux2 driver ready!

Thu Mar 26, 2015 12:28 pm

RpiName wrote:
Update:
It looks like the video element in the page requires the autoplay attribute to be set:
Try this test page (update the signalling server address to the correct one (your Rpi host)):

http://www.linux-projects.org/downloads ... ample.html
It works!! I think WebRTC should change this in their package. Thanks.

RpiName
Posts: 716
Joined: Sat Jul 06, 2013 3:14 am

Re: Video4Linux2 driver ready!

Fri Mar 27, 2015 8:54 pm

superrei wrote:It works!! I think WebRTC should change this in their package.
It has been fixed. Please update.

User avatar
shervinemami
Posts: 2
Joined: Sat Mar 28, 2015 3:54 am
Contact: Website

Re: Video4Linux2 driver ready!

Sat Mar 28, 2015 4:20 am

Hi RpiName,

Is the source code of the UV4L Raspberry Pi Camera driver available? UV4L-Raspicam sounds quite impressive, particularly the LBP face detection @15 FPS. I have a background in computer vision optimization and have been using OpenCV for more than 12 years now, so I'm interested in possibly contributing code to UV4L and improving the interoperability with OpenCV & dlib on Raspberry Pi 1, 2 and ODROID-W.

Cheers,
Shervin Emami
http://www.shervinemami.info/

mencey
Posts: 15
Joined: Sun Jun 17, 2012 6:09 pm

Re: Video4Linux2 driver ready!

Wed Apr 08, 2015 9:59 am

Please, I installed opencv and driver uv4l for raspica and everything works correctly, the problem that I have is that if I include in the code the library GPIO and try to operate any GPIO gives me error not being superuser but if I run as superuser not work for me uv4l driver gives me error the client can not connect to the server. Is there any way to make the user pi GPIO can manage without su.
thank you

Posts: 1
Joined: Sun Jun 17, 2012 6:09 pm

RpiName
Posts: 716
Joined: Sat Jul 06, 2013 3:14 am

Re: Video4Linux2 driver ready!

Wed Apr 08, 2015 12:02 pm

mencey wrote:but if I run as superuser not work for me uv4l driver gives me error the client can not connect to the server. Is there any way to make the user pi GPIO can manage without su.
UV4L has nothing to do with the GPIOs. I suggest that you check the permissions on the device nodes that your GPIO library is using.

saucompeng
Posts: 8
Joined: Sat Jun 06, 2015 10:40 pm
Location: Manlius,NY
Contact: Website

Re: Video4Linux2 driver ready!

Sat Jun 06, 2015 10:45 pm

Hi everyone;

I want to capture an image with raspberry pi camera module. I can this. But I want to trigger then It must capture at that time. No waiting I want. It can wait for saving but It must catch trigger time's photo.

What is the commands or code for this ?

PJesse
Posts: 1
Joined: Sat Jul 04, 2015 12:12 am

Re: Video4Linux2 driver ready!

Tue Sep 01, 2015 4:12 am

saucompeng wrote:Hi everyone;

I want to capture an image with raspberry pi camera module. I can this. But I want to trigger then It must capture at that time. No waiting I want. It can wait for saving but It must catch trigger time's photo.

What is the commands or code for this ?
What are you doing to capture an image now and what is this 'trigger' you want to use? You mean like a push button on a camera? Or some kind of SW trigger like a udp message?

It sounds like you may want to ask how to use GPIO, and try to tailor your question with how you are currently doing the capture.

Zombievirus
Posts: 19
Joined: Sun Sep 20, 2015 5:44 am

Re: Video4Linux2 driver ready!

Mon Oct 19, 2015 9:34 pm

Hi,

Is there a way to set the Livestream in the web interface to 1024 x 576 permanently?

With Control Panel it's only temporary. after a reboot the livestream is back to full resolution.

I want to embed the stream into another webpage and i need it there with 1024 x 576 input resolution without width and height tags for image!

i tried changing the preview parameters in the uv4l-raspicam.conf file but that didn't help...

Please help. Thanks

RpiName
Posts: 716
Joined: Sat Jul 06, 2013 3:14 am

Re: Video4Linux2 driver ready!

Tue Oct 20, 2015 1:19 am

Zombievirus wrote:Is there a way to set the Livestream in the web interface to 1024 x 576 permanently?
edit

Code: Select all

/etc/uv4l/uv4l-raspicam.conf
and modify width and height as you need:

Code: Select all

##################################
# raspicam driver options
##################################

encoding = mjpeg
width = 1024
height = 576
framerate = 30
#custom-sensor-config = 2
#etc..

### To enable the 'config' user authentication
# server-option = --config-password=myp4ssw0rd
#etc..
Zombievirus wrote: With Control Panel it's only temporary. after a reboot the livestream is back to full resolution.
You can edit/change the configuration file from the Web Interface (provided that you manually enabled the 'config' user authentication in the configuration file itself - see the above options)
Zombievirus wrote: I want to embed the stream into another webpage and i need it there with 1024 x 576 input resolution without width and height tags for image!
See this example for the right URL for raw stream:
http://www.linux-projects.org/modules/s ... #example11
Zombievirus wrote: i tried changing the preview parameters in the uv4l-raspicam.conf file but that didn't help...
The preview window is used for overlying the camera output onto the display. It has nothing to do with what you want to do.

Zombievirus
Posts: 19
Joined: Sun Sep 20, 2015 5:44 am

Re: Video4Linux2 driver ready!

Tue Oct 20, 2015 3:20 am

Thank You very much!

It works now. I modified the .conf file and rebooted to confirm the success.

i have currently embedded the mjpeg stream in the webpage and it is working.

I tried doing it with the raw h264 address but it didn't work.

i tried these 2 things:

Code: Select all

<embed type="application/x-vlc-plugin" pluginspage="http://www.videolan.org" target="http://192.168.1.147:8080/stream/video.h264 --demux h264 " />

<embed type="application/x-vlc-plugin" pluginspage="http://www.videolan.org" target="http://192.168.1.147:8080/stream/video.h264 " />
both didn't work.

Is h264 better suited that mjpeg for a livestream without audio?

This is what it looks like currently:

Code: Select all

<img style="margin:0px auto;display:block" src="http://192.168.1.147:8080/stream/video.mjpeg" alt="Live Stream"> 
Regards

RpiName
Posts: 716
Joined: Sat Jul 06, 2013 3:14 am

Re: Video4Linux2 driver ready!

Tue Oct 20, 2015 10:14 am

Zombievirus wrote: I tried doing it with the raw h264 address but it didn't work.

i tried these 2 things:

Code: Select all

<embed type="application/x-vlc-plugin" pluginspage="http://www.videolan.org" target="http://192.168.1.147:8080/stream/video.h264 --demux h264 " />

<embed type="application/x-vlc-plugin" pluginspage="http://www.videolan.org" target="http://192.168.1.147:8080/stream/video.h264 " />
both didn't work.
I do not know, I have never used the <embed> tag.
Zombievirus wrote: Is h264 better suited that mjpeg for a livestream without audio?
I'd use the native WebRTC support in UV4L instead, which is more standard.

Zombievirus
Posts: 19
Joined: Sun Sep 20, 2015 5:44 am

Re: Video4Linux2 driver ready!

Tue Oct 20, 2015 11:28 am

Hi,

So i am trying to get WebRTC to work. The uv4l-webrtc package was already installed. I enabled all of this in the .conf file:

Code: Select all

### WebRTC options:
 server-option = --enable-webrtc=yes
 server-option = --enable-webrtc-video=yes
 server-option = --enable-webrtc-audio=yes
 server-option = --webrtc-receive-audio=yes
 server-option = --webrtc-received-audio-volume=5.0
 server-option = --webrtc-vad=yes
 server-option = --webrtc-cpu-overuse-detection=no
 server-option = --webrtc-stun-urls=stun:stun.l.google.com:19302
 server-option = --webrtc-stun-server=yes
 server-option = --webrtc-tcp-candidate-policy=yes
 server-option = --webrtc-ignore-loopback=yes
Then i took http://www.linux-projects.org/downloads ... ample.html and changed the IP in the source to 192.168.1.147:3478 as this is the address of my pi where everything is running.

then i changed the signalling address to 192.168.1.147:8080. Hit Start. Didn't work. Tried the ip of my computer from which i was accessing the stream. still didn't work.

It's telling me an error has occured. i checked the apache logs but couldn't see any errors there. i couldn't find a uv4l error log.

WebRTC doesn't really seem to be the thing i am looking for as it establishes a peer to peer connection and an ip address must be typed in. or am i misunderstanding something here?

The Webpage i am working on has a login. So whoever is logged in can access the stream. The login system works with php sessions. Multiple peers one server. No Ip MUST be known. you click on live stream and it's there.

Return to “Camera board”