I was having the same problem and the solution at
http://www.theoutpost.org/8-nslu2/open-devvideo0-device-or-resource-busy/ (EDIT: url updated) helped me.
$ fuser /dev/video0
$ ps axl | grep 1871
$ kill -9 1871
If your kernel uses modules (which is highly likely), one way to determine whether a program is accessing your webcam is to look at the usage count of the module:
$ lsmod | grep uvcvideo
uvcvideo 90112 0
The 0 in the third field shows that nothing has any device open for a uvcvideo-controlled webcam (when lsmod ran). Of course you need to ...
At least on my webcam, the v4l2-ctl -l command shows two settings related to white balance:
# v4l2-ctl -l
white_balance_temperature_auto (bool) : default=1 value=1
white_balance_temperature (int) : min=2800 max=6500 step=1 default=4000 value=4000 flags=inactive
I must set the white_balance_temperature_auto setting to 0 before ...
It is amazing how much documentation you can find for Video4Linux2 - and none of it actually explains what Video4Linux is.
First, Video4Linux2 is a Linux driver framework. Framework drivers don't actually control devices directly. Instead, they provide an abstract model of some class of device, in this case video devices for applications to use. Driver ...
The second device provides metadata about the video data from the first device. The new devices were introduced by this patch:
More information on the V4L metadata interface can be found here:
On any sane system, unless you have set up chroots with their own /dev, all device files are under /dev. Only root can create device files, so you don't need to worry about malicious users creating device files elsewhere.
So all you need to do is locate the files under /dev that refer to the same device as the one you're interested in.
ls -lR /dev |awk '/^...
There is loopback device for that:
Just add device with modprobe and stream to it with ffmpeg or gstreamer whatever video you want, or anything else for that matter:
The USB video class (UVC) is a specification to which USB webcams, etc., are supposed to conform. This way, they can be used on any system which implements support for UVC compliant devices.
V4L2 is the linux kernel video subsystem upon which the linux UVC implementation depends. In other words, in the kernel UVC support requires V4L2, but not the other ...
I have made a shell script for some basic video effects (using ffmpeg) on Linux webcams here: https://github.com/intermezzio/webcam-video-effects. You can add a foreground image (like a frame), add top and bottom meme text, or stream a prerecorded video to a webcam, and use a couple of other features. It's very fast because it's written 100% in the shell, ...
On the command line, you can set the uvcvideo driver's power line frequency setting to the 50 Hz value with:
If your webcam is not /dev/video0, add a -d /dev/videoN option with the correct number. The v4l2-ctl command comes in package v4l-utils, at least on Debian and related distributions.
Also, v4l2-ctl -L ...
Lines below create a loopback video device /dev/video5. After that ffmpeg is used to connect /dev/video0 to /dev/video5, but crop and hflip the stream on its way.
sudo apt-get install v4l2loopback-dkms
sudo modprobe v4l2loopback video_nr=5
ffmpeg -i /dev/video0 -f v4l2 -pix_fmt yuv420p -filter:v "hflip,crop=400:400:0:0" /dev/video5
Assuming that what you actually want is to make sure your webcam isn't being used when you don't want it to, the simplest solution is to simply disconnect it (if external) when not needed. Or covering the webcam (just a piece of duct tape would work).
Physically-based approaches are much more secure than software ones.
Only way I found to mount a camera which uses solely PTP, is to use gphotofs with Gphoto2:
sudo apt-get install gphoto2 gphotofs
fusermount -u /mnt/mountlocation
While most webcams don't have a physical shutter, they still have an electronic shutter. The effect of this electronic exposure control can be easily seen with qv4l2 or any other application that displays actual video capture frame rate: when a camera doesn't receive enough light, it lengthens exposure, and when exposure time (shutter speed) is greater than ...
It's by design. First, let it be said that multiple processes can open the /dev/video0 device, but only one of them will be able to issue certain controls (ioctl()) until streaming starts.
Those V4L2 controls define things like bitrate. After you start streaming, the kernel will not let you change them and returns EBUSY (Device or resource busy) if you try. ...
You might want to check out this Playmemories Alternative project. One outstanding developer has reverse-engineered the proprietary parts of Sony's modified PTP/IP protocol, and managed to get it working with a combination of a custom Python script & GPhoto2.
The way Sony transfers pictures is via PTP/IP (Picture Transfer Protocol over Internet ...
For some reason /dev/video* from Tsan-Kuang's answer didn't work for me. Here's another way you could reach your device: ls /dev/input/by-id/. For example:
$ fuser /dev/input/by-id/usb-Microsoft_Microsoft®_LifeCam_HD-5000-event-if00
I'm not sure you will like this answer, but, in my experience too, using PTP has always caused a high WTF/min. Presumably the camera itself restricts writing in the root folder, or something equally sensical.
I would suggest getting your hands on a CompactFlash reader, mounting the filesystem directly, and using that type of access to copy your firmware ...
I've got the rtsp streaming on '/dev/video1' working with the following command:
ffmpeg -i rtsp://admin:email@example.com:554/CH001.sdp -f v4l2 -pix_fmt yuv420p /dev/video1.
Thank you guys for the great support.
Copied this post on ask Ubuntu by gertvdijk, pointed out by mazs in the comments. In the effort of closing this question.
Based on this post on the Ubuntuforums by BkkBonanza.
This is an approach using PAM and will work for all failed login attempts. Using SSH, a virtual terminal or via the regular login screen, it doesn't matter as everything is handled ...
You might be able to do this as described here. Install and modprobe the v4l2loopback module (you may need to compile it) to create a new video device, then copy the webcam video stream to it via ffmpeg:
ffmpeg -f v4l2 -i /dev/video0 -vf transpose=1 -f v4l2 /dev/video1
From the sound of this blog post you can use the project shantz-locker.sh to do what you want.
shantz webcam autolocker
The post includes everything you need. The 2 pieces are the use of the motion application which is typically available in most repos such as Fedora and/or Ubuntu, and the shell script that's attached to the above article, shantz-webcam-...
Dependency search for libv4l-0:i386
$ aptitude why libv4l-0:i386
i ia32-libs Depends ia32-libs-multiarch
i A ia32-libs-multiarch:i386 Provides ia32-libs-multiarch
i A ia32-libs-multiarch:i386 Depends gstreamer0.10-plugins-good:i386
i A gstreamer0.10-plugins-good:i386 Depends libv4l-0:i386 (>= 0.5.0)
To get ...
You don't say what options you're using but I did find these 2 examples. Do these work for you?
ffmpeg -i <input_file> -vcodec mjpeg -qmin 1 -qmax 1 -o <output_file.avi>
ffmpeg -i <input_file> -vcodec mjpeg -qscale 1 <output_file.avi>
For the second example, I found a note that mentioned that the -qscale ... switch made a noticeable ...
Yes. The camera light will be on while the camera is in use. In this case, Motion is taking the feed and streaming it through the Motion web server. This happens whether or not people are connected to your stream.
Assuming you're only using Motion I would edit the motion.conf in order to add authentication for the stream and also enable logging (to see ...
Debian and many other Gnu/Linux distros use X11+Gnu+Linux.
The X11 server handles the screen/keyboard/mouse, your process is trying to connect to it, so that it can display stuff. This normally works without problem, but because you have changed user, it is having trouble authenticating. (There is security between user process and X11 display server, as it ...
Make the startup script do the cd before running mjpg_streamer, just like you're doing manually:
./mjpg_streamer -i "./input_raspicam.so -fps 5" -o "./output_http.so -p 8090"
This is assuming that your home directory is /home/geilisa.
You can't use ~ in the script since it's likely run by root. If running the ...
Playing with something like this at the moment, ran into some similar issues. Here's what I see:
It looks like this is going to take a picture for every motion detected on the camera. Not sure if you're aware - on RasPi I bump this up to 5.
I normally turn this off so that I can control from remote ...