blind

suckless command-line video editing utility
git clone git://git.suckless.org/blind
Log | Files | Refs | README | LICENSE

Makefile (1150B)


      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 START = 20
     18 END = 40
     19 
     20 reversed.mkv: $(TEMPFILE) $(INPUT_VIDEO)
     21 	framerate=$$(ffprobe -v quiet -show_streams -select_streams v - < "$(INPUT_VIDEO)" | \
     22 	             grep '^r_frame_rate=' | cut -d = -f 2) && \
     23 	../../blind-reverse $(TEMPFILE) | ../../blind-to-video $(DRAFT) $${framerate} $(FFMPEG_ARGS) reversed.mkv
     24 
     25 $(TEMPFILE): $(INPUT_VIDEO)
     26 	../../blind-from-video -L $(DRAFT) "$(INPUT_VIDEO)" - | \
     27 	../../blind-split -L /dev/null $(START) $(TEMPFILE) $(END)
     28 
     29 clean:
     30 	-rm reversed.mkv  $(TEMPFILE)
     31 
     32 .PHONY: clean