Skip to content

Instantly share code, notes, and snippets.

@kezzico
Created May 21, 2021 19:43
Show Gist options
  • Save kezzico/c6d1950de08308d1fde758d9454820f6 to your computer and use it in GitHub Desktop.
Save kezzico/c6d1950de08308d1fde758d9454820f6 to your computer and use it in GitHub Desktop.
#!/bin/bash
# stream.normalize <source> [output]
# prepares multiple video sources for concatenation
if [[ -z "$2" ]]; then
output="${1%%.*}.normalize.${1##*.}"
else
output="$2"
fi
ffmpeg -r 30 -i "$1" \
-filter_complex "[0:v]scale=1280:720, setpts=PTS-STARTPTS[outv];[0:a]dynaudnorm, asetpts=PTS-STARTPTS[outa]" \
-map "[outv]" -map "[outa]" \
-preset veryfast -c:v libx264 \
-c:a libmp3lame \
-hide_banner -y \
-loglevel error \
"$output"
#!/bin/bash
# stream.concat <source> <output>
#
ffmpeg -f concat -safe 0 -i "$1" \
-c:v copy -c:a copy \
-hide_banner -y \
-loglevel error \
"$2"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment