https://github.com/zenithalhourlyrate/acm
AsCii Movie (asciimation) https://ascii.moe
https://github.com/zenithalhourlyrate/acm
ascii ascii-art ascii-movies
Last synced: over 1 year ago
JSON representation
AsCii Movie (asciimation) https://ascii.moe
- Host: GitHub
- URL: https://github.com/zenithalhourlyrate/acm
- Owner: ZenithalHourlyRate
- License: mit
- Created: 2021-04-17T16:13:50.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-05-31T14:38:20.000Z (about 5 years ago)
- Last Synced: 2025-03-24T04:11:55.432Z (over 1 year ago)
- Topics: ascii, ascii-art, ascii-movies
- Language: Python
- Homepage: https://ascii.moe
- Size: 49.2 MB
- Stars: 16
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# AsCii Movie
Namely, this repo provides utils on converting normal videos to AsCii Movies.
Currently two output format is supported: image and txt
Also we provide utils on converting images to video and txt to [playable txt](https://github.com/nitram509/ascii-telnet-server)
## Examples
### Bad Apple

If you demand the output to be a video, we need
```bash
# we assume that you get the original video of bad apple by some means
#youtube-dl some-url
export VID=badapple.mp4
export N=$((`nproc`-1))
export TMPDIR=$(mktemp -d)
export RAW=$TMPDIR/raw
export ASC=$TMPDIR/asc
mkdir $RAW
mkdir $ASC
bash utils/ffmpeg.in.sh $VID 30 $RAW/%05d.png
parallel python img2ascii.py -j $N -n {} -i "$RAW/{:05d}.png" -o "$ASC/{:05d}.png" -s 40x12 -g ::: `seq "$N"`
bash utils/ffmpeg.out.sh $ASC/%05d.png 30 asc.$VID
bash utils/ffmpeg.merge.sh $VID asc.$VID final.$VID
rm -r $TMPDIR
```
Meanwhile, if you demand it to be a format compatible to [ascii-telnet-server](https://github.com/nitram509/ascii-telnet-server) (You may use my [fork](https://github.com/ZenithalHourlyRate/ascii-telnet-server/)) to play it. Please note the difference between `-g` and `-a`
```bash
# we assume that you get the original video of bad apple by some means
#youtube-dl some-url
export VID=badapple.mp4
export N=$((`nproc`-1))
export TMPDIR=$(mktemp -d)
export RAW=$TMPDIR/raw
export ASC=$TMPDIR/asc
mkdir $RAW
mkdir $ASC
bash utils/ffmpeg.in.sh $VID 30 $RAW/%05d.png
parallel python img2ascii.py -j $N -n {} -i "$RAW/{:05d}.png" -o "$ASC/{:05d}.png" -s 40x12 -a ::: `seq "$N"`
bash utils/ascii2telnet-server.py -i "$ASC/{:05d}.png" -o ba_telnet.txt
rm -r $TMPDIR
```
And use
```
cd /path/to/ascii-telnet-server
cp /path/to/acm/ba_telnet.txt ./
python ascii_telnet_server.py -f ba_telnet.txt --stdout -S 40x12 -s 80x25 -r 30
```
to play it. (Or you may just use `examples/ba_telnet.txt` in `acm` repo)
### 夜に駆ける

### もぺもぺ
