Skip to content

Instantly share code, notes, and snippets.

@jonaprieto
Created May 25, 2023 08:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jonaprieto/cf839da1bbc052f2911fc2d34900245f to your computer and use it in GitHub Desktop.
Save jonaprieto/cf839da1bbc052f2911fc2d34900245f to your computer and use it in GitHub Desktop.
Convert all the mov files to mp4 using HandBrakeCLI
# Put this Makefile inside the folder containing your
# MOV files.
MOV_FILES := $(wildcard *.mov)
MP4_FILES := $(patsubst %.mov,%.mp4,$(MOV_FILES))
all: $(MP4_FILES)
# In macOS, use `brew install HandBrakeCLI`
%.mp4: %.mov
HandBrakeCLI -i $< -e x264 -E faac -o $@
.PHONY: clean
clean:
rm -f *.mov
.PHONY: clean-all
clean-all:
rm -f *.mov
rm -f *.mp3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment