Showing posts with label webcam. Show all posts
Showing posts with label webcam. Show all posts

Wednesday, June 5, 2019

Raspberry Pi zero video notes




Mpeg video

MJPG Streamer

To run the camera stream from a USB webcam we'll make use of the package mjpg-streamer. Before we can install this we'll need to install a few dependencies first.
sudo apt-get update
sudo apt-get install libjpeg8-dev imagemagick libv4l-dev uvcdynctrl git cmake -y
After installing the dependencies, run the following commands to install mjpg-streamer.
git clone https://github.com/jacksonliam/mjpg-streamer.git
cd mjpg-streamer/mjpg-streamer-experimental
make USE_LIBV4L2=true clean all
sudo make install
sudo usermod -aG video pi
sudo modprobe bcm2835-v4l2
cd ../../
rm -rf mjpg-streamer
Start the camera livestream by running the following command.
mjpg_streamer -i 'input_uvc.so --device /dev/video0 --fps 30 --resolution VGA --quality 65' -o 'output_http.so'
If you followed all above instructions and everything went ok, you should now be able to see the stream when browsing to http://your-raspberry-pi.local:8080?action=stream. After you verified the stream is working, cancel by running ctrl+c and move on to the next section.

https://wouterdeschuyter.be/blog/how-to-create-a-15-dollar-web-controllable-camera-with-a-raspberry-pi-zero


--30--

Sunday, October 2, 2016

Viewing Foscam FI9803P stream with VLC



Use VLC stream viewing to view cameras:  how to construct URLs

Model FI9803P camera

http://foscam.us/media/mconnect_uploadfiles/f/i/fi9803p%20user%20manual.pdf

2.4 Using the VLC player This camera supports RTSP streaming, here you can
view the camera using VLC player.
RTSP URL
rtsp:// [user name][:password]@IP: RTSP port number/videosream

The part in the square bracket s may be omitted.  user name & password:
The user name and password to access the camera.
This part can be omitted.
IP: WAN or LAN IP address.
Videostream: Here support some mode .
When the network speed is bad, here you had better select videoSub.
For example: IP: 192.168.1.11
RTSP Port number : 554
User name : admin
Password : 123
Here I can enter one of the following URLs in the VLC.
1) rtsp://admin: 123 @192.168.1.11: 554 /videoMain
2) rtsp:// @192.168.1.11: 554 /videoMain
3) rtsp://: 123 @192.168.1.11: 554 /videoMain
4) rtsp://admin@192.168.1.11: 554 /videoMain

Open the VLC, and go to Media  Open Network Stream option, then enter the
URL into VLC

Shortcuts:

Create windows shortcut by copying the VLC shortcut, and add it to the "target:" field
of the shortcut

On linux create a shortcut on the desktop by whatever means and add the rstp URL
to the target address as well.

xx

Thursday, May 12, 2016

adding webcam string to ipfire

This is useful as it contains examples useful in bringing up a webcam server, as well as uploading info to dropbox.

Also demonstrates adding to pakfire (ipfire module)


https://ict.ken.be/add-webcam-stream-to-ipfire


Things to remember
  • Ipfire default web interface is on http port 81 or https port 444
  • Add .1 to version in /opt/pakfire/etc/pakfire.conf and do pakfire update --force so you can install addons from testing branch
  • Use pakfire to install motion
  • Motion by default streams on port 2500, but you can set this in /etc/motion.conf
  • Needed to add a video user and video group
  • The boot file /etc/init.d/motion needs some adjustments to allow starting motion at boot time
  • Set firewall rule correct to forward the port: From any to firewall red for tcp on port 2500 for webcam
Posts that helped me on the way
Adjustments to motion configuration
/etc/motion.conf
mkdir -p /var/motion/cam1
chown -R video: /var/motion/cam1
mkdir -p /var/run/motion/
chown video:video /var/run/motion/
chmod 755 /var/run/motion/
loadproc sudo -u video /usr/bin/motion
Move snapshots to dropbox
/etc/motion.conf
on_picture_save /etc/init.d/dropbox/up-snapshot.sh %f %Y%m%d %H%M%S
up-snapshot.sh
/etc/init.d/dropbox/du.sh upload $1 cam1/$2/$2-$3-snapshot.jpg && rm -f $1
Sync dropbox to main website on ipfire
sync.sh
rm -rf /srv/web/localhost/html/
/etc/init.d/dropbox/du.sh download html/ /src/web/localhost/
find /srv/web/localhost/html -type f -exec chmod 644 {} \;
find /srv/web/localhost/html -type d -exec chmod 755 {} \;