Makefile (1071B)
1 INPUT_VIDEO = <please select a video file as INPUT_VIDEO> 2 TEMPFILE = tmp.uivf 3 4 DRAFT = -d 5 # Useful for better performance when not working 6 # with colours or not caring about colours. 7 8 FFMPEG_ARGS = -c:v libx264 -preset veryslow -crf 0 -pix_fmt yuv444p 9 # ↑~~~~~~~~~~~ ↑~~~~~~~~~~~~~~~ ↑~~~~~~~~~~~~~~~~~~~~~~ 10 # │ │ │ 11 # │ │ └──── Lossless 12 # │ │ 13 # │ └──── High compression 14 # │ 15 # └──── H.264, a lossless-capable codec 16 17 flopped.mkv: $(INPUT_VIDEO) 18 ../../blind-from-video $(DRAFT) "$(INPUT_VIDEO)" $(TEMPFILE) 19 ../../blind-flop <>$(TEMPFILE) 1<>$(TEMPFILE) 20 framerate=$$(ffprobe -v quiet -show_streams -select_streams v - < "$(INPUT_VIDEO)" | \ 21 grep '^r_frame_rate=' | cut -d = -f 2) && \ 22 ../../blind-to-video $(DRAFT) $${framerate} $(FFMPEG_ARGS) flopped.mkv < $(TEMPFILE) 23 rm $(TEMPFILE) 24 25 clean: 26 -rm flopped.mkv $(TEMPFILE) 27 28 .PHONY: clean