A terminal-based video player that converts videos to ASCII art.
Project description
ASCII Flix
ASCII Flix is a terminal-based video player that converts videos into ASCII art. This project allows users to watch videos in their terminal by displaying them as ASCII characters.
Features
- Convert video frames into ASCII art.
- Supports both "normal" and "filled" ASCII modes.
- Extract and play audio using
pygame.
Usage
You can use ASCII Flix by running the command ascii-flix after installing the package.
Video Requirements
To play a video on ASCII Flix, the video must be downloaded on your device in MP4 format.
Getting the Path of the Video
For those who are unsure how to get the path of the video file:
-
Windows:
- Navigate to the folder containing your video.
- Right-click on the video file.
- Select "Properties".
- In the "General" tab, you will see the "Location" of the file. Combine this with the file name to get the full path. For example, if the location is
C:\Users\YourName\Videosand the file name isexample.mp4, the full path will beC:\Users\YourName\Videos\example.mp4.
-
Mac/Linux:
- Open the terminal.
- Navigate to the directory containing your video using the
cdcommand. - Use the
pwdcommand to print the current directory path. - Combine this path with the video file name. For example, if
pwdoutputs/home/yourname/videosand your file isexample.mp4, the full path will be/home/yourname/videos/example.mp4.
Manual Script Addition
In rare cases where the ascii-flix command does not work after installation, you can manually add the script:
-
Locate your Python scripts directory:
- Windows: This is usually located in
C:\Users\YourName\AppData\Local\Programs\Python\PythonXX\ScriptsorC:\Users\YourName\AppData\Roaming\Python\PythonXX\Scripts(replaceXXwith your Python version). - Mac/Linux: This is usually located in
/usr/local/binor/usr/bin.
- Windows: This is usually located in
-
Create a new script file named
ascii-flix(without any extension) in the scripts directory. -
Open the file in a text editor and add the following lines:
#!/usr/bin/env python from modules import HomeScreen, VideoPlayer def main_function(): video_player = VideoPlayer() homescr = HomeScreen() homescr.create_logo() homescr.display_home_screen(video_player=video_player) if __name__ == "__main__": main_function()
-
Save the file and make it executable:
- Mac/Linux: Run
chmod +x /path/to/ascii-flixin the terminal.
- Mac/Linux: Run
-
Ensure the scripts directory is in your PATH:
- Windows: Add the scripts directory to your PATH environment variable.
- Mac/Linux: Add
export PATH="/path/to/scripts:$PATH"to your~/.bashrcor~/.zshrcfile and runsource ~/.bashrcorsource ~/.zshrc.
After these steps, you should be able to run the ascii-flix command from any terminal window.
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 ascii_flix-0.24.tar.gz.
File metadata
- Download URL: ascii_flix-0.24.tar.gz
- Upload date:
- Size: 5.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5e9c0a5515fed2dc91a7b9300d7112f4bb1f129cab7de508befcdbf80e5c737e
|
|
| MD5 |
6c2945f5ec59acc80da3ee8ed1370c55
|
|
| BLAKE2b-256 |
15610292937e1ca2c86f67f252e0aa4212830e9f38534cd9ee0eb597f651cd17
|
File details
Details for the file ascii_flix-0.24-py3-none-any.whl.
File metadata
- Download URL: ascii_flix-0.24-py3-none-any.whl
- Upload date:
- Size: 6.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
17b563b888fd61e3e51c8511069a07c498acb3162fdaced6466af7be8ef8975f
|
|
| MD5 |
fc8411c42d1b30eddfd973dcddbaaa90
|
|
| BLAKE2b-256 |
3a8e70480fb5b9dbc7ca11acc40c659dd31627274e102705a8d3d2a175e866a7
|