Skip to content

Commit 9681da8

Browse files
committed
ffmpeg bin fix
1 parent a79190a commit 9681da8

File tree

11 files changed

+494
-154
lines changed

11 files changed

+494
-154
lines changed

.github/workflows/build-and-release.yml

Lines changed: 99 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -9,58 +9,120 @@ permissions:
99
contents: write
1010

1111
jobs:
12-
build-linux:
13-
name: Build on Linux
12+
build-linux-64:
13+
name: Build on Linux x86_64
1414
runs-on: ubuntu-latest
1515
steps:
1616
- uses: actions/checkout@v4
17-
1817
- name: Set up Python
1918
uses: actions/setup-python@v4
2019
with:
2120
python-version: 3.11
22-
2321
- name: Install dependencies
2422
run: |
2523
python -m pip install --upgrade pip
2624
pip install -r requirements.txt
2725
pip install pyinstaller
26+
- name: Build Executable
27+
run: pyinstaller --onefile --noconfirm --add-data "BadApple.mp4:." --add-data "ffmpeg_bin/linux-64.7z:." vidminal.py
28+
- name: Rename Executable
29+
run: mv dist/vidminal dist/vidminal-linux-64
30+
- name: Upload Artifact
31+
uses: actions/upload-artifact@v4
32+
with:
33+
name: vidminal-linux-64
34+
path: dist/vidminal-linux-64
2835

36+
build-linux-32:
37+
name: Build on Linux x86_32
38+
runs-on: ubuntu-latest
39+
steps:
40+
- uses: actions/checkout@v4
41+
- name: Set up Python
42+
uses: actions/setup-python@v4
43+
with:
44+
python-version: 3.11
45+
- name: Install dependencies
46+
run: |
47+
python -m pip install --upgrade pip
48+
pip install -r requirements.txt
49+
pip install pyinstaller
2950
- name: Build Executable
30-
run: pyinstaller --onefile --noconfirm --add-data "BadApple.mp4:." --add-data "linux.7z:." vidminal.py
51+
run: pyinstaller --onefile --noconfirm --add-data "BadApple.mp4:." --add-data "ffmpeg_bin/linux-32.7z:." vidminal.py
52+
- name: Rename Executable
53+
run: mv dist/vidminal dist/vidminal-linux-32
54+
- name: Upload Artifact
55+
uses: actions/upload-artifact@v4
56+
with:
57+
name: vidminal-linux-32
58+
path: dist/vidminal-linux-32
3159

60+
build-linux-arm-64:
61+
name: Build on Linux ARM 64
62+
runs-on: ubuntu-latest
63+
steps:
64+
- uses: actions/checkout@v4
65+
- name: Set up Python
66+
uses: actions/setup-python@v4
67+
with:
68+
python-version: 3.11
69+
- name: Install dependencies
70+
run: |
71+
python -m pip install --upgrade pip
72+
pip install -r requirements.txt
73+
pip install pyinstaller
74+
- name: Build Executable
75+
run: pyinstaller --onefile --noconfirm --add-data "BadApple.mp4:." --add-data "ffmpeg_bin/linux-arm-64.7z:." vidminal.py
3276
- name: Rename Executable
33-
run: mv dist/vidminal dist/vidminal-linux
77+
run: mv dist/vidminal dist/vidminal-linux-arm-64
78+
- name: Upload Artifact
79+
uses: actions/upload-artifact@v4
80+
with:
81+
name: vidminal-linux-arm-64
82+
path: dist/vidminal-linux-arm-64
3483

84+
build-linux-armhf-32:
85+
name: Build on Linux ARMHF 32
86+
runs-on: ubuntu-latest
87+
steps:
88+
- uses: actions/checkout@v4
89+
- name: Set up Python
90+
uses: actions/setup-python@v4
91+
with:
92+
python-version: 3.11
93+
- name: Install dependencies
94+
run: |
95+
python -m pip install --upgrade pip
96+
pip install -r requirements.txt
97+
pip install pyinstaller
98+
- name: Build Executable
99+
run: pyinstaller --onefile --noconfirm --add-data "BadApple.mp4:." --add-data "ffmpeg_bin/linux-armhf-32.7z:." vidminal.py
100+
- name: Rename Executable
101+
run: mv dist/vidminal dist/vidminal-linux-armhf-32
35102
- name: Upload Artifact
36103
uses: actions/upload-artifact@v4
37104
with:
38-
name: vidminal-linux
39-
path: dist/vidminal-linux
105+
name: vidminal-linux-armhf-32
106+
path: dist/vidminal-linux-armhf-32
40107

41108
build-windows:
42109
name: Build on Windows
43110
runs-on: windows-latest
44111
steps:
45112
- uses: actions/checkout@v4
46-
47113
- name: Set up Python
48114
uses: actions/setup-python@v4
49115
with:
50116
python-version: 3.11
51-
52117
- name: Install dependencies
53118
run: |
54119
python -m pip install --upgrade pip
55120
pip install -r requirements.txt
56121
pip install pyinstaller
57-
58122
- name: Build Executable
59-
run: pyinstaller --onefile --noconfirm --add-data "BadApple.mp4;." --add-data "windows.7z;." vidminal.py
60-
123+
run: pyinstaller --onefile --noconfirm --add-data "BadApple.mp4;." --add-data "ffmpeg_bin/windows.7z;." vidminal.py
61124
- name: Rename Executable
62125
run: Rename-Item -Path dist\vidminal.exe -NewName vidminal-windows.exe
63-
64126
- name: Upload Artifact
65127
uses: actions/upload-artifact@v4
66128
with:
@@ -72,24 +134,19 @@ jobs:
72134
runs-on: macos-latest
73135
steps:
74136
- uses: actions/checkout@v4
75-
76137
- name: Set up Python
77138
uses: actions/setup-python@v4
78139
with:
79140
python-version: 3.11
80-
81141
- name: Install dependencies
82142
run: |
83143
python -m pip install --upgrade pip
84144
pip install -r requirements.txt
85145
pip install pyinstaller
86-
87146
- name: Build Executable
88-
run: pyinstaller --onefile --noconfirm --add-data "BadApple.mp4:." --add-data "mac.7z:." vidminal.py
89-
147+
run: pyinstaller --onefile --noconfirm --add-data "BadApple.mp4:." --add-data "ffmpeg_bin/mac.7z:." vidminal.py
90148
- name: Rename Executable
91149
run: mv dist/vidminal dist/vidminal-macos
92-
93150
- name: Upload Artifact
94151
uses: actions/upload-artifact@v4
95152
with:
@@ -99,31 +156,46 @@ jobs:
99156
release:
100157
name: Create GitHub Release
101158
runs-on: ubuntu-latest
102-
needs: [build-linux, build-windows, build-macos]
159+
needs: [build-linux-64, build-linux-32, build-linux-arm-64, build-linux-armhf-32, build-windows, build-macos]
103160
steps:
104-
- name: Download Linux Artifact
161+
- name: Download Linux x86_64 Artifact
105162
uses: actions/download-artifact@v4
106163
with:
107-
name: vidminal-linux
164+
name: vidminal-linux-64
165+
path: ./release
166+
- name: Download Linux x86_32 Artifact
167+
uses: actions/download-artifact@v4
168+
with:
169+
name: vidminal-linux-32
170+
path: ./release
171+
- name: Download Linux ARM 64 Artifact
172+
uses: actions/download-artifact@v4
173+
with:
174+
name: vidminal-linux-arm-64
175+
path: ./release
176+
- name: Download Linux ARMHF 32 Artifact
177+
uses: actions/download-artifact@v4
178+
with:
179+
name: vidminal-linux-armhf-32
108180
path: ./release
109-
110181
- name: Download Windows Artifact
111182
uses: actions/download-artifact@v4
112183
with:
113184
name: vidminal-windows
114185
path: ./release
115-
116186
- name: Download macOS Artifact
117187
uses: actions/download-artifact@v4
118188
with:
119189
name: vidminal-macos
120190
path: ./release
121-
122191
- name: Create GitHub Release and Upload Assets
123192
uses: softprops/action-gh-release@v1
124193
with:
125194
files: |
126-
release/vidminal-linux
195+
release/vidminal-linux-64
196+
release/vidminal-linux-32
197+
release/vidminal-linux-arm-64
198+
release/vidminal-linux-armhf-32
127199
release/vidminal-windows.exe
128200
release/vidminal-macos
129201
env:

README.md

Lines changed: 71 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -1,75 +1,89 @@
1-
# 📺 Vidminal: 'Cause Who Needs Graphics Anyway? 🤷‍♀️
2-
Ever wanted to watch videos but, like, without all those fancy pixels? Just good ol' text? And maybe with sound too? No? Well, too bad, 'cause this thing does it! 🙄
3-
4-
It's a super "optimized" tool that turns any video into a glorious, eye-straining ASCII art experience right in your terminal. Plus, it plays the audio. Because even a lazy developer knows you can't just have silent movies. 😴
5-
1+
# 📺 Vidminal: Terminal Video as ASCII Art
62

73
### A little sneek peek:
8-
9-
104
https://github.com/user-attachments/assets/fbd1eaeb-4037-465c-b473-fa1c6f9ca26e
115

6+
Ever wanted to watch videos as colored ASCII art in your terminal, with sound, and full keyboard controls? Now you can! This project turns any video into a glorious, eye-straining ASCII art experience—right in your terminal, with audio, seeking, and more.
127

8+
---
139

14-
## 🚀 How to Get This Masterpiece Running
15-
16-
### From Binaries
17-
Just download the right executable for your OS from the [Releases](https://github.com/sajagin/vidminal/releases) page. No Python or dependencies needed. Run it and follow the prompts. All required files (including BadApple.mp4 and ffmpeg) are bundled.
10+
## 🚀 How to Run
1811

19-
### From Python Script
12+
### 1. Download a Release (Recommended)
13+
- Get the right executable for your OS from the [Releases](https://github.com/sajagin/vidminal/releases) page.
14+
- No Python or dependencies needed. Just run it!
15+
- All required files (including BadApple.mp4 and ffmpeg) are bundled.
2016

21-
- Prerequisites (Stuff You Probably Already Have, Hopefully)
22-
- **Python**: 'Cause that's what this is written in. Duh.
23-
- **Pillow**: For image magic. `pip install Pillow`
24-
- **moviepy**: For video wrangling. `pip install moviepy`
25-
- **pygame**: For sound. `pip install pygame`
17+
### 2. Run from Python Source
18+
- **Python 3.8+** required.
19+
- Install dependencies:
20+
```bash
21+
pip install Pillow moviepy pygame py7zr colorama
22+
```
23+
- Run the script:
24+
```bash
25+
python vidminal.py
26+
```
2627

27-
### No FFmpeg Setup!
28-
You don't need to install ffmpeg yourself . This repo ships with a compressed `ffmpeg_bin.7z` containing all the ffmpeg binaries for Windows, Mac, and Linux (even ARM stuff). The script will extract and use the right one for your system, automatically. So, yeah, just run it.
28+
---
2929

3030
## 🆕 Playback Controls
3131
- **Space**: Pause/Resume
3232
- **Q**: Quit
3333
- **A/D**: Rewind/Forward 5 seconds
34-
- **←/→ (Arrow keys)**: Skip 1 frame
35-
36-
## 🍿 Usage: "Watch" a Video
37-
Just run it. The script will ask you for everything (video file, width, fps, temp folder) like a lazy wizard. ✨
38-
```bash
39-
python vidminal.py
40-
```
41-
Or, if you downloaded a binary, just run it:
42-
```bash
43-
./vidminal-windows.exe # or vidminal-linux, vidminal-macos
44-
```
45-
Just follow the prompts. Or just hit Enter for the defaults. That's it.
46-
47-
## ⚙️ Options (If You're Feeling Fancy)
48-
You don't need to remember any command-line arguments. The program will create an `options.json` file the first time you run it, containing all the main settings:
49-
50-
- Video file (default: BadApple.mp4)
51-
- Temp folder (default: temp)
52-
- Width (default: 160)
53-
- FPS (default: 24)
54-
55-
Just edit `options.json` to set your preferred defaults. The script will use these values every time you run it. No more prompts for width, fps, or temp folder—just set and forget!
56-
57-
![image](https://github.com/user-attachments/assets/1ea013a2-f8c1-46b8-970f-0f5828e45282)
58-
59-
If you delete `options.json`, it'll be recreated with defaults next time you run the program.
60-
61-
## ⚠️ Known Issues / "Features"
62-
- Terminal Size Matters: If your terminal is too small, things will look like a jumbled mess. Make it big! Or don't, I'm not your boss.
63-
- Performance: It's Python. It's ASCII. It might stutter. Don't come crying to me.
64-
- Temporary Files: It creates a bunch of image files and an audio file. It doesn't clean them up automatically. Why? **Because I'm lazy. Delete them yourself!** 🔥🗑️
65-
- ffmpeg will be extracted to the script's root folder if not already there. If you delete it, it'll just get extracted again. Magic.
34+
- **←/→ (Arrow keys)**: Skip 1 second
35+
36+
---
37+
38+
## 🍿 Usage
39+
- Run the script or binary. It will prompt for a video file (or use the default BadApple.mp4).
40+
- All settings (width, fps, temp folder) are stored in `options.json` after first run. Edit this file to change defaults.
41+
- The program will extract and use the correct ffmpeg binary for your OS automatically—no setup needed!
42+
43+
---
44+
45+
## ⚙️ Options
46+
- `options.json` is created on first run. You can edit it to set:
47+
- Video file (default: BadApple.mp4)
48+
- Temp folder (default: temp)
49+
- Width (default: 160)
50+
- FPS (default: 24)
51+
- No more prompts for width, fps, or temp folder—just set and forget!
52+
53+
---
54+
55+
## 🧹 Cleanup
56+
- All temporary files (frames, audio, temp ffmpeg) are deleted automatically when the program exits, even if you quit early or force close.
57+
58+
---
59+
60+
## 📖 How Does It Work?
61+
- See [WORKING.md](./WORKING.md) for a full, beginner-friendly explanation of every part of the code, how ffmpeg works, and how everything fits together.
62+
63+
---
64+
65+
## ⚠️ Known Issues / Notes
66+
- **Terminal Size Matters:** If your terminal is too small, the video will look bad. Make it big!
67+
- **Performance:** It's Python and ASCII. It might stutter on slow machines or huge videos.
68+
- **ffmpeg:** You do NOT need to install ffmpeg yourself. The right binary is extracted and used automatically.
6669
- **Full video path is required (No relative path)**
6770

68-
## Contributing (LOL)
69-
Sure, if you really wanna make this "better," feel free. But honestly, it works, right? So why bother? Issues and pull requests are technically welcome, I guess. 🙄
71+
---
72+
73+
## Contributing
74+
Pull requests and issues are welcome! See the code and [WORKING.md](./WORKING.md) for details.
75+
76+
---
77+
78+
## License
79+
MIT or similar. Use at your own risk. Don't blame me if your terminal melts.
80+
81+
---
82+
83+
## Credits
84+
- Bad Apple!! video for testing
85+
- All the open-source libraries used
7086

71-
# License
72-
This project is probably under some open-source license. Just assume you can do whatever with it, but don't blame me if it breaks your computer. Or your eyes. 😜
87+
---
7388

74-
#### PS: It's fun sometimes written a README from hand without any tool. 😆
75-
#### added `BadApple.mp4` in repo for testing. It's literally the best thing after "Hello World".
89+
For a full technical breakdown, see [WORKING.md](./WORKING.md).

0 commit comments

Comments
 (0)