“The odd uneven time.“
This commit is contained in:
parent
08970dfa47
commit
3e18b28365
2 changed files with 60 additions and 46 deletions
29
README.org
29
README.org
|
@ -1,51 +1,52 @@
|
||||||
|
|
||||||
* time, space, stacking, slicing, scanning, etc
|
* time, space, stacking, slicing, scanning, etc
|
||||||
|
|
||||||
"Slitscan imaging techniques are used to create static images of time-based phenomena. In traditional film photography, slit scan images are created by exposing film as it slides past a slit-shaped aperture. In the digital realm, thin slices are extracted from a sequence of video frames, and concatenated into a new image."
|
“Slitscan imaging techniques are used to create static images of time-based phenomena. In traditional film photography, slit scan images are created by exposing film as it slides past a slit-shaped aperture. In the digital realm, thin slices are extracted from a sequence of video frames, and concatenated into a new image.”
|
||||||
|
|
||||||
[[http://www.flong.com/texts/lists/slit_scan/][An Informal Catalogue of Slit-Scan Video Artworks and Research]] Compiled by Golan Levin.
|
[[http://www.flong.com/texts/lists/slit_scan/][An Informal Catalogue of Slit-Scan Video Artworks and Research]] Compiled by Golan Levin.
|
||||||
|
|
||||||
[[slitscope_0.jpeg]]
|
[[slitscope_0.jpeg]]
|
||||||
|
|
||||||
This particular slitscan provides some slightly configurable scaffolding around ffmpeg (based on a blogpost from [[http://oioiiooixiii.blogspot.com/2017/11/ffmpeg-temporal-slice-stacking-effect.html][oioiiooixiii]]) and is intended for non-realtime rendering at various resolutions. it's neither first, nor last. it's not especially interesting, educational or efficient. just another cloudform in the endless space of possible implementation...
|
This particular slitscan provides some slightly configurable scaffolding around ffmpeg (based on a blogpost from [[http://oioiiooixiii.blogspot.com/2017/11/ffmpeg-temporal-slice-stacking-effect.html][oioiiooixiii]]) and is intended for non-realtime rendering at various resolutions. it's neither first, nor last. it's not especially interesting, educational or efficient. just another cloudform in the endless space of possible implementation…
|
||||||
|
|
||||||
* installation, configuration, operation, etc
|
* installation, configuration, operation, etc
|
||||||
|
|
||||||
install (mac)...
|
install (macOS)…
|
||||||
#+BEGIN_SRC text
|
#+BEGIN_SRC text
|
||||||
brew install ffmpeg drracket
|
brew install ffmpeg drracket
|
||||||
git clone https://github.com/zzkt/slitscan.git
|
git clone https://github.com/zzkt/slitscan.git
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
install (debian/ubuntu)...
|
install (debian/ubuntu)…
|
||||||
#+BEGIN_SRC text
|
#+BEGIN_SRC text
|
||||||
sudo apt install ffmpeg racket
|
sudo apt install ffmpeg racket
|
||||||
git clone https://github.com/zzkt/slitscan.git
|
git clone https://github.com/zzkt/slitscan.git
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
simple transform...
|
simple transform…
|
||||||
#+BEGIN_SRC text
|
#+BEGIN_SRC text
|
||||||
racket slitscan.rkt -v -i <input.mp4>
|
racket slitscan.rkt -v input.mp4
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
transform at 1080p and delete working files, with minimal command line noise...
|
transform at 1080p and delete working files, with minimal command line noise…
|
||||||
#+BEGIN_SRC text
|
#+BEGIN_SRC text
|
||||||
racket slitscan.rkt --width 1920 --height 1080 --loglevel quiet --cleanup -i <input.mp4>
|
racket slitscan.rkt --width 1920 --height 1080 --loglevel quiet --cleanup input.mp4
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
options...
|
options…
|
||||||
#+BEGIN_SRC text
|
#+BEGIN_SRC text
|
||||||
slitscan [ <option> ... ]
|
slitscan [ <option> ... ] <video-file>
|
||||||
where <option> is one of
|
where <option> is one of
|
||||||
-v, --verbose : various verbose messages
|
-v, --verbose : various verbose messages
|
||||||
-l <level>, --loglevel <level> : loglevel for ffmpeg e.g. quiet, error, warning, info, debug
|
-l <level>, --loglevel <level> : loglevel for ffmpeg e.g. quiet, error, warning, info, debug
|
||||||
-c, --cleanup : Clean up temporary/working files
|
-c, --cleanup : Clean up temporary/working files
|
||||||
|
-n, --noresize : do not resize the input file
|
||||||
--horizontal : output a horizontal video only (default: both)
|
--horizontal : output a horizontal video only (default: both)
|
||||||
--vertical : output a vertical video only (default: both)
|
--vertical : output a vertical video only (default: both)
|
||||||
--width <pixels> : width of output output video
|
--width <pixels> : width of transform video
|
||||||
--height <pixels> : height of output output video
|
--height <pixels> : height of tansform video
|
||||||
-i <video>, --input <video> : input file
|
-f <folder>, --in-folder <folder> : input folder
|
||||||
-f <folder>, --folder <folder> : input folder
|
-o <folder>, --out-folder <folder> : output folder
|
||||||
--help, -h : Show this help
|
--help, -h : Show this help
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
|
|
37
slitscan.rkt
37
slitscan.rkt
|
@ -25,7 +25,7 @@
|
||||||
;;;
|
;;;
|
||||||
;;; Requirements
|
;;; Requirements
|
||||||
;;;
|
;;;
|
||||||
;;; Racket, ffmpeg and zsh or bash (probably)
|
;;; Racket, ffmpeg and zsh or bash (and probably works with other shells)
|
||||||
;;;
|
;;;
|
||||||
;;; Commentary
|
;;; Commentary
|
||||||
;;;
|
;;;
|
||||||
|
@ -43,10 +43,12 @@
|
||||||
|
|
||||||
|
|
||||||
;; cli options
|
;; cli options
|
||||||
|
(define filename (make-parameter ""))
|
||||||
(define verbose? (make-parameter #f))
|
(define verbose? (make-parameter #f))
|
||||||
(define cleanup? (make-parameter #f))
|
(define cleanup? (make-parameter #f))
|
||||||
(define filename (make-parameter "untitled"))
|
(define noresize? (make-parameter #f))
|
||||||
(define input-folder (make-parameter ""))
|
(define in-folder (make-parameter ""))
|
||||||
|
(define out-folder (make-parameter ""))
|
||||||
(define loglevel (make-parameter "")) ;; leave unset by default
|
(define loglevel (make-parameter "")) ;; leave unset by default
|
||||||
|
|
||||||
;; output options horiz/vert/both
|
;; output options horiz/vert/both
|
||||||
|
@ -64,14 +66,18 @@
|
||||||
(("-v" "--verbose") "various verbose messages" (verbose? #t))
|
(("-v" "--verbose") "various verbose messages" (verbose? #t))
|
||||||
(("-l" "--loglevel") level "loglevel for ffmpeg e.g. quiet, error, warning, info, debug" (loglevel level))
|
(("-l" "--loglevel") level "loglevel for ffmpeg e.g. quiet, error, warning, info, debug" (loglevel level))
|
||||||
(("-c" "--cleanup") "Clean up temporary/working files" (cleanup? #t))
|
(("-c" "--cleanup") "Clean up temporary/working files" (cleanup? #t))
|
||||||
|
(("-n" "--noresize") "do not resize the input file" (noresize? #t))
|
||||||
(("--horizontal") "output a horizontal video only (default: both)" (hout-only? #t))
|
(("--horizontal") "output a horizontal video only (default: both)" (hout-only? #t))
|
||||||
(("--vertical") "output a vertical video only (default: both)" (vout-only? #t))
|
(("--vertical") "output a vertical video only (default: both)" (vout-only? #t))
|
||||||
(("--width") pixels "width of transform video" (output-width pixels))
|
(("--width") pixels "width of transform video" (output-width pixels))
|
||||||
(("--height") pixels "height of tansform video" (output-height pixels))
|
(("--height") pixels "height of tansform video" (output-height pixels))
|
||||||
(("-i" "--input") video "input file" (filename video))
|
(("-f" "--in-folder") folder "input folder" (in-folder folder))
|
||||||
(("-f" "--folder") folder "input folder" (input-folder folder))
|
(("-o" "--out-folder") folder "output folder" (out-folder folder))
|
||||||
#:args () ; rest of the args?
|
#:args (video-file) ; rest of the args?
|
||||||
(printf "slitscanning: ~a\n" (filename))))
|
(filename video-file)
|
||||||
|
(if (file-exists? (filename))
|
||||||
|
(printf "slitscanning: ~a\n" (filename))
|
||||||
|
(raise-user-error 'slitscan "File '~a' does not exist." (filename)))))
|
||||||
|
|
||||||
;; emulation of $(...) shell syntax
|
;; emulation of $(...) shell syntax
|
||||||
(define-syntax zout
|
(define-syntax zout
|
||||||
|
@ -87,11 +93,11 @@
|
||||||
((and (not (verbose?)) (string=? "" (loglevel))) (loglevel "error")))
|
((and (not (verbose?)) (string=? "" (loglevel))) (loglevel "error")))
|
||||||
|
|
||||||
;; variables/various
|
;; variables/various
|
||||||
(define folder (if (not (string=? "" (input-folder)))
|
(define folder (if (not (string=? "" (in-folder)))
|
||||||
(input-folder)
|
(in-folder)
|
||||||
(zout "mktemp -d")))
|
(zout "mktemp -d")))
|
||||||
|
|
||||||
(vecho "using folder: ~a\n" folder)
|
(vecho "using folder '~a' for input\n" folder)
|
||||||
|
|
||||||
;(define fffeature "ffprobe -v quiet -select_streams v -of default=noprint_wrappers=1:nokey=1 -show_entries stream=")
|
;(define fffeature "ffprobe -v quiet -select_streams v -of default=noprint_wrappers=1:nokey=1 -show_entries stream=")
|
||||||
|
|
||||||
|
@ -143,6 +149,7 @@
|
||||||
;; rezise video
|
;; rezise video
|
||||||
(define resized-video (string-append folder "/resized.mkv"))
|
(define resized-video (string-append folder "/resized.mkv"))
|
||||||
|
|
||||||
|
;; resize video, or copy file if 'noresize?' option is set
|
||||||
(define (resize)
|
(define (resize)
|
||||||
(define ffmpeg-r1
|
(define ffmpeg-r1
|
||||||
(format "ffmpeg -loglevel ~a -i \"~a\" -vf ~a -crf 10 \"~a\" 2>&1 | grep 'frame=' | tr \\n \\r; echo"
|
(format "ffmpeg -loglevel ~a -i \"~a\" -vf ~a -crf 10 \"~a\" 2>&1 | grep 'frame=' | tr \\n \\r; echo"
|
||||||
|
@ -235,9 +242,15 @@
|
||||||
|
|
||||||
;; output in 3 (or 4 (or 5)) steps
|
;; output in 3 (or 4 (or 5)) steps
|
||||||
|
|
||||||
|
(define (slitscan)
|
||||||
(when (resize) (printf "resized\n"))
|
(when (resize) (printf "resized\n"))
|
||||||
(when (slice) (printf "slicwd\n"))
|
(when (slice) (printf "sliced\n"))
|
||||||
(when (assemble) (printf "assembled\n"))
|
(when (assemble) (printf "assembled\n"))
|
||||||
(when (cleanup) (printf "done\n"))
|
(when (cleanup) (printf "done\n")))
|
||||||
|
|
||||||
|
|
||||||
|
;; (printf "The file '~a' does not exist.\n" (filename))
|
||||||
|
|
||||||
|
(slitscan)
|
||||||
|
|
||||||
;;; FIN
|
;;; FIN
|
||||||
|
|
Loading…
Reference in a new issue