You can help CodeWalrus stay online by donating here. | New CodeWalrus | Old (dark mode) | Old (light) | Discord server

ASCII Video Generator [UCC2]

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

0
b/PC, Mac & Vintage Computers publicado por u/Jarren Long September 14, 2017, 05:36:11 PM
Just a placeholder for my [UCC2] project, ASCII video generator! Well maybe, seems like a hell of an undertaking...we'll see if this ends up working.
Inicia sesión o crea una cuenta para dejar un comentario
u/_iPhoenix_ September 14, 2017, 07:13:46 PM
This could be really cool if it works out!
u/c4ooo September 14, 2017, 07:43:44 PM
So this is a VGA signal generator right? Do you plan to use TTL logic or microcontrollers? :D
u/Jarren Long September 14, 2017, 08:29:39 PM
Heh, I'm not gonna get that crazy :P I'm thinking an AVI->ASCII video encoder. Well, I'm not thinking it, I'm already half way done with a crude proof-of-concept.
u/xMarminq_ September 14, 2017, 09:20:18 PM
What's the platform?
u/Jarren Long September 14, 2017, 10:07:15 PM
Windows, as a C#.NET library+app. Maybe Linux/Mac too if I start feeling froggy. MAYBE even Android/iOS, but that's probably pushing it.
u/_iPhoenix_ September 14, 2017, 11:03:31 PM
You could do a gif->ascii generator, it might be easier, as there is somewhat of a time crunch.

I'm pretty sure converting AVI->GIF->ascii will be much easier, but I have literally no idea.
u/Jarren Long September 14, 2017, 11:21:29 PM
Quick snapshot at where I'm leaving off at for today attached (almost time to go see Gabriel Iglasias!!!) Long story short, I was bored at work today, so I've gone from 0 to I can read in a bitmap, crunch the heck out of it, and spit out a B&W ASCII image AND text representation of it. Next steps for me are to do some color sampling on the original image, so I can set the foreground/background colors on the ASCII image, then convert those colors to 8-bit goodness. After that, it's just a matter of looping through the frames of an AVI to grab each one out as a bitmap, passing them through my library, and then stitching them back together on the other side.

And optimizing. Lots of optimizing. So much optimizing to do.  :banghead: :banghead: :banghead:
u/_iPhoenix_ September 15, 2017, 11:34:27 AM
This already makes my job hard. Crud.
u/Jarren Long September 15, 2017, 05:24:50 PM
Update: Got my coloring working! Now spitting out crud in one of 5 different color modes:
- No Color: Does no color sampling, just uses the default colors from the input bitmap font
- Original: Uses colors sampled directly from the source image
- 8-bit: Samples colors from the original image, then converts to 8-bit palette
- 15-bit: Samples colors from the original image, then converts to 15-bit palette
- 16-bit: Samples colors from the original image, then converts to 15-bit palette

It's rough, and slow, but I think I'm on to something.
Last Edit: September 15, 2017, 05:33:09 PM by Jarren Long
u/c4ooo September 15, 2017, 07:48:35 PM
Ohh i misunderstood, i though you where making a VGA text-mode video signal generator.
Last Edit: September 15, 2017, 07:53:08 PM by c4ooo
u/_iPhoenix_ September 15, 2017, 07:52:17 PM
"Now spitting out crud in 5 different color modes!"

Priceless.
u/Jarren Long September 15, 2017, 08:10:31 PM
First video conversion test complete! (1 second clip, AVI was converted to MP4 for size). Used a 1Mb clip from the movie "Big Buck Bunny" ( ) as an input with 8-bit color downcoding and a quality setting of 60. Did it take forever to convert? Yep. Ugly. YEP. Did it work? Yep.

Video is too large to attach, stuffed it on my website. You can watch/download it at
u/_iPhoenix_ September 15, 2017, 08:14:45 PM
What's really cool is that, if you play it on your phone, and hold it an arm's length away from your face, they look almost identical.

Also, can we see just an ascii art version (no color, and using only chars specified by the user, for added usability)?
That could be interesting, and would probably take less time.

Edit: ASCII also sucks because it forces everything to be shorter/taller, and it's expecially noticeable in that starwars sunset picture.
Last Edit: September 15, 2017, 08:22:27 PM by _iPhoenix_
u/Jarren Long September 15, 2017, 08:44:20 PM
No Color Version, same quality setting:

Right now, I have the visible character set defined to cover the printable characters for the basic ASCII set (Hex 0x00-0x7F), so 69 printable characters, but that could definitely be slimmed down to just a handful of characters, which would speed up the number crunching quite a bit.

I did build my ASCII font kinda goofy, which is causing some scaling issues with the converted frames. Somehow I ended up with 10x16 pixel characters, which gives the whole shebang a weird aspect ratio. Definitely gonna need to fix that.

**EDIT**
Also, I do need to figure out something for filling in cells that don't have any edges detected, looks kinda lame just putting a space in there.
Start a Discussion

b/PC, Mac & Vintage Computers

Computer programming discussion and project showcase

132
Topics
Explore Board
Website statistics


MyCalcs | Ticalc.org | Cemetech | Omnimaga | TI-Basic Developer | MaxCoderz | TI-Story | Casiocalc.org | Casiopeia | The Museum of HP Calculators | HPCalc.org | CnCalc.org | Music 2000 Community | TI Education | Casio Education | HP Calcs | NumWorks | SwissMicros | Sharp Calculators
Powered by EzPortal