If you’re trying to shrink a video by half along the lines of this, you may encounter an error about “width not divisible by 2” during processing, or you just might get an empty mp4 file: The problem happens when you get interesting video dimensions, such as a vertical video that might be 1080 wide […]
Category: Linux
Sending Motion & Door open/close events to Slack using Node-RED
This technique uses the following Hardware: Sonoff RF Bridge ($14) RaspberryPi Zero W ($10) + SD Card 433MHz open/close magnetic sensor ($6) 433MHz PIR sensor ($5) Micro USB cables (to power Sonoff + Raspberry Pi) USB to Serial adaptor (to flash Tasmota software onto the Sonoff) And the following free and/or open source Software: Tasmota […]
Linux: Monitor what is using your webcam
If your curious what programs are attempting to read your Linux webcam then it’s possible to use the auditctl and ausearch tools to see what process is using the webcam. First install the auditd package: sudo apt-get install auditd Then run auditctl to start monitoring the /dev/video0 device for access: sudo /sbin/auditctl -w /dev/video0 -p […]
Fix “orphan image” in unraid docker
This can happen if you’re manually messing around with the location of docker configuration files on the hard drives. If the orphan image is from a Community Applications installed docker image, simply follow these steps: Go to the App menu Choose Previous Apps on the left hand side Click the reinstall icon on the app […]
How to replace drives on unraid
After falling in love with unraid I wanted to improve my test install with new larger hard drives. I had 100GB of docker related files that I wanted to keep spread across 3 old data drives + 1 parity drive. In the below process I consolidate the 100GB into a single drive, install the new […]
Grab video meta data from an archive of video files on S3
I had thousands of video files on an S3 bucket, but no record of their file sizes or video meta details ( resolution, encoding, container, etc..) This quick little bash script will use ffprobe to read the meta details from the S3 file without downloading the entire file locally. #!/bin/bash ## Usage: ./get-video-sizes.sh while IFS=”” read […]
How to reset the root password on a Raspberry Pi
Put the Raspberry Pi SD card into a linux computer. (If you do not have a linux computer you will need to install software that can read linux file systems) Open the file /etc/passwd located on the SD card (you may need to be a super user to access this file on the SD card) You […]
Byzanz: error while loading shared libraries: libgtk-3.so.0
Got this error: $ byzanz-record-region Default recording duration 10s to /tmp/recorded.gif Delaying 3 seconds. After that, byzanz will start 3 2 1 byzanz-record: error while loading shared libraries: libgtk-3.so.0: cannot open shared object file: No such file or directory Fixed it with: sudo apt-get install libgtk-3-0:i386
Create an A4 PDF using Imagemagick Linux convert command line
this will resize and center a bunch of images into a nice PDF with all the pages the same size: convert *.jpg -compress jpeg -resize 1240×1753 -extent 1240×1753 -gravity center -units PixelsPerInch -density 300×300 output.pdf