@@ -578,6 +578,108 @@ Available video output drivers are:
578578 in some terminals (``xterm ``). The default (-1) will choose a palette
579579 on every frame and will have better quality.
580580
581+ ``chafa ``
582+ Graphical output for the terminal, using chafa.
583+
584+ Note: the image output is not synchronized with other terminal
585+ output from mpv, which can lead to broken images.
586+ The option ``--really-quiet `` can help with that, and is recommended.
587+
588+ You may need to use ``--profile=sw-fast `` to get decent performance.
589+
590+ When the pixel mode is set to ``sixels ``, chafa has the same caveats that the
591+ ``sixel `` VO has. See those.
592+
593+ Sixel size and alignment options:
594+
595+ ``--vo-chafa-cols=<columns> ``, ``--vo-chafa-rows=<rows> `` (default: 0)
596+ Specify the terminal size in character cells, otherwise (0) read it
597+ from the terminal, or fall back to 80x25. Note that mpv doesn't use the
598+ the last row with chafa because this seems to result in scrolling.
599+
600+ ``--vo-chafa-width=<width> ``, ``--vo-chafa-height=<height> `` (default: 0)
601+ Specify the available size in pixels, otherwise (0) read it from the
602+ terminal, or fall back to 320x240. Other than excluding the last line,
603+ the height is also further rounded down to a multiple of 6 (chafa unit
604+ height) to avoid overflowing below the designated size.
605+
606+ ``--vo-chafa-left=<col> ``, ``--vo-chafa-top=<row> `` (default: 0)
607+ Specify the position in character cells where the image starts (1 is
608+ the first column or row). If 0 (default) then try to automatically
609+ determine it according to the other values and the image aspect ratio
610+ and zoom.
611+
612+ ``--vo-chafa-pad-x=<pad_x> ``, ``--vo-chafa-pad-y=<pad_y> `` (default: -1)
613+ Used only when mpv reads the size in pixels from the terminal.
614+ Specify the number of padding pixels (on one side) which are included
615+ at the size which the terminal reports. If -1 (default) then the number
616+ of pixels is rounded down to a multiple of number of cells (per axis),
617+ to take into account padding at the report - this only works correctly
618+ when the overall padding per axis is smaller than the number of cells.
619+
620+ ``--vo-chafa-config-clear=<yes|no> `` (default: yes)
621+ Whether or not to clear the terminal whenever the output is
622+ reconfigured (e.g. when video size changes).
623+
624+ ``--vo-chafa-alt-screen=<yes|no> `` (default: yes)
625+ Whether or not to use the alternate screen buffer and return the
626+ terminal to its previous state on exit. When set to no, the last
627+ chafa image stays on screen after quit, with the cursor following it.
628+
629+ ``--vo-chafa-pixel-mode=<pixel_mode> ``
630+ Selects the graphics protocol that chafa will render graphics with.
631+ Can be one of the below list
632+
633+ symbols (Default)
634+ Writes unicode characters to the terminal
635+ sixels
636+ Uses the sixel protocol to render graphics.
637+ kitty
638+ Uses the kitty image protocol to render graphics.
639+ iterm2
640+ Uses the iterm2 image protocol to render graphics.
641+
642+ ``--vo-chafa-canvas-mode=<canvas_mode> `` (default: truecolor)
643+ Selects the colorspace that chafa will render graphics with.
644+ Can be one of the below list as per chafa's documentation.
645+
646+ truecolor (Default)
647+ Truecolor (sRGB)
648+ 256
649+ 256 colors.
650+ 240
651+ 256 colors, but avoid using the lower 16 whose values vary between
652+ terminal environments.
653+ 16
654+ 16 colors using the aixterm ANSI extension.
655+ fgbg-bgfg
656+ Default foreground and background colors, plus inversion.
657+ fgbg
658+ Default foreground and background colors. No ANSI codes will be used.
659+ 8
660+ 8 colors, compatible with original ANSI X3.64.
661+ 16-8
662+ 16 FG colors (8 of which enabled with bold/bright) and 8 BG colors.
663+
664+
665+ chafa image quality options as per chafa's documentation:
666+
667+ ``--vo-chafa-dither=<algo> ``
668+ Selects the dither algorithm which chafa should apply.
669+ Can be one of the below list.
670+
671+ none (Default)
672+ Don't diffuse
673+ ordered
674+ Ordered dithering (Bayer or similar).
675+ diffusion
676+ Error diffusion dithering (Floyd-Steinberg or similar).
677+ noise
678+ Error diffusion dithering (Floyd-Steinberg or similar).
679+
680+ ``--vo-chafa-work-factor=<work_factor> `` (default: 50)
681+ Sets the work/quality tradeoff factor. A higher value means more time and memory will be spent towards a higher quality output.
682+
581683``image ``
582684 Output each frame into an image file in the current directory. Each file
583685 takes the frame number padded with leading zeros as name.
0 commit comments