Last active
February 8, 2022 13:12
-
-
Save amake/d2da4e45cf372a2850f6296bb8433860 to your computer and use it in GitHub Desktop.
Revisions
-
amake revised this gist
Dec 20, 2019 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -6,7 +6,7 @@ heic := $(wildcard *.HEIC) jpg := $(heic:.HEIC=.jpg) .PHONY: all: silent-pingpong.mp4 with-audio-pingpong.mp4 silent.mp4: $(jpg) # ffmpeg video filter -vf @@ -17,7 +17,7 @@ silent.mp4: $(jpg) with-audio.mp4: silent.mp4 audio.m4a ffmpeg -i $< -i $(word 2,$^) -c copy -map 0:v:0 -map 1:a:0 -shortest $@ %-pingpong.mp4: %.mp4 %-reversed.mp4 ffmpeg -f concat -safe 0 -i <(printf "file '%s'\n" $(addprefix $(PWD)/,$^)) -c copy $@ %.jpg: %.HEIC -
amake revised this gist
Dec 20, 2019 . 1 changed file with 14 additions and 7 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,25 +1,32 @@ SHELL := /bin/bash # Requires ffmpeg, libheif heic := $(wildcard *.HEIC) jpg := $(heic:.HEIC=.jpg) .PHONY: all: forward-back.mp4 silent.mp4: $(jpg) # ffmpeg video filter -vf # - assumes vertical photos # - resizes to iPhone XS max video resolution ffmpeg -framerate 10 -pattern_type glob -i '*.jpg' -vf 'transpose=1,scale=1920:-1' $@ with-audio.mp4: silent.mp4 audio.m4a ffmpeg -i $< -i $(word 2,$^) -c copy -map 0:v:0 -map 1:a:0 -shortest $@ forward-back.mp4: with-audio.mp4 with-audio-reversed.mp4 ffmpeg -f concat -safe 0 -i <(printf "file '%s'\n" $(addprefix $(PWD)/,$^)) -c copy $@ %.jpg: %.HEIC heif-convert $< $@ %-reversed.mp4: %.mp4 ffmpeg -i $< -vf reverse -af areverse $@ .PHONY: clean clean: rm *.jpg *.mp4 -
amake revised this gist
Dec 20, 2019 . 1 changed file with 13 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,14 +1,25 @@ # Requires ffmpeg, libheif heic := $(wildcard *.HEIC) jpg := $(heic:.HEIC=.jpg) # ffmpeg video filter # - assumes vertical photos # - resizes to iPhone XS max video resolution vf := 'transpose=1,scale=1920:-1' .PHONY: all: with-audio.mp4 silent.mp4: $(jpg) ffmpeg -framerate 10 -pattern_type glob -i '*.jpg' -vf $(vf) $@ with-audio.mp4: silent.mp4 audio.m4a ffmpeg -i $< -i $(word 2,$^) -c copy -map 0:v:0 -map 1:a:0 -shortest $@ %.jpg: %.HEIC heif-convert $< $@ .PHONY: clean clean: rm *.jpg *.mp4 -
amake created this gist
Dec 19, 2019 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,14 @@ heic := $(wildcard *.HEIC) jpg := $(heic:.HEIC=.jpg) .PHONY: all: with-audio.mp4 silent.mp4: $(jpg) ffmpeg -framerate 10 -pattern_type glob -i '*.jpg' -vf 'transpose=1,scale=1920:-1' $@ with-audio.mp4: silent.mp4 audio.m4a ffmpeg -i $< -i $(word 2,$^) -c copy -map 0:v:0 -map 1:a:0 -shortest $@ %.jpg: %.HEIC heic-convert $< $@