Skip to content

Instantly share code, notes, and snippets.

@mcfiredrill
Created September 19, 2023 16:15
Show Gist options
  • Save mcfiredrill/68348ad894504eea9156992403166029 to your computer and use it in GitHub Desktop.
Save mcfiredrill/68348ad894504eea9156992403166029 to your computer and use it in GitHub Desktop.
#!/bin/bash
# usage:
#
# ./podcast_vid.sh <image or video> <mp3>
#
#
# options
# - loop video
#
set -x
# image
IMAGE=$1
# mp3
MP3=$2
# output filename
# $3
base_name=$(basename "$MP3")
filename_without_ext="${base_name%.*}"
ffmpeg -loop 1 -framerate 25 -i "$IMAGE" -i "$MP3" -ignore_loop 0 -i ~/dropbox/drawings/jambox_spin_transparent_white.gif -filter_complex "[2:v]scale=iw/10:-1[ovrl];[0:v][ovrl]overlay=W-w:H-h" -shortest -c:a copy -map 0:v:0 -map 1:a:0 "${filename_without_ext}.mp4"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment