LinuxCommandLibrary

tv

Grab TV listings

TLDR

Launch with the default channel

$ tv
copy

Open a specific channel
$ tv [files|env|git-repos|...]
copy

List all available channels
$ tv list-channels
copy

Fuzzy-pick from lines piped on stdin
$ [command] | tv
copy

Pipe and show a live preview for each entry
$ [command] | tv --preview '[preview_command]'
copy

Build a picker from commands (source + preview)
$ tv --source-command '[source_command]' --preview-command '[preview_command]' --preview-size [70]
copy

Update and install community-maintained channels
$ tv update-channels
copy

SYNOPSIS

tv [options] <file_path>
Note: This synopsis is based on the common usage pattern of similar utilities like `ttv` (tmux TV),
which `tv` might alias or refer to. The exact syntax can vary if `tv` is a different custom script or alias.

PARAMETERS

-p
    Pause playback upon starting.

-r <fps>
    Specify the playback framerate in frames per second (e.g., -r 15).

-s <scale>
    Set the output scaling factor (e.g., -s 0.5 for half size).

-a
    Attempt to preserve the actual aspect ratio, rather than forcing 2:1 character aspect.

-f
    Force playback even if a tmux session is not detected (use with caution).

-c
    Loop the media playback continuously.

-d
    Enable dithered color output for potentially smoother gradients.

-x
    Use extended ANSI colors (256 colors) for richer color representation.

-g
    Force grayscale output.

-u
    Use Unicode block characters for a higher-resolution, block-based display.

-w <width>
    Set a fixed output width for the display.

-h <height>
    Set a fixed output height for the display.

DESCRIPTION

The tv command is not a standard, pre-installed utility in most Linux distributions.
Its behavior is typically user-defined, often existing as a shell alias or a custom script within a user's environment.
When encountered, tv might be an abbreviation or a misremembered reference to a specific tool.
One prominent project that closely aligns with the concept of "TV" in a terminal environment is
ttv (tmux TV). This analysis focuses on the functionality provided by ttv, which is a shell script designed to render
video files, animated GIFs, or still images directly within a tmux terminal multiplexer session.
It leverages tools like ffmpeg to decode media and then displays frames as ASCII or Unicode characters.
Therefore, if you encounter a `tv` command, it is most likely a custom shortcut to a media player
(like `mpv` or `vlc`) or, more specifically, to the ttv script for terminal-based media display.
Without context, its exact function cannot be definitively determined.

CAVEATS

The `tv` command is not part of standard Linux utilities; its existence and functionality are entirely dependent on user configuration or third-party scripts.
The functionality described herein largely pertains to the `ttv` (tmux TV) script, which requires:
1. A running tmux session for optimal performance and display.
2. The ffmpeg multimedia framework to decode video and image files.
3. A terminal emulator with good ANSI/Unicode support.
Without these prerequisites, the `ttv` script (and thus any `tv` alias pointing to it) may not function correctly or at all.
Performance can vary significantly based on terminal capabilities, system resources, and media file complexity.

CHECKING FOR A `<B><I>TV</I></B>` ALIAS OR SCRIPT

To determine what `tv` does on your system, you can use:
`type tv` or `which tv`.
If it's an alias, `type` will show its definition.
If it's a script, `which` will show its path, and you can inspect the script content (`cat $(which tv)`).
If neither command returns anything, `tv` is not defined in your current shell's PATH or aliases.

`<B><I>TTV</I></B>` INSTALLATION AND USAGE

The `ttv` script typically involves cloning its Git repository and placing the script in your `PATH`.
It also requires `ffmpeg` to be installed.
Basic usage would be `ttv video.mp4` or `tv video.mp4` if aliased.
Ensure your terminal supports the character sets (`LANG` environment variable) and color depths
(`TERM` environment variable) that `ttv` utilizes for best results.

HISTORY

As `tv` is not a standard command, it lacks a formal development history.
However, the concept of displaying multimedia in a terminal, which `tv` might represent (specifically via `ttv`),
has roots in ASCII art and character-based graphics that predate modern graphical interfaces.
The `ttv` script itself emerged from the desire to watch videos or animated content within a `tmux` session,
a popular environment for developers and system administrators.
It leverages existing robust tools like `ffmpeg`, integrating them to achieve terminal-native multimedia playback,
offering a unique way to consume media without leaving the command line environment.

SEE ALSO

alias(1), tmux(1), ffmpeg(1), mpv(1), vlc(1), jp2a(1), img2txt(1)

Copied to clipboard