sites

public wiki contents of suckless.org
git clone git://git.suckless.org/sites
Log | Files | Refs

index.md (7196B)


      1 ![blind](blind.svg)
      2 
      3 blind is a collection of command line video editing utilities.
      4 
      5 Video format
      6 ------------
      7 blind uses a raw video format with a simple container. A file begins with an
      8 plain-text line, containing the number of frames, the width, the height, and
      9 the pixel format, all separated by a single regular blank space, without and
     10 leading or tailing white space. After this line, which ends with an LF, there
     11 is a NUL-byte followed by the 4 characters “uivf” (unportable, interim
     12 video format). This head is followed by the video frame-by-frame with row-major
     13 frames. Pixels are independently encoded, and are encoded unscaled CIE XYZ with
     14 non-premultiplied alpha and without any transfer-function, with values stored
     15 in native `double`s or optionally in native `float`s. These two configurations
     16 are the only options, but the container format is designed so this can be
     17 changed arbitrarily in the future.
     18 
     19 FAQ
     20 ---
     21 
     22 ### Creating videos without graphics, are you insane?
     23 
     24 Yes, but see the rationale below!
     25 
     26 ### Doesn't raw video takes up a lot of space?
     27 
     28 Yes it does, a 4-channel pixel encoded with `double` takes 32 bytes. A
     29 1280-by-720 frame with this pixel format takes 29.4912 MB (SI), which means you
     30 can only fit almost 3391 frames in 100 GB, which is about 113 seconds or 1:53
     31 minutes with a framerate of 30 fps. Therefore, you probably do not want to
     32 store anything in this format unless you know you have room for it, or if it is
     33 very small segment of your video, which unfortunately becomes a bit of a problem
     34 when reversing a video. However, when possible, feed the resulting video
     35 directly to `blind-to-video` to convert it into a compressed, lossless video
     36 format, if the video is not too large, you can choose to compress it with bzip2
     37 instead.
     38 
     39 ### For what kind of video editing is blind designed?
     40 
     41 It is designed for composing new videos. It is not designed for making small
     42 changes as this can probably be done faster with a graphical video editor or
     43 with ffmpeg which would also be much faster.
     44 
     45 ### Does it support farbfeld?
     46 
     47 Of course. If you want to use farbfeld, you can use the `-f` flag for
     48 `blind-to-image` and `blind-from-image`, this will cause the programs to
     49 convert directly to or from farbfeld without using `convert(1)`.
     50 
     51 ### Why doesn't blind uses encode pixels like farbfeld?
     52 
     53 blind and farbfeld solve completely different problems. farbfeld solves to
     54 problem of storing pictures in a simply way that can easily be viewed and
     55 edited. blind does not try to solve the problem of storing videos, video
     56 takes a lot of space and need compression designed especially for video or
     57 three-dimensional raster images. Compressed video cannot be efficiently edited
     58 because compression takes too long. Instead blind solves the problem of
     59 efficiently processing video: thousands of pictures. Because blind doesn't try
     60 to create a format for storing images, therefore it's format doesn't need to be
     61 portable. Furthermore, due to legacy in television (namely, that of
     62 black-and-white television), video formats do not store values in sRGB, but
     63 rather in Y'UV, so there is next to no benefit to storing colours in sRGB.
     64 
     65 ### Why doesn't blind use sRGB?
     66 
     67 If I tell you I use CIE XYZ, you will only have two questions: “how are
     68 values stored?” and “is Y scaled to [0, 100] or [0, 1]?” When I tell you
     69 I use sRGB you have more questions: “do you support out-of-gamut colours?”,
     70 “how are values stored?”, “which scale do you use?”, and “is the
     71 transfer-function applied?”
     72 
     73 CIE XYZ also has the advantage of having the brightness encoded in one of its
     74 parameters, Y, and obtaining the chroma requires only simply conversion to a
     75 non-standardise colour model that with the same Y-value.
     76 
     77 ### Why does blind use CIE XYZ instead of CIE L\*a\*b\*?
     78 
     79 Because CIE L\*a\*b\* is not linear, meaning that it requires unnecessary
     80 calculations when working with the colours.
     81 
     82 ### Why does blind use CIE XYZ instead of Y'UV or YUV?
     83 
     84 Y'UV has good performance for converting to sRGB and is has good subsampling
     85 quality, but it is not a good for editing. Y'UV is non-linear, so it has the
     86 same disadvantages as CIE L\*a\*b\*. Y'UV does not have its transfer-function
     87 applied directly to it's parameters, instead it is a linear transformation if
     88 the sRGB with its transfer-function applied. This means that no performance is
     89 gained during conversion to or from cooked video formats by using YUV. CIE XYZ
     90 also has the advantage that it is well-known and has a one-step conversion to
     91 almost all colour models. It also have the advantages that it's parameters are
     92 named X, Y, Z, which makes it very easy to choose parameter when storing points
     93 instead of colours in a video.
     94 
     95 ### Doesn't blind have any audio support?
     96 
     97 No, it is not clear that there is actually a need for this. There are good
     98 tools for editing audio, and ffmpeg can be used to extract the audio
     99 streams from a video or add it to a video.
    100 
    101 ### Is it really feasible to edit video without a GUI?
    102 
    103 Depends on what you are doing. Many things can be done without a GUI, and
    104 some thing are easier to do without one. If you find that you need GUI it
    105 possible to combine blind with a graphical editor. Furthermore, blind could be
    106 used in by a graphical editor if one were to write a graphical editor to use
    107 blind.
    108 
    109 Rationale
    110 ---------
    111 * It's source control friendly and it's easy for a user to resolve merge
    112   conflicts and identify changes.
    113 * Rendering can take a very long time. With this approach, the user can use
    114   Make to only rerender parts that have been changed.
    115 * It's possible to distribute the rendering to multiple computers, without any
    116   built in functionality for this, for example using a distributed Make.
    117 * Parallelism is added for free.
    118 * No room for buggy GUIs, which currently is a problem with the large video
    119   editors for Linux.
    120 * Less chance that the user makes a change by mistake without noticing it, such
    121   as moving a clip in the editor by mistake instead of for example resizing.
    122 * Even old, crappy computers can be used for large projects.
    123 * Very easy to utilise command line image editors for modify frames, or to add
    124   your own tools for custom effects.
    125 
    126 Development
    127 -----------
    128 You can browse its [source code repository](//git.suckless.org/blind) or get a
    129 copy using git with the following command:
    130 
    131 	git clone https://git.suckless.org/blind
    132 
    133 Download
    134 --------
    135 * [blind-1.0](//dl.suckless.org/tools/blind-1.0.tar.gz) (2017-01-22)
    136 * [blind-1.1](//dl.suckless.org/tools/blind-1.1.tar.gz) (2017-05-06)
    137 
    138 Also make sure to check your package manager.  The following distributions
    139 provide packages:
    140 
    141 * [Alpine Linux](https://pkgs.alpinelinux.org/package/edge/testing/x86_64/blind)
    142 * [Arch Linux (AUR)](https://aur.archlinux.org/packages/blind/)
    143 * [Arch Linux (AUR), git version](https://aur.archlinux.org/packages/blind-git/)
    144 
    145 Dependencies
    146 ------------
    147 * [ffmpeg](https://www.ffmpeg.org/) - for converting from or to other video
    148   formats.
    149 * [imagemagick](https://www.imagemagick.org/) - for converting regular images
    150   to frames.
    151 
    152 Links
    153 -----
    154 * [Video tutorials](https://www.youtube.com/channel/UCg_nJOURt3guLtp4dQLIvQw)
    155 
    156 
    157 Author
    158 ------
    159 * Mattias Andrée (maandree@kth.se)