Skip to content

Instantly share code, notes, and snippets.

Avatar

Aran Deltac bluefeet

View GitHub Profile
View ffmpeg-combine.sh
# files.txt has lines like:
# file '1.mkv'
# file '2.mkv'
ffmpeg -f concat -i files.txt -c copy 0.mkv
# https://stackoverflow.com/a/11175851
View rename-git-tag.sh
git tag NEW OLD
git tag -d OLD
git push origin :refs/tags/OLD
git push origin refs/tags/NEW
# Other contributors should clear out the deleted tags from their
# clones or they may re-introduce them to origin by accident.
git pull --prune --tags
# One-liner to rename all tags when migrating from Dist::Zilla to
View ffmpeg-ninja-audio.sh
ffmpeg \
-i video.mkv \ # Great video, japanese audio.
-itsoffset -1.0 \ # audio.mp4 is behind by 1 second.
-i audio.mp4 \ # Bad video, english audio.
-map 0:v:0 \ # Video from file 0 (video.mkv).
-map 1:a:0 \ # English audio from file 1 (audio.mp4).
-map 0:a:0 \ # Japanese audio from file 0.
-c copy \ # Don't convert anything, just copy the streams.
new.mkv # Great video, and with both japanese and english audio tracks.