Skip to content

firedotguy/textual-video

Repository files navigation

textual-video

Textual widget for playing videos in terminal UIs. Based on textual-image.

example

Installation

pip install textual-video

Dependencies

  • textual (TUI framework)
  • textual-image (image widget)
  • textual-canvas (canvas widget, for displaying track)
  • av (get video frames and metadata)
  • numpy (av requires)

Example

from textual_video.player import VideoPlayer
from textual.app import App, ComposeResult

class ExampleApp(App):
    def compose(self) -> ComposeResult:
        yield VideoPlayer(r'examples\video.mp4')

if __name__ == '__main__':
    ExampleApp().run()

Image types

Textual-image provides 4 ways to display image

Member Description
ImageType.SIXEL Slow; Highest fidelity; requires terminal sixel support.
ImageType.TGP ? (not work in my laptop)
ImageType.HALFCELL Fast; uses half-cell Unicode blocks.
ImageType.UNICODE Fastest; low fidelity, widest compatibility.

Todo

plan

About

Textual widget for playing videos

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Contributors

Languages