diff options
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/reverse/Makefile | 32 | ||||
| -rw-r--r-- | examples/split/Makefile | 2 |
2 files changed, 33 insertions, 1 deletions
diff --git a/examples/reverse/Makefile b/examples/reverse/Makefile new file mode 100644 index 0000000..5112f31 --- /dev/null +++ b/examples/reverse/Makefile @@ -0,0 +1,32 @@ +INPUT_VIDEO = <please select a video file as INPUT_VIDEO> +TEMPFILE = tmp.uivf + +DRAFT = -d +# Useful for better performance when not working +# with colours or not caring about colours. + +FFMPEG_ARGS = -c:v libx264 -preset veryslow -crf 0 -pix_fmt yuv444p +# ↑~~~~~~~~~~~ ↑~~~~~~~~~~~~~~~ ↑~~~~~~~~~~~~~~~~~~~~~~ +# │ │ │ +# │ │ └──── Lossless +# │ │ +# │ └──── High compression +# │ +# └──── H.264, a lossless-capable codec + +START = 20 +END = 40 + +reversed.mkv: $(TEMPFILE) + framerate=$$(ffprobe -v quiet -show_streams -select_streams v - < "$(INPUT_VIDEO)" | \ + grep '^r_frame_rate=' | cut -d = -f 2) && \ + ../../blind-reverse $(TEMPFILE) | ../../blind-to-video $(DRAFT) $${framerate} $(FFMPEG_ARGS) reversed.mkv + +$(TEMPFILE): $(INPUT_VIDEO) + ../../blind-from-video -L $(DRAFT) "$(INPUT_VIDEO)" - | \ + ../../blind-split -L /dev/null $(START) $(TEMPFILE) $(END) + +clean: + -rm reversed.mkv $(TEMPFILE) + +.PHONY: clean diff --git a/examples/split/Makefile b/examples/split/Makefile index 8e96b9b..4f3038c 100644 --- a/examples/split/Makefile +++ b/examples/split/Makefile @@ -1,4 +1,4 @@ -INPUT_VIDEO = <please select a video file as INPUT_VIDEO> +INPUT_VIDEO = <please select a video file as INPUT_VIDEO> SHELL = bash # We need Bash's process substitution operator >() |
