This program play video by tty and capable to output video into text file.
Project description
termpix
Draw images in an ANSI terminal! Requires that your terminal can show ANSI colours, and uses a font that can show the 'bottom half block' character (▄).
Usage:
python3.9 termpix.py <filename|url> [--true-color|--true-colour] [--output output.txt] \
[--width <width>] [--height <height>]
filename or url can be any image file readable by the python 'PIL' library or can be any video file readable by imageio. It also supports HEIC format, if pyheif and libffi libheif are installed. If you type camera as the filename, you can view your webcam video.
It will fill as much of the terminal as possible, while keeping the aspect ratio of the input image. Use --width or --height to override this.
Try this command:
python3.9 termpix.py \
https://img.blogs.es/anexom/wp-content/uploads/2020/10/mario-destacada_E.jpg \
--true-color
And you will see:
This library is also extended to play video in terminal (with audio), you can try the
python3.9 termpix.py <mp4_filename>
This project is much inspired by the following repository:
Installation
for ubuntu, perform commands below to install software packages at first:
sudo apt-get install -y portaudio19-dev ffmpeg
then install python packages (recommend to install them in your own virtual environment, python3.x):
pip3 install -r requirements.txt
License
Apache 2.0 license
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file termpix-0.5.3.tar.gz.
File metadata
- Download URL: termpix-0.5.3.tar.gz
- Upload date:
- Size: 994.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b223aa5cfda46ddc04276f5d15977ecdffcac692c3e6235b90e891ac428b8ab9
|
|
| MD5 |
3a09b261141acb112dec2d648d726c09
|
|
| BLAKE2b-256 |
3861c7c07f0728991b7f8353df75e93dcd604791b5a1004fd812d8d36d4e21ca
|
File details
Details for the file termpix-0.5.3-py3-none-any.whl.
File metadata
- Download URL: termpix-0.5.3-py3-none-any.whl
- Upload date:
- Size: 993.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f281a816656e9211da54b3d23976349c41a0ed5f82f295d6ad34d1605b489b0f
|
|
| MD5 |
e82ead49018816ba5db1b73a54f2fcb5
|
|
| BLAKE2b-256 |
3eed777307c72faecf740bf488c31c16c32448f44705589860ae2bfa02144e4f
|