Skip to content

Instantly share code, notes, and snippets.

View williamfields's full-sized avatar

William Fields williamfields

View GitHub Profile
@madskjeldgaard
madskjeldgaard / imgplusaudio2video.sh
Created January 31, 2025 11:25
Combine a still image with an audio file into a video file for social media using ffmpeg
#!/bin/bash
# This script combines an image and an audio file into a video using ffmpeg.
# It prompts the user for the paths to the image and audio files, an optional
# fixed length in seconds, and the output file name. The script ensures that
# the paths are properly quoted and constructs the appropriate ffmpeg command.
# Function to add quotes around a path if not already present
add_quotes() {
local path="$1"