Create a gist now

Instantly share code, notes, and snippets.

@jadonk /README.md
Last active May 10, 2017

What would you like to do?
Installing mjpg-streamer
#!/bin/bash
cat /etc/dogtag
# BeagleBoard.org Debian Image 2017-01-17
uname -a
# Linux blue-dc5d 4.4.41-ti-r83 #1 SMP Tue Jan 17 00:01:19 UTC 2017 armv7l GNU/Linux
lsusb
# Bus 001 Device 002: ID 046d:0825 Logitech, Inc. Webcam C270
# Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
v4l2-ctl --info
# Driver Info (not using libv4l2):
# Driver name : uvcvideo
# Card type : UVC Camera (046d:0825)
# Bus info : usb-musb-hdrc.1.auto-1
# Driver version: 4.4.41
# Capabilities : 0x84200001
# Video Capture
# Streaming
# Extended Pix Format
# Device Capabilities
# Device Caps : 0x04200001
# Video Capture
# Streaming
# Extended Pix Format
#apt-get install -y libv4l-dev libjpeg-dev imagemagick subversion
#svn co https://svn.code.sf.net/p/mjpg-streamer/code/mjpg-streamer mjpg-streamer
# SVN_REV="3:172"
#cd mjpg-streamer
#make
#./mjpg_streamer ./mjpg_streamer -i "./input_uvc.so -yuv" -o "./output_http.so -p 8090 -w ./www"
#make install
#mjpg_streamer -i "/usr/local/lib/input_uvc.so -yuv" -o "/usr/local/lib/output_http.so -p 8090 -w /usr/local/www"
apt-get update
# Hit http://security.debian.org jessie/updates InRelease
# Hit http://repos.rcn-ee.com jessie InRelease
# Hit https://deb.nodesource.com jessie InRelease
# Ign http://httpredir.debian.org jessie InRelease
# Get:1 http://security.debian.org jessie/updates/main armhf Packages [425 kB]
# Hit http://httpredir.debian.org jessie-updates InRelease
# Get:2 http://repos.rcn-ee.com jessie/main armhf Packages [771 kB]
# Hit http://httpredir.debian.org jessie Release.gpg
# Get:3 https://deb.nodesource.com jessie/main armhf Packages [968 B]
# Hit http://httpredir.debian.org jessie Release
# Get:4 http://security.debian.org jessie/updates/contrib armhf Packages [994 B]
# Get:5 http://security.debian.org jessie/updates/non-free armhf Packages [20 B]
# Get:6 http://httpredir.debian.org jessie-updates/main armhf Packages [17.6 kB]
# Get:7 http://httpredir.debian.org jessie-updates/contrib armhf Packages [20 B]
# Get:8 http://httpredir.debian.org jessie-updates/non-free armhf Packages [450 B]
# Get:9 http://httpredir.debian.org jessie/main armhf Packages [8,850 kB]
# Get:10 http://httpredir.debian.org jessie/contrib armhf Packages [44.7 kB]
# Get:11 http://httpredir.debian.org jessie/non-free armhf Packages [74.9 kB]
# Fetched 10.2 MB in 19s (519 kB/s)
# Reading package lists... Done
apt-get install -y mjpg-streamer
install -m 644 51a4d83c8180e259bcb5661002712166/mjpg-streamer.rules /etc/udev/rules.d
install -m 644 51a4d83c8180e259bcb5661002712166/mjpg-streamer.service /etc/systemd/system
systemctl restart mjpg-streamer
KERNEL=="event*", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="0825",\
TAG+="systemd", ENV{SYSTEMD_WANTS}="mjpg-streamer.service"
KERNEL=="event*", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="082d",\
TAG+="systemd", ENV{SYSTEMD_WANTS}="mjpg-streamer.service"
KERNEL=="event*", ATTRS{idVendor}=="0c45", ATTRS{idProduct}=="62e0",\
TAG+="systemd", ENV{SYSTEMD_WANTS}="mjpg-streamer.service"
[Unit]
Description=Webcam Video Streaming
Requires=dev-video0.device
BindsTo=dev-video0.device
[Service]
#ExecStart=/usr/local/bin/mjpg_streamer -i "/usr/local/lib/input_uvc.so -yuv" -o "/usr/local/lib/output_http.so -p 8090 -w /usr/local/www"
ExecStart=/usr/bin/mjpg_streamer -i "/usr/lib/mjpg-streamer/input_uvc.so" -o "/usr/lib/mjpg-streamer/output_http.so -p 8090 -w /usr/share/mjpg-streamer/www"

I've merged this into the boot script repo:

voodoo@hades:/opt/github/boot-scripts/tools/software/mjpg-streamer$

and cleaned up a few things..
https://github.com/RobertCNelson/boot-scripts/tree/master/tools/software/mjpg-streamer

(internet access wont be required on the iot/lxqt images)

Regards,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment