August 20, 2019, 07:15:35 pm

News:

Juju thinks he's so clever by putting funny stuff here



Alternatively, join us on Discord.

ASCII Video Generator [UCC2]

Started by Jarren Long, September 14, 2017, 05:36:11 pm

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Jarren Long

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.

_iPhoenix_

This could be really cool if it works out!
Please spam here: https://legend-of-iphoenix.github.io/spam/

"walruses are better than tuxedo chickens, all hail the great :walrii:" ~ me
Evolution of my avatar:

c4ooo

So this is a VGA signal generator right? Do you plan to use TTL logic or microcontrollers? :D

Jarren Long

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.

xMarminq_

I don't associate with associations

Jarren Long

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.

_iPhoenix_

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.
Please spam here: https://legend-of-iphoenix.github.io/spam/

"walruses are better than tuxedo chickens, all hail the great :walrii:" ~ me
Evolution of my avatar:

Jarren Long

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:

_iPhoenix_

This already makes my job hard. Crud.
Please spam here: https://legend-of-iphoenix.github.io/spam/

"walruses are better than tuxedo chickens, all hail the great :walrii:" ~ me
Evolution of my avatar:

Jarren Long

September 15, 2017, 05:24:50 pm #9 Last Edit: September 15, 2017, 05:33:09 pm by Jarren Long
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.

c4ooo

September 15, 2017, 07:48:35 pm #10 Last Edit: September 15, 2017, 07:53:08 pm by c4ooo
Ohh i misunderstood, i though you where making a VGA text-mode video signal generator.

_iPhoenix_

"Now spitting out crud in 5 different color modes!"

Priceless.
Please spam here: https://legend-of-iphoenix.github.io/spam/

"walruses are better than tuxedo chickens, all hail the great :walrii:" ~ me
Evolution of my avatar:

Jarren Long

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" (http://www.sample-videos.com/video/mp4/720/big_buck_bunny_720p_1mb.mp4) 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 https://www.booksnbytes.net/AsciiVidTest-8bit-q60.mp4

_iPhoenix_

September 15, 2017, 08:14:45 pm #13 Last Edit: September 15, 2017, 08:22:27 pm by _iPhoenix_
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.
Please spam here: https://legend-of-iphoenix.github.io/spam/

"walruses are better than tuxedo chickens, all hail the great :walrii:" ~ me
Evolution of my avatar:

Jarren Long

No Color Version, same quality setting: https://www.booksnbytes.net/AsciiVidTest-NoColor-q60.mp4

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.

Powered by EzPortal