Skip to content

Instantly share code, notes, and snippets.

@stenuto
stenuto / hls.sh
Created November 7, 2024 16:58
HLS ffmpeg script
#!/bin/bash
# Function to display usage information
usage() {
echo "Usage: $0 /path/to/input.mp4 [ /path/to/output_directory ]"
exit 1
}
# Check if at least one argument (input file) is provided
if [ $# -lt 1 ]; then
@stenuto
stenuto / timelapse.sh
Created June 18, 2024 20:56
Timelapse script
#!/bin/bash
# Check if interval argument is provided
if [ -z "$1" ]; then
echo "Usage: $0 -int <interval_in_seconds>"
exit 1
fi
# Extract the interval value
interval=$2
@stenuto
stenuto / convert.sh
Created May 29, 2024 03:45
Convert video file into HLS playlist with multiple resolutions and bitrates
#!/bin/bash
# This script takes a video file as input and converts it into an HLS (HTTP Live Streaming) playlist with multiple resolutions and bitrates. It also generates a thumbnail image from the video.
# Check if an input filename is provided
if [ -z "$1" ]; then
echo "Usage: $0 input_filename (without extension) [-t]"
exit 1
fi