summaryrefslogtreecommitdiffstats
path: root/DOCS/man
diff options
context:
space:
mode:
authorShreesh Adiga <16567adigashreesh@gmail.com>2020-11-01 16:43:31 +0530
committerAvi Halachmi (:avih) <avihpit@yahoo.com>2020-11-07 18:51:49 +0200
commit19913921eb9ee4c35de230c62c46d1591cf3326e (patch)
tree432ddcb28063d6150ca85b7e4e6e0cd77c11c600 /DOCS/man
parentdfa5ae2ad61cba4fab850a41779ce95332c27935 (diff)
downloadmpv-19913921eb9ee4c35de230c62c46d1591cf3326e.tar.bz2
mpv-19913921eb9ee4c35de230c62c46d1591cf3326e.tar.xz
video/out/vo_sixel.c: Implement sixel as a output device
Based on the implementation of ffmpeg's sixel backend output written by Hayaki Saito https://github.com/saitoha/FFmpeg-SIXEL/blob/sixel/libavdevice/sixel.c Sixel is a protocol to display graphics in a terminal. This commit adds support to play videos on a sixel enabled terminal using libsixel. With --vo=sixel, the output will be in sixel format. The input frame will be scaled to the user specified resolution (--vo-sixel-width and --vo-sixel-height) using swscaler and then encoded using libsixel and output to the terminal. This method requires high cpu and there are high frame drops for 720p and higher resolution videos and might require using lesser colors and have drop in quality. Docs have all the supported options listed to fine tune the output quality. TODO: A few parameters of libsixel such as the sixel_encode_policy and the SIXEL_XTERM16 variables are hardcoded, might want to expose them as command line options. Also the initialization resolution is not automatic and if the user doesn't specify the dimensions, it picks 320x240 as the default resolution which is not optimal. So need to automatically pick the best fit resolution for the current open terminal window size.
Diffstat (limited to 'DOCS/man')
-rw-r--r--DOCS/man/vo.rst68
1 files changed, 68 insertions, 0 deletions
diff --git a/DOCS/man/vo.rst b/DOCS/man/vo.rst
index 570e244e5c..be5be2e91e 100644
--- a/DOCS/man/vo.rst
+++ b/DOCS/man/vo.rst
@@ -363,6 +363,74 @@ Available video output drivers are:
``--vo-tct-256=<yes|no>`` (default: no)
Use 256 colors - for terminals which don't support true color.
+``sixel``
+ Sixel graphics video output driver based on libsixel that works on a
+ console that has sixel graphics enabled such as ``xterm`` or ``mlterm``.
+ Additionally some terminals have limitation on the dimensions, so may
+ not display images bigger than 1000x1000 for example. Make sure that
+ ``img2sixel`` can display images of the corresponding resolution.
+ You may need to use ``--profile=sw-fast`` to get decent performance.
+
+ Note: the Sixel image output is not synchronized with other terminal output
+ from mpv, which can lead to broken images. The option ``--really-quiet``
+ can help with that, and is recommended.
+
+ ``--vo-sixel-diffusion=<algo>``
+ Selects the diffusion algorithm for dithering used by libsixel.
+ Can be one of the below list as per libsixel's documentation.
+
+ auto
+ Choose diffuse type automatically
+ none
+ Don't diffuse
+ atkinson
+ Diffuse with Bill Atkinson's method. (Default)
+ fs
+ Diffuse with Floyd-Steinberg method
+ jajuni
+ Diffuse with Jarvis, Judice & Ninke method
+ stucki
+ Diffuse with Stucki's method
+ burkes
+ Diffuse with Burkes' method
+ arithmetic
+ Positionally stable arithmetic dither
+ xor
+ Positionally stable arithmetic xor based dither
+
+ ``--vo-sixel-width=<width>`` ``--vo-sixel-height=<height>``
+ The output video resolution will be set to width and height
+ These default to 320x240 if not set. The terminal window must
+ be bigger than this resolution to have smooth playback.
+ Additionally the last row will be a blank line and can't be
+ used to display pixel data.
+
+ ``--vo-sixel-fixedpalette=<0|1>`` (default: 0)
+ Use libsixel's built-in static palette using the XTERM256 profile
+ for dither. Fixed palette uses 256 colors for dithering.
+
+ ``--vo-sixel-reqcolors=<colors>`` (default: 256)
+ Setup libsixel to use required number of colors for dynamic palette.
+ This value depends on the console as well. Xterm supports 256.
+ Can set this to a lower value for faster performance.
+ This option has no effect if fixed palette is used.
+
+ ``--vo-sixel-color-threshold=<threshold>`` (default: 0)
+ This threshold value is used in dynamic palette mode to
+ recompute the palette based on the scene changes.
+
+ ``--vo-sixel-offset-top=<top>`` (default: 1)
+ The output video playback will start from the specified row number.
+ If this is greater than 1, then those many rows will be skipped.
+ This option can be used to shift video below in the terminal.
+ If it is greater than number of rows in terminal, then it is ignored.
+
+ ``--vo-sixel-offset-left=<left>`` (default: 1)
+ The output video playback will start from the specified column number.
+ If this is greater than 1, then those many columns will be skipped.
+ This option can be used to shift video to the right in the terminal.
+ If it is greater than number of columns in terminal, then it is ignored.
+
``image``
Output each frame into an image file in the current directory. Each file
takes the frame number padded with leading zeros as name.