User avatar
bomblord
Posts: 266
Joined: Sun Jul 14, 2019 2:54 am

Display a live video of an attached USB camera in raspbian?

Fri Nov 08, 2019 5:34 pm

Hello all, sorry to be a bother today. I'm wondering what options there are to show a full-screen, live video from an attached USB camera?

I have Raspbian buster installed on a pi zero and a USB camera attached. After experimenting (succesfully) with using motioneyeos to stream the video I was wondering if there was a more straightforward solution that could be used by simply displaying the video feed directly on a monitor connected to a Pi instead of recruiting a second computer in order to view the video in a web browser.

To give an idea of my setup. A department at my place of employment is making a pseudo security camera to see who is at a door before letting them in (it's more of a nice to have not an actual security risk and is separate from our security camera system). There's a monitor on the inside of the door and a USB extension cable connected to a mounted USB camera outside the door. I had some pi zero's laying around from an old program that seemed perfect for the task. As mentioned I can successfully stream from the camera but it feels like it would be a lot easier just to plug the device into a monitor and display the webcam feed.

And herein lies the problem. The official raspbian documentation only seems to give options for saving video and or taking still shots. What I want to do is display a full screen live video feed of the attached webcam 24/7.

User avatar
Botspot
Posts: 1262
Joined: Thu Jan 17, 2019 9:47 pm
Location: Texas
Contact: Website

Re: Display a live video of an attached USB camera in raspbian?

Fri Nov 08, 2019 6:07 pm

Easy to display the output of a usb cam on the screen.

I prefer GUI tools, but there's likely a CLI way to do it...
I'm using latest Raspbian Buster.
  • VLC method: After opening VLC, select "Video Capture", then double click your camera.
    2019-11-08-114154_1280x1024_scrot.png
    2019-11-08-114154_1280x1024_scrot.png (44.99 KiB) Viewed 3598 times
  • You could also use Camorama, a webcam picture-taking tool. But it is not available in the Buster repositories yet. So you have to install the package manually.
    In a terminal:

    Code: Select all

    wget http://ftp.us.debian.org/debian/pool/main/c/camorama/camorama_0.19-5+b1_armhf.deb
    sudo dpkg -i camorama_0.19-5+b1_armhf.deb
    After installation, you can start camorama from the menu:
    Screenshot from 2019-11-08 11-56-42-min.png
    Screenshot from 2019-11-08 11-56-42-min.png (123.89 KiB) Viewed 3598 times
I've developed the most intuitive RaspiOS img editor on the planet.
With a GUI similar to Gparted, managing imgs and sd cards is a breeze!
Boot it in a VM, Flash from the Internet at top speed, Mount (to drop in files), Shrink/Expand, Repair, and more.
https://github.com/Botspot/Pi-Power-Tools
> 400 users! 8-)

User avatar
bomblord
Posts: 266
Joined: Sun Jul 14, 2019 2:54 am

Re: Display a live video of an attached USB camera in raspbian?

Fri Nov 08, 2019 6:16 pm

Botspot wrote:
Fri Nov 08, 2019 6:07 pm
Easy to display the output of a usb cam on the screen.

I prefer GUI tools, but there's likely a CLI way to do it...
I'm using latest Raspbian Buster.
  • VLC method: After opening VLC, select "Video Capture", then double click your camera.
    2019-11-08-114154_1280x1024_scrot.png
  • You could also use Camorama, a webcam picture-taking tool. But it is not available in the Buster repositories yet. So you have to install the package manually.
    In a terminal:

    Code: Select all

    wget http://ftp.us.debian.org/debian/pool/main/c/camorama/camorama_0.19-5+b1_armhf.deb
    sudo dpkg -i camorama_0.19-5+b1_armhf.deb
    After installation, you can start camorama from the menu:
    Screenshot from 2019-11-08 11-56-42-min.png
Hey, that did it thank you! Now I just need to figure out how to get it to do that at startup....

bls
Posts: 640
Joined: Mon Oct 22, 2018 11:25 pm
Location: Seattle, WA
Contact: Twitter

Re: Display a live video of an attached USB camera in raspbian?

Fri Nov 08, 2019 7:59 pm

bomblord wrote:
Fri Nov 08, 2019 6:16 pm

Hey, that did it thank you! Now I just need to figure out how to get it to do that at startup....
:lol: And that's why you need something with a command line. Looks like mplayer should do it.
Pi tools:
RPi SD Card Image Manager: https://github.com/gitbls/sdm
Lightweight Virtual VNC Config: https://github.com/gitbls/RPiVNCHowTo
Easy VPN installer/manager: https://github.com/gitbls/pistrong
DNS/DHCP manager:https://github.com/gitbls/ndm

User avatar
bomblord
Posts: 266
Joined: Sun Jul 14, 2019 2:54 am

Re: Display a live video of an attached USB camera in raspbian?

Fri Nov 08, 2019 8:13 pm

bls wrote:
Fri Nov 08, 2019 7:59 pm
bomblord wrote:
Fri Nov 08, 2019 6:16 pm

Hey, that did it thank you! Now I just need to figure out how to get it to do that at startup....
:lol: And that's why you need something with a command line. Looks like mplayer should do it.
I got it but I've run into a bug where anytime I launch vlc with the --fullscreen command it full screens for a second and then throws an illegal instruction error and crashes. Works fine if I don't fullscreen.

kaspbar
Posts: 11
Joined: Tue Nov 03, 2015 5:40 pm

Re: Display a live video of an attached USB camera in raspbian?

Sun Nov 24, 2019 3:42 pm

I have a similar issue with two old B+ types of raspberry pi.
I want to use cheap rear view car monitors attached to the analog composite video output to view the picture of an attached USB webcam.
The webcams sit outside my front and backdoor, while the pi and the monitor are on the inside next to the door.
I want the picture of the webcam appear on the monitor only upon trigger from the outside.
For this I have a PIR sensor on the outside as well as a door bell button which I also plan to feed to the PI.
The PI should then switch on the monitor only if there is a trigger.
In case I am not at home the PI should also store some event pictures like a surveillance cam.
Most projects found deal with streaming the data to a web server, but I am looking for a lower load solution for the given task.
I also read that VLC is quite load consuming, so can someone tell me more lightweight options?

alphanumeric
Posts: 2547
Joined: Tue Jan 19, 2016 2:17 pm
Location: Sydney, Nova Scotia, Canada

Re: Display a live video of an attached USB camera in raspbian?

Sun Nov 24, 2019 8:40 pm

Motion Eye OS will stream live video to a web browser over your local network. No having to go to the Internet first.
https://github.com/ccrisan/motioneyeos/wiki

kaspbar
Posts: 11
Joined: Tue Nov 03, 2015 5:40 pm

Re: Display a live video of an attached USB camera in raspbian?

Mon Nov 25, 2019 12:06 pm

As the TO I also want to show the video on a directly attached monitor (sdtv / FBAS in my case)
There is no need to stream to a network.
I want to see who is outside before I open the door and I want it directly at the door without the need of another device.

krunalramkar
Posts: 1
Joined: Tue Apr 28, 2020 5:46 pm

Re: Display a live video of an attached USB camera in raspbian?

Tue Apr 28, 2020 5:52 pm

Botspot wrote:
Fri Nov 08, 2019 6:07 pm
Easy to display the output of a usb cam on the screen.

I prefer GUI tools, but there's likely a CLI way to do it...
I'm using latest Raspbian Buster.
  • VLC method: After opening VLC, select "Video Capture", then double click your camera.
    2019-11-08-114154_1280x1024_scrot.png
  • You could also use Camorama, a webcam picture-taking tool. But it is not available in the Buster repositories yet. So you have to install the package manually.
    In a terminal:

    Code: Select all

    wget http://ftp.us.debian.org/debian/pool/main/c/camorama/camorama_0.19-5+b1_armhf.deb
    sudo dpkg -i camorama_0.19-5+b1_armhf.deb
    After installation, you can start camorama from the menu:
    Screenshot from 2019-11-08 11-56-42-min.png
Nice its works In vlc go to open capture device than click on play. Also this method is also helpful sudo apt-get install guvcview and than sudo apt --fix-broken install

Return to “General discussion”