From 19913921eb9ee4c35de230c62c46d1591cf3326e Mon Sep 17 00:00:00 2001 From: Shreesh Adiga <16567adigashreesh@gmail.com> Date: Sun, 1 Nov 2020 16:43:31 +0530 Subject: 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. --- wscript_build.py | 1 + 1 file changed, 1 insertion(+) (limited to 'wscript_build.py') diff --git a/wscript_build.py b/wscript_build.py index 4de6bdbf27..14c254e1ec 100644 --- a/wscript_build.py +++ b/wscript_build.py @@ -497,6 +497,7 @@ def build(ctx): ( "video/out/vo_null.c" ), ( "video/out/vo_rpi.c", "rpi-mmal" ), ( "video/out/vo_sdl.c", "sdl2-video" ), + ( "video/out/vo_sixel.c", "sixel" ), ( "video/out/vo_tct.c" ), ( "video/out/vo_vaapi.c", "vaapi-x11 && gpl" ), ( "video/out/vo_vdpau.c", "vdpau" ), -- cgit v1.2.3