From 9783831e37ca5718e20259be70c23e229d3583c4 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Sat, 14 Jan 2017 10:05:50 +0100 Subject: Fix offset bug in blind-reverse and add example MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- examples/reverse/Makefile | 32 ++++++++++++++++++++++++++++++++ examples/split/Makefile | 2 +- 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 examples/reverse/Makefile (limited to 'examples') 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 = +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 = +INPUT_VIDEO = SHELL = bash # We need Bash's process substitution operator >() -- cgit v1.2.3-70-g09d2