Skip to content

Instantly share code, notes, and snippets.

@fabriziosalmi
fabriziosalmi / broadcast.sh
Created July 2, 2021 09:35 — forked from BusterNeece/broadcast.sh
FunkyWayFM: The shell script used to merge the video feed and AzuraCast-powered radio feed into a single YouTube stream.
#! /bin/bash
VBR="1500k"
FPS="30"
QUAL="veryfast"
YOUTUBE_URL="rtmp://a.rtmp.youtube.com/live2"
KEY=""
VIDEO_SOURCE="/home/ubuntu/video3.mp4"
@fabriziosalmi
fabriziosalmi / check-certs.sh
Created October 27, 2019 15:45 — forked from cgmartin/check-certs.sh
Bash SSL Certificate Expiration Check
#!/bin/bash
TARGET="mysite.example.net";
RECIPIENT="hostmaster@mysite.example.net";
DAYS=7;
echo "checking if $TARGET expires in less than $DAYS days";
expirationdate=$(date -d "$(: | openssl s_client -connect $TARGET:443 -servername $TARGET 2>/dev/null \
| openssl x509 -text \
| grep 'Not After' \
|awk '{print $4,$5,$7}')" '+%s');
in7days=$(($(date +%s) + (86400*$DAYS)));
@fabriziosalmi
fabriziosalmi / ffmpeg-watermark.md
Created December 9, 2017 12:49 — forked from bennylope/ffmpeg-watermark.md
FFmpeg add a watermark to video

How to Add a Watermark to Video

FFMPEG filters provide a powerful way to programmatically enhance or alter videos, and it’s fairly simple to add a watermark to a video using the overlay filter. The easiest way to install ffmpeg is to download a pre-built binary for your specific platform. Then you don’t have to worry about including and installing all the right dependencies and codecs you will be using.

Once you have ffmpeg installed, adding a watermark is as easy as passing your existing source through an overlay filter like so:

ffmpeg -i test.mp4 -i watermark.png -filter_complex "overlay=10:10" test1.mp4

Basically, we’re passing in the original video, and an overlay image as inputs, then passing it through the filter, and saving the output as test1.mp4.