Skip to content

Instantly share code, notes, and snippets.

View rajat1saxena's full-sized avatar
😃
Building an open-source LMS

Rajat Saxena rajat1saxena

😃
Building an open-source LMS
View GitHub Profile
@rajat1saxena
rajat1saxena / soundreplace.sh
Created January 10, 2017 05:33
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
@Vestride
Vestride / encoding-video.md
Last active April 24, 2024 09:59
Encoding video for the web

Encoding Video

Installing

Install FFmpeg with homebrew. You'll need to install it with a couple flags for webm and the AAC audio codec.

brew install ffmpeg --with-libvpx --with-libvorbis --with-fdk-aac --with-opus