Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Makefile to pre-process downloaded podcasts
# process podcasts
MP3S = $(filter-out $(wildcard *.64kbit.mp3),$(wildcard *.mp3))
PROCESSED = $(patsubst %.mp3,%.64kbit.mp3,$(MP3S))
.PHONY: process
process: videos $(PROCESSED)
@echo Done.
.PHONY: videos
videos: $(wildcard *.mp4)
@if [ -n "$^" ]; then \
echo Moving $^. ; \
mv $^ video/ABC/ ; \
%.64kbit.mp3: %.mp3
@echo Processing $^
@nice sox --no-show-progress --multi-threaded \
--buffer 32768 --norm "$<" "$@" \
tempo -s 1.33 channels 1 rate 22050
@# strip id3 tags so player puts all podcasts in the same folder
@id3v2 -D $@ > /dev/null
@mv $< reencode/original/
@echo Done $^

This comment has been minimized.

Copy link
Owner Author

@tompaton tompaton commented Aug 26, 2017

The goal is to:
a) reduce filesize of podcasts (192kbit/s is overkill for spoken word!)
b) normalize the volume and convert to mono (easier to listen to when riding/running and it's windy)
c) speed up playback (people talk too slow!)
d) strip tags (so my dinky mp3 player doesn't put the podcasts into different "folders")


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment