effortlessly watch videos directly in your terminal
with support for local, remote or YouTube videos
Report Bug
·
Request Feature
Window is a terminal-based video player that allows you to watch videos directly in your terminal. It supports local, remote, and YouTube videos assisted by hardware accelerated decoding
Demo of Window playing a YouTube video in block mode, and then halfway in ASCII mode
Note: I use Alacritty as my terminal application which is very performant, your mileage may vary depending on how optimized your terminal is for this kind of application
-
Variety of Video Sources
- Local File: Seamlessly play videos stored on your local machine.
- Remote File: Stream videos directly from remote URLs, ensuring flexibility and convenience.
- YouTube Video (using yt-dlp):
- Video on Demand (VOD): Access and play YouTube videos on demand, with support for various formats and qualities.
- Live: Watch live streams from YouTube in real-time, providing a unique and dynamic viewing experience.
- Live Stream: Support for various live streaming protocols, allowing you to watch live broadcasts from different platforms and sources.
-
Hardware Acceleration
- Enhanced Performance: Leverages hardware acceleration to optimize decoding of video streams, reducing CPU usage and providing smoother playback.
- Multi-Platform Support: Compatible with a wide range of hardware, ensuring optimal performance across different devices and operating systems.
- Error handling
- Full screen mode
- Resizing (Needs a new decoder stream)
- Tests
- Audio??? (Either chopped into length of frame or just kept in sync)
- Subtitles??? (Perhaps as text or just baked in)
- Better color accuracy
- Add inputs like pausing/skipping
- Statically linked binaries
$ docker run -it --rm danonline/window:latest --help
$ docker run -it --rm danonline/window:latest "https://www.youtube.com/watch?v=dQw4w9WgXcQ"Note: Window requires ffmpeg libraries to be installed, for more information check here
Note: Window requires yt-dlp installed in order to use the youtube feature. You can install it by running
pip install yt-dlp.
Check out the releases page for the latest binaries.
Usage: window [OPTIONS] <INPUT>
Arguments:
<INPUT> The video file location, url, or youtube link
Options:
-p, --pixel-clear-distance <PIXEL_CLEAR_DISTANCE>
Distance from the previous pixel to replace 0 will update every pixel at the cost of performance [default: 2]
-m, --mode <MODE>
The character mode to use [default: block] [possible values: block, dots, ascii, ascii-extended, ascii-windows, numbers, blocks]
-s, --scale <SCALE>
The scale mode to use [default: fit] [possible values: fit, stretch]
-r, --remove-fps-cap
Allow the framerate to exceed the video's framerate
--hw-accel <HW_ACCEL>
The hardware acceleration device to use [default: none] [possible values: none, vdpau, cuda, va-api, dxva2, qsv, video-toolbox, d3d11-va, drm, open-cl, meia-codec, vulkan, d3d12-va]
-f, --fullscreen
Whether to use fullscreen
-n, --no-color
Render without color
-h, --help
Print help (see more with '--help')
-V, --version
Print versionDistributed under the MIT License. See LICENSE for more information.
DanCodes - [email protected]
Project Link: https://github.com/dan-online/window
