[LINUX][Fedora41] Issues playing mkv files?

And after some time installing a lot of codecs and VLC still giving me the "could not play hevc H.265" this simple finding solved ...

martes, 28 de marzo de 2023

How to create a Photo-Log or Timelapse with a simple raspberry and an usb webcam

As the title may suggest... Started with a bit of scripting, had a Raspberry pi 3b+ lying around and decided to use it for some time-passing productive activity so I just attached it to a Microsoft LifeCam HD-3000 I had unused, fresh raspbian installed on the SD card and SSH enabled through the raspi-config.

In Summary we used:
  1. Raspberry Pi 3b+
  2. Raspberry power supply
  3. Sandisk microSD card 16gb with raspbian installed on it
  4. usb webcam

So we create the following bash script which I named autoshot.sh I used NANO editor to create this (sudo nano autoshot.sh), script content as follows:

 #!/bin/bash
echo off
DATE=$(date +"%Y-%m-%d")
COUNT=1

while [ $COUNT -le 120 ]
do
        echo Photo: $COUNT
        TIME=$(date +"%H%M%S")
        fswebcam -r 1024x768 -S 10 /home/pi/PROJ/webcam/photos/$DATE-$COUNT-$TIME.jpg
        sleep 30s
        ((COUNT++))
done

And we run as follows and get the following result as well:

pi@raspberrypi:~/PROJ/webcam $ ./autoshot.sh
off
Photo: 1
--- Opening /dev/video0...
Trying source module v4l2...
/dev/video0 opened.
No input was specified, using the first.
Adjusting resolution from 1024x768 to 1280x720.
--- Capturing frame...
Skipping 10 frames...
Capturing 1 frames...
Captured 11 frames in 0.33 seconds. (33 fps)
--- Processing captured image...
Writing JPEG image to '/home/pi/PROJ/webcam/photos/2021-04-05-1-180416.jpg'.
Photo: 2
--- Opening /dev/video0...
Trying source module v4l2...
/dev/video0 opened.
No input was specified, using the first.
Adjusting resolution from 1024x768 to 1280x720.
--- Capturing frame...
Skipping 10 frames...
Capturing 1 frames...
Captured 11 frames in 0.33 seconds. (33 fps)
--- Processing captured image...
Writing JPEG image to '/home/pi/PROJ/webcam/photos/2021-04-05-2-180447.jpg'.

Then we just need to either use the raspbian GUI or setup a samba shared folder on the raspberry to grab the photos from a windows machine, for example.

No hay comentarios:

Publicar un comentario