2021-01-18 14:22:54 -05:00
% ncplayer(1)
2020-01-14 15:50:16 -05:00
% nick black < nickblack @linux .com >
2024-10-02 17:27:41 -04:00
% v3.0.10
2020-01-14 15:50:16 -05:00
# NAME
2021-01-18 14:22:54 -05:00
ncplayer - Render images and video to a terminal
2020-01-14 15:50:16 -05:00
# SYNOPSIS
2021-06-22 09:49:48 -04:00
**ncplayer** [**-h**] [**-V**] [**-q**] [**-d** ** *delaymult***] [**-l** ** *loglevel***] [**-b** ** *blitter***] [**-s** ** *scalemode***] [**-k**] [**-L**] [**-t** ** *seconds***] [**-n**] [**-a** ** *color***] files
2020-01-14 15:50:16 -05:00
# DESCRIPTION
2021-01-18 14:22:54 -05:00
**ncplayer** uses a multimedia-enabled Notcurses to render images and videos to a
terminal. By default, **stretch** -type scaling is used to fill the rendering
2021-11-11 11:42:03 -05:00
area, and the highest-quality blitter available is employed.
2020-01-14 15:50:16 -05:00
# OPTIONS
2020-12-18 18:29:04 -05:00
**-d** ** *delaymult***: Apply a non-negative rational multiplier to the delayscale.
2021-02-14 19:23:51 -05:00
Only applies to multiframe media such as video and animated images. Not supported with ** -k**.
2020-01-14 15:50:16 -05:00
2020-12-18 18:29:04 -05:00
**-t** ** *seconds***: Delay **seconds** after each file. If this option is used,
the "press any key to continue" prompt will not be displayed. **seconds** may
be any non-negative number.
2020-01-14 15:50:16 -05:00
2021-08-04 14:59:37 -04:00
**-l** ** *loglevel***: Log between everything (loglevel 7) and nothing (loglevel 0) to stderr.
2020-01-17 04:31:46 -05:00
2020-12-25 18:25:44 -05:00
**-s** ** *scalemode***: Scaling mode, one of **none** , **hires** , **scale** , **scalehi** , or **stretch** .
2020-12-18 18:29:04 -05:00
2021-02-27 16:06:31 -05:00
**-b** ** *blitter***: Blitter, one of **ascii** , **half** , **quad** , **sex** , **braille** , or **pixel** .
2020-10-17 19:52:19 -04:00
2020-04-29 03:24:11 -04:00
**-m margins**: Define rendering margins (see below).
2021-02-14 19:23:51 -05:00
**-L**: Loop frames until a key is pressed. Not supported with ** -k**.
2020-10-20 23:49:09 -04:00
2021-02-14 19:23:51 -05:00
**-k**: Use direct mode (see **notcurses_direct(3)** ). This will have the effect of leaving the output on-screen after program exit, and generating it inline (rather than clearing the screen and placing it at the top). Not supported with ** -L** or ** -d**.
2020-04-29 03:08:21 -04:00
2021-02-09 18:50:20 -05:00
**-q**: Print neither frame/timing information along the top of the screen, nor the output summary on exit.
2020-10-18 18:46:04 -04:00
2021-06-22 09:49:48 -04:00
**-a**: Treat ** *color*** as if it were transparent.
2021-04-10 11:41:31 -04:00
2021-06-09 03:21:39 -04:00
**-n**: Use non-interpolative scaling. The result is usually less pleasing to the eye, but it doesn't introduce new colors.
2020-12-31 02:28:47 -05:00
**-V**: Print the program name and version, and exit with success.
2020-10-18 18:46:04 -04:00
**-h**: Print help information, and exit with success.
2020-01-14 15:50:16 -05:00
files: Select which files to render, and what order to render them in.
Fully general ncvisual layer (#647)
This represents an essentially complete rewrite of ncvisual and associated code. It had two major goals:
Improve the ncvisual API based off lessons learned, pursuant to the upcoming API freeze. In particular, I wanted to:
decouple ncvisuals from ncplanes. It should be possible to render a ncvisual to multiple planes, with different scaling each time. It should be possible to create an ncvisual without a plane, etc.
normalize the various ways of constructing an ncvisual -- file, memory, plane, etc.
Support multiple blitters, from 7-bit ASCII to Sixel. This required writing the blitters in several cases, and they're not yet in their final implementations (but the API is fine)
I have not yet unified Plots and Visuals, and might not, given that the Plot code works fine. We could at this point implement Plots in terms of Visuals, though -- the blitter backend range has been unified. Sixel is not yet implemented, though it is listed.
There is a new POC tool, blitter. It renders its arguments using all possible blitter+scaling combinations. Another new POC, resize, displays its argument, then resizes it to the screen size and displays that, explicitly making use of ncvisual_resize() rather than a scaling parameter to ncvisual_render().
This also eliminates some memory leaks and bugs we were seeing in trunk, and brings in Sixel scaffolding.
The C++ wrapper will also need patching back up; I cut most of it down while wrestling with this crap, urk.
Closes #638, #562, and #622.
2020-05-28 21:16:58 -04:00
Default margins are all 0 and default scaling is **stretch** . The full
rendering area will thus be used. Using ** -m**, margins can be supplied.
Provide a single number to set all four margins to the same value, or four
comma-delimited values for the top, right, bottom, and left margins
2021-04-16 02:23:52 -04:00
respectively. Top, right, and bottom margins are ignored when ** -k** is used.
Negative margins are illegal.
Fully general ncvisual layer (#647)
This represents an essentially complete rewrite of ncvisual and associated code. It had two major goals:
Improve the ncvisual API based off lessons learned, pursuant to the upcoming API freeze. In particular, I wanted to:
decouple ncvisuals from ncplanes. It should be possible to render a ncvisual to multiple planes, with different scaling each time. It should be possible to create an ncvisual without a plane, etc.
normalize the various ways of constructing an ncvisual -- file, memory, plane, etc.
Support multiple blitters, from 7-bit ASCII to Sixel. This required writing the blitters in several cases, and they're not yet in their final implementations (but the API is fine)
I have not yet unified Plots and Visuals, and might not, given that the Plot code works fine. We could at this point implement Plots in terms of Visuals, though -- the blitter backend range has been unified. Sixel is not yet implemented, though it is listed.
There is a new POC tool, blitter. It renders its arguments using all possible blitter+scaling combinations. Another new POC, resize, displays its argument, then resizes it to the screen size and displays that, explicitly making use of ncvisual_resize() rather than a scaling parameter to ncvisual_render().
This also eliminates some memory leaks and bugs we were seeing in trunk, and brings in Sixel scaffolding.
The C++ wrapper will also need patching back up; I cut most of it down while wrestling with this crap, urk.
Closes #638, #562, and #622.
2020-05-28 21:16:58 -04:00
Scaling mode **stretch** resizes the object to match the target rendering
2021-03-12 18:13:19 -05:00
area exactly. Unless a blitter is specified with ** -b**, **stretch** will use
2021-11-11 11:42:03 -05:00
the highest-resolution blitter available. **scale** resizes the object so that
the longer edge of the rendering area is matched exactly, and the other edge is
changed to maintain aspect ratio. **none** uses the original image size. Both
**scale** and **none** aim for a 1:1 aspect ratio, and will thus prefer **half**
to **quad** , **sex** , or **braille** . **scalehi** and **hires** use the
highest-resolution blitter available.
2021-03-12 18:13:19 -05:00
2021-03-14 04:12:57 -04:00
Blitters can be selected at runtime by pressing '0' through '6'.
2021-03-12 18:13:19 -05:00
**NCBLIT_DEFAULT** corresponds to '0'. The various blitters are described in
2021-03-14 04:12:57 -04:00
**notcurses_visual(3)**. If a blitter cannot be used in the current environment,
the current blitter will be retained.
2021-03-12 18:13:19 -05:00
Multiframe media can be paused with space. Press space (or any other valid
control) to resume.
2020-06-05 11:51:05 -04:00
2020-01-14 15:50:16 -05:00
# NOTES
2020-02-11 20:46:39 -05:00
2021-02-09 18:46:21 -05:00
If you're looking for a fast, inline image viewer for the shell, try using
**ncplayer -k -t0 -q**.
2020-01-14 15:50:16 -05:00
Optimal display requires a terminal advertising the **rgb** terminfo(5)
capability, or that the environment variable **COLORTERM** is defined to
2020-02-11 20:46:39 -05:00
**24bit** (and that the terminal honors this variable), along with a
fixed-width font with good coverage of the Unicode Block Drawing Characters.
2020-01-14 15:50:16 -05:00
2021-02-14 19:23:51 -05:00
# BUGS
2021-04-14 18:59:23 -04:00
Direct mode is kinda fundamentally suboptimal for multiframe media, and
2021-04-16 02:23:52 -04:00
is not yet supported with ** -L** nor ** -d**. Top, right, and bottom
margins are ignored without warning when using direct mode.
2021-02-14 19:23:51 -05:00
2020-01-14 15:50:16 -05:00
# SEE ALSO
2020-02-11 20:46:39 -05:00
**notcurses(3)**,
2021-02-14 18:38:28 -05:00
**notcurses_direct(3)**,
2020-06-03 16:32:27 -04:00
**notcurses_visual(3)**,
2020-02-11 20:46:39 -05:00
**terminfo(5)**,
**unicode(7)**