FFmpeg-SIXEL
lsix
FFmpeg-SIXEL | lsix | |
---|---|---|
3 | 5 | |
111 | 3,082 | |
- | - | |
10.0 | 4.3 | |
over 6 years ago | 6 months ago | |
C | Shell | |
GNU General Public License v3.0 or later | GNU General Public License v3.0 only |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
FFmpeg-SIXEL
-
A command line tool that draw plots on the terminal
Also:
https://github.com/saitoha/libsixel
contains img2sixel, which lets you dump images to the terminal. It can also do animated GIFs.
Video:
https://github.com/saitoha/FFmpeg-SIXEL
GUI apps:
https://github.com/saitoha/SDL1.2-SIXEL
and more, linked from the libsixel repository.
- Would it be possible to create a ascii movie player that runs entirely in the terminal?
-
Using ASCII waveforms to test real-time audio code
> I don’t see why sixels couldn’t work.
Sixels will work: they are fast enough to allow youtube video playback !!!
https://github.com/saitoha/FFmpeg-SIXEL/blob/sixel/README.md
But the problem is NOT THE FORMAT, the problem is the lack of tooling. links and w3m are among the rare text browsers that can display images in the console.
It's just a matter of the browser sending the image to something in some format, but if that hasn't be thought about as a possibility (say, for text reflow issues) it's going to be far more complicated than just adding a new format, as you will have to work both on say the text reflow issues (ex: how do you select the size of the placeholder, when expressed in characters?), and the picture display.
Personally, I do not care much about sixels, kitty or iterm format - all I want is to see some kind of support.
Yes, it would be better if that support was for the option that has the greatest chance of succeeding, but even that is a second concern: in the worst case, we can write transcoders to whatever format people prefer!
But when there is no "input" to transcode, you have a much bigger problem!
> an off the shelf ASCII plotting library probably involves less custom tooling
With a terminal like msys2 or xterm, no custom tooling is required: just use the regular gnuplot after doing the export for the desired resolution, font, and font size.
gnuplot is far more standard than plotting library that often require special Unicode fonts on top of requiring you to use their specific format.
lsix
-
Are We Sixel Yet
In XTerm, this (rightly) makes no difference. In Foot and Contour however, you still end up a line resp. a screen below where you started, if now with the correct horizontal position.
So it seems to me like what you want should work by default, except it doesn’t.
It should be possible to instead just treat the whole thing as a graphical overlay (by computing or directly asking for the character cell size, as Kirill Panov rightly admonishes me is possible with XTWINOPS) without touching the cursor; that’s what the “sixel scrolling” setting (DECSDM) is supposed to do. Then you can just manually move the cursor forward however many positions after you’re done drawing.
Except apparently the DEC manual (the VT330/340 one above) and DEC hardware contradict each other as to which setting of DECSDM (set or reset) corresponds to which scrolling state (enabled or disabled), and XTerm has implemented it according to the manual not the VT3xx[1,2,3]—then most other emulators followed suit[4]—then XTerm switched to following the hardware[5,6] (unless you and that’s what I’m seeing on my machine right now. So now you need to check if you’re on XTerm ≥ 369 or not[7]. If I’m reading the Notcurses code right, other terminals have followed suit[8].
Again, ouch.
P.S. It seems DEC had an internal doc for how their terminals should operate (DEC STD 070) [9]. It does not document DECSDM at all.
[1] https://github.com/wez/wezterm/issues/217#issuecomment-86449...
[2] https://github.com/hackerb9/lsix/issues/41
[3] https://github.com/dankamongmen/notcurses/issues/1782
[4] https://github.com/arakiken/mlterm/pull/23
[5] https://invisible-island.net/xterm/xterm.log.html#xterm_369
[6] https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h3-T...
[7] https://github.com/dankamongmen/notcurses/commit/0918fa251e2... (the correct version cutoff is 369 not 359, the patch contains a now-fixed bug)
[8] https://github.com/dankamongmen/notcurses/blob/master/src/li... (look for mentions of invertsixel)
[9] http://www.bitsavers.org/pdf/dec/standards/EL-SM070-00_DEC_S...
-
Quick roundup of bitmap graphics availability in free/open-source terminal emulators
Sixel - Sixel is a standard from the 1970's/1980's DEC VT series. It has enjoyed a tremendous resurgence in popularity thanks largely to saitoha's libsixel project. Many projects are now using sixel; a few you may have heard of include lsix, chafa, and notcurses.
-
Using ASCII waveforms to test real-time audio code
I would point out that sixels[0] exist. There is a nice library, libsixel[1] for working with it, which includes bindings into many languages. If the author of sixel-tmux[2][3] is to be believed[4], the relative lack of adoption is a result of unwillingness on the part of maintainers of some popular open source terminal libraries to implement sixel support.
I can't comment on that directly, but I will say, it's pretty damn cool to see GnuPlot generating output right into one's terminal. lsix[5] is also pretty handy as well.
But yeah, I agree, I'm not a fan of all the work that has gone into "terminal graphics" that are based on unicode. It's a dead-end, as was clear to DEC even back in '87 (and that's setting aside that the VT220[6] had it's own drawing capabilities, though they were more limited). Maybe sixel isn't the best possible way of handling this, but it does have the benefit of 34 years of backwards-compatibility, and with the right software, you can already use it _now_.
0 - https://en.wikipedia.org/wiki/Sixel
1 - https://saitoha.github.io/libsixel/
2 - https://github.com/csdvrx/sixel-tmux
3 - https://news.ycombinator.com/item?id=28756701
4 - https://github.com/csdvrx/sixel-tmux/blob/main/RANTS.md
5 - https://github.com/hackerb9/lsix
6 - https://en.wikipedia.org/wiki/VT220
- My favorite cli/tui programs:
-
The year of the GNU/Linux gaming rig is nigh!
no, I found it and it's called lsix
What are some alternatives?
sixel-tmux - sixel-tmux is a fork of tmux, with just one goal: having the most reliable support of graphics
ranger - A VIM-inspired filemanager for the console
melatonin_audio_sparklines - Sparklines For JUCE AudioBlocks
ttyplot - a realtime plotting utility for terminal/console with data input from stdin
kitty - Cross-platform, fast, feature-rich, GPU based terminal
plotext - plotting on terminal
Weechat - The extensible chat client.
Gin - A few extras for juce
fzf - :cherry_blossom: A command-line fuzzy finder
SDL1.2-SIXEL - SDL 1.2 with libsixel based video driver
glances - Glances an Eye on your system. A top/htop alternative for GNU/Linux, BSD, Mac OS and Windows operating systems.