Page 1 of 2


Posted: 09 May 2016 13:27
by misol101

** UPDATED with color support! Link to color demos: (run sota.bat) (run Lickweed.bat) (run smbu.bat)

I saw and liked this link by Honguito98 (taking a movie file and converting it into text frames that can be printed like a movie in the console window):

especially this:

but I couldn't find any actual scripts, only downloads seemed to be the demos themselves, with a huge binary r3d file.

So anyway... I decided to recreate the steps in the thread and create a script to make these things.

Download link

This archive contains a compiled version of jp2a, because I could not find a Windows binary and had to compile it myself, so I wanted to save you the headache. I hope this is ok, license files for jp2a are still in there.

What you also need for this is to download and install ffmpeg if you don't have it.

The archive also contains a 10 second test I made from a video file. To play it, type

mode 120,45&playm2t.bat c7

The script to create these things is called mov2txt.bat. Example usage to make the example movie:

mov2txt.bat c7.avi /ST 3:45 /TD 10 /CS 1 6 6 /W 120

..which takes the movie c7.avi, starting from 3:45 into the movie and 10 seconds ahead, with output Width 120 and using CharSet number 1, with blackness increased by 6 and whiteness increased by 6 (this essentially means contrast in the output is increased)

This creates the folder c7, with jpg and txt files.

Once the folder with images is created, the video to image extraction can be skipped by adding /SKIPEXTRACT to the line. This is useful for playing around with different CS charsets/contrast, or testing any /EXTRAS

Re: mov2txt

Posted: 09 May 2016 13:47
by misol101
mov2txt usage:

mov2txt moviefile [/ST startTime] [/TD timeDuration] [/OUT name] [/W width] [/H height] [/CS altcharset1-4 nofBlack nofWhite] [/COLOR cleanColorTreshold] [/LIGHTBG] [/REMOVEJPG] [/SKIPEXTRACT] [/EXTRAS extras]

Charsets for non-color are:
1: " ·•■◘█"
2: " ░▒▓█"
3: " .:wM"
4: " █":
( the messed up 5 which creates garbled output" ·•○■◘█" :) )

(the charsets for COLOR are similar, but reversed...)

If no CharSet is given, jp2a uses its default one.

nofBlack multiplies the first character in the charset x times
nofWhite multiplies the last character in the charset x times

/OUT specifies an alternative name to the output folder. If not used, name is same as movie file
/EXTRAS are used in the call to jp2a, try e.g. -x, or --border.
/SKIPEXTRACT skips the video extraction part.
/REMOVEJPG removes jpgs after video extraction (don't use this if you want to use /SKIPEXTRACT!)
/W sets width of output. If only width is set and not height, height is aspect ratio corrected. If neither /W nor /H are set, output fits terminal window.
/H sets height of output. If only height is set and not width, width is aspect ratio corrected. If neither /W nor /H are set, output fits terminal window.
[/ST startTime] Can be given in seconds, or like MM:SS and similar
[/TD timeDuration] In seconds, maybe other ways too, didn't check
Note: if none of /ST or /TD are given, the entire video is extracted from start to finish (!)
/LIGHTBG is supposed to indicate that the source video has bright background. I'm not sure it actually does anything in jp2a.

/COLOR enables color output and sets a treshold for when a "clean"(space) color should be used, the higher the value the more space characters in the output (which is "clean", i.e. not a "mixed" character/color). The treshold value is more important than nofBlack and nofWhite when COLOR is used. A good default value is 64.

playm2t usage:
playm2t folder [delay] [x] [y] [color] [bcol] [normal|reverse|bounce] [startskip_nof] [endskip_nof] [repeat|norepeat] [cache "cacheFinishedCommand"]

Keys while playing are 'C/c' for next/previous color, 'p' to pause, 'r' to play reverse, 'n' to play normal, 'b' to bounce, d/D to decrease/increase delay, escape to quit

Re: mov2txt

Posted: 09 May 2016 13:59
by misol101
Ouch, I forgot that playm2t.bat needs gotoxy.exe and cmdwiz.exe to play. Updated the linked archive.

Re: mov2txt

Posted: 10 May 2016 14:40
by misol101

I'm back with more uselessness... :)

I also read this thread:

which adds color to the text video output, and again, wanted to do the same.

For this I had to modify jp2a to add color support, so the archive is updated now, with a modded version (modified image.c source also included). Also, I threw out creating m2t files, just specify the folder to play instead. order to compare mine with the original, I decided to continue Honguito98's somewhat strange behaviour of converting a video of a text demo back to text, so I converted the same video file (a demo called LickWeed).

Here it is (run LickWeed.bat)

As for which one is "better", I think mine is a bit too dark and possibly the matching is worse, but on the other hand it has less artefacts... so not sure.

The command to create the output was:
mov2txt LW.mp4 /W 80 /H 50 /CS 2 0 0 /COLOR 64

Re: mov2txt

Posted: 10 May 2016 15:33
by misol101
Apparently Dropbox hates me and shut down downloads due to "heavy traffic" (I'm sure it must have been enormous :roll: ).

All files were moved to Mediafire, sorry if anybody tried to get the files earlier today and failed.

Re: mov2txt

Posted: 10 May 2016 16:21
by foxidrive
misol101 wrote:Apparently Dropbox hates me and shut down downloads due to "heavy traffic" (I'm sure it must have been enormous :roll: ).

Dropbox did that to me recently and it cited "bandwidth" as the reason my account was disabled.

The real reason turned out to be a zip file containing aacini's executable files from dostips, and which was incorrectly flagged as malware by just a few heuristic av scans. Heuristic scans get it wrong by the very nature of heuristics.

The file had been there for two years and I clarified that it was a false positive, but I had to delete the file due to Dropbox terms of service.

I then asked why I hadn't been notified and why it said "bandwidth" was the problem - and they said that they don't contact users if malware scans show positive, or give the real reason, as it would alert the user that their malware had been detected.

It was all a bit of specious reasoning for me, considering my initial reply was automated rubbish and not a human answering.

But there you go - there may have been a false positive to a malware scan.

Re: mov2txt

Posted: 10 May 2016 16:30
by misol101
Hmm... strange... but interesting! Thanks!

You're right, "bandwidth" is the word they use. I guess I should start deleting files I put up recently and see if that helps. I don't think I have the one you mentioned but might be something else.

Re: mov2txt

Posted: 10 May 2016 18:39
by foxidrive
It will be one of the exe files probably, and you can submit them here to see what the current AV programs detect.

It's free, and it uploads the file and scans it and displays the result.

Re: mov2txt

Posted: 11 May 2016 03:37
by misol101
One more: ... fTheArt.7z

A color conversion of the good old Amiga demo State Of The Art... timing with music may be crap :)

As for the scan of files, I don't really understand the results. It claims I have malware in pretty much everything. Finally I compiled this program:

#include <windows.h>
int main(int argc, char **argv) {
return 0;

first with tcc, and then with gcc. In the first case the AV scanner claims 2 scans found malware:
Jiangmin Trojan/Genome.dlco
Rising Malware.Undefined!8.C-449YgnhiGME (Cloud

and for the gcc one it's crazy, 15 malwares reported.

So, yeah, I don't know about that tool... maybe take that in PM instead...

Re: mov2txt

Posted: 11 May 2016 04:01
by foxidrive
If you can upload screenshots of the scan result to and show the link then it would give useful details.

If it mentions heuristic then that means the AV took a guess based upon certain characteristics, but can easily be a false positive because it isn't using actual known malware signatures.

Re: mov2txt

Posted: 12 May 2016 03:27
by misol101
So. did anybody look at one of the color movie conversions? I'm interested in if it runs smooth or not on different machines. The first time it runs it might lag a bit since the files are not in the cache, but after that I'm hoping it runs ok. It might possibly be too fast on some machines as well

Re: mov2txt

Posted: 12 May 2016 20:31
by misol101
Archives were updated again. I added optional caching of frames to playm2t.bat. This adds a slightly annoying initial delay for the two color demos, but on the other hand it will always run smooth even if the files were not in the file cache.

Re: mov2txt

Posted: 14 May 2016 12:31
by misol101
Last time I'll bother you with just new content, promise :mrgreen:

Here is "Smack my bitch up" by The Prodigy!

If nothing else, this shows that real-life, dark, and chaotic videos maybe shouldn't be converted to extended ASCII... at all :)


Re: mov2txt

Posted: 16 Jun 2016 17:02
by misol101
No new movies, as promised :mrgreen:

I just wanted to point out that if you try to run these things and get stuck in the initial caching forever, or the animation runs incredibly slow, then most likely, the antivirus program is to blame! I recently ran some of thse things on a friend's computer where it was really slow. Turns out it was the antivirus running in some kind of sandbox mode, slowing down the execution of my external programs gotoxy.exe and cmdwiz.exe horribly.

In these cases, turning off the antivirus temporarily speeds things up enormously.

So just in case these things move like syrup, don't blame me, blame your antivirus (probably) :mrgreen:

(alright, enough repetition now)

Re: mov2txt

Posted: 17 Jun 2016 02:35
by foxidrive
misol101 wrote:Turns out it was the antivirus running in some kind of sandbox mode, slowing down the execution of my external programs gotoxy.exe and cmdwiz.exe horribly.

Most antivirus programs have an exclusion or whitelist feature, and programs can be added there so the AV program ignores them.