invidtui

command module
v0.0.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 10, 2022 License: MIT Imports: 4 Imported by: 0

README

Go Report Card

invidtui

demo

invidtui is an invidious client, which fetches data from invidious instances and displays a user interface in the terminal(TUI), and allows for selecting and playing Youtube audio and video.

Currently, it is tested on Linux and Windows, and it should work on MacOS.

Features

  • Play audio or video
  • Search with history support
  • Control the video resolution
  • Ability to open, view, edit and save m3u8 playlists
  • Automatically queries the invidious API and selects the best instance

Requirements

  • MPV
  • Youtube-dl

Installation

You can install the package either via the following command: go install github.com/darkhz/invidtui@latest

or check the Releases page and download the binary that matches your OS and architecture.

Usage

invidtui [<flags>]

Flags:
  --video-res="720p"  Set the default video resolution.
  --close-instances   Close all currently running instances.
  --mpv-path="mpv"          Specify path to the mpv executable.
  --ytdl-path="youtube-dl"  Specify path to youtube-dl executable or its forks (yt-dlp, yt-dtlp_x86)
  --num-retries=100         Set the number of retries for connecting to the socket.

Keybindings

/
Show search input

Ctrl + e
Switch between search modes (video, playlist, channel)

Playlist Queue

p
Open playlist queue. This control will work across all pages.

Ctrl+o
Open saved playlist

Ctrl+s
Save current playlist queue

m
Move an item in playlist queue. To cancel a move, just press Enter in the same position the move operation was started.

d
Delete an item in playlist queue

Player

Note: These controls will work across all pages (search, playlist or channel pages)

Space
Pause/unpause

Right
Seek forward

Left
Seek backward

<
Switch to previous track

>
Switch to next track

s
Cycle shuffle mode (shuffle-playlist)

m
Cycle mute mode

l
Cycle repeat modes (repeat-file, repeat-playlist)

Shift+s
Stop player

Application

Ctrl+Z
Suspend

q
Quit

Page-based Keybindings

i
This control works on the search and channel playlist pages.
Fetches the Youtube playlist contents from the currently selected entry and displays it in a separate playlist page.
In case you have exited this page, you can come back to it by pressing Alt+i instead of reloading the playlist again.

u
This control works on the search page.
Fetches only videos from a Youtube channel (from the currently selected entry) and displays it in a separate channel video page.
Shift+u fetches only playlists from a Youtube channel and displays it in a separate channel playlist page. In case you have exited
this page, you can come back to it by pressing Alt+u instead of reloading the channel again.

Enter
This control works on the search, playlist, channel video and channel playlist pages.
Fetches more results.

a
This control works on the search, playlist and channel video list pages.
Fetches audio of the currently selected entry and adds it to the playlist.
If the selected entry is a playlist, all the playlist contents will be loaded into
the playlist queue as audio. To immediately play after adding to playlist, press Shift+a.

v
This control works on the search, playlist and channel video pages
Fetches video of the currently selected entry and adds it to the playlist.
If the selected entry is a playlist, all the playlist contents will be loaded into
the playlist queue as video. To immediately play after adding to playlist, press Shift+v.

Ctrl+x
Cancel the fetching of playlist or channel contents (in case it takes a long time,
due to slow network speeds for example).

Esc
Exit the current page.

Additional Notes

  • Since Youtube video titles may have many unicode characters (emojis for example), it is recommended to install noto-fonts and its variants (noto-fonts-emoji for example). Refer to your distro's documentation on how to install them. On Arch Linux for instance, you can install the fonts using pacman: pacman -S noto-fonts noto-fonts-emoji noto-fonts-extra

  • For the video mode, only MP4 videos will be played, and currently there is no way to modify this behavior. This will change in later versions.

  • The close-instances option should mainly be used if another invidtui instance may be using the socket, if there was an application crash, or if an error pops up like this: Error: Socket exists at /home/test/.config/invidtui/socket, is another instance running?.

  • On Windows, using invidtui in Powershell/CMD will work, but use Windows Terminal for best results.

Bugs

  • Video streams from an invidious instance that are other than 720p or 360p can't currently be played properly when loaded from a saved playlist (only video will be played, audio won't), since we need to merge the audio and video streams, and I have yet to find a way to do that via the m3u8 playlist spec.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL