Skip to content

Instantly share code, notes, and snippets.

@rajat1saxena
Created January 10, 2017 05:33
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rajat1saxena/ef3b73231c730b95d9cd841f75537708 to your computer and use it in GitHub Desktop.
Save rajat1saxena/ef3b73231c730b95d9cd841f75537708 to your computer and use it in GitHub Desktop.
A quick shell script to replace the sound of your video
#!/bin/bash
VIDEO=$1
AUDIO=$2
DATE=`date +%Y-%m-%d.%H:%M:%S`
OUTPUT="Output_"$DATE".mp4"
ffmpeg -i $VIDEO -i $AUDIO \
-c:v copy -c:a aac -strict experimental \
-map 0:v:0 -map 1:a:0 $OUTPUT
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment