dMZX Forums: How many video conversions do we need?! - dMZX Forums

Jump to content

A Note About Artwork

It is permissable to post tasteful nude art, provided you include the disclaimer "(18+)" in your topic title. This is not the same thing as posting porn or other smut. Know and be mindful of the difference. If you are unsure of whether an image you wish to post is within the bounds of good taste, run it by an Admin privately first.
Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

How many video conversions do we need?! Gotta one-up 'em all!

#1 User is offline   Mr_Alert 

  • Doesn't look edible.
  • PipPipPip
  • Group: Members
  • Posts: 151
  • Joined: 25-May 02
  • Gender:Male
  • Location:Torrance, CA

Posted 16 January 2010 - 04:26 PM

Seeing all the video converters being made (OK, it's just 2, but still!), I decided to dust up my old grayscale image converter from forever ago and improve it, colorize it, and make it do video. Here are the results:



>>> Archive page for all three demos. <<<

This post has been edited by Lachesis: 13 April 2023 - 08:55 AM
Reason for edit: Replaced attachments with archive URLs.

?
0

#2 User is offline   Dr Lancer-X 

  • 電波、届いた?
  • Group: DigiStaff
  • Posts: 8,938
  • Joined: 20-March 02
  • Location:ur mom nmiaow

Posted 16 January 2010 - 04:38 PM

Wonderful quality; I especially like how the text is crisp and clear. Still some cases of artifacting, but it looks very good.

EDIT: as expected, the live action looks great with this encoder.
Posted Image
<Malwyn> Yes, yes. Don't worry I'd rather masturbate with broken glass than ask you for help again. :(
0

#3 User is offline   Wervyn 

  • I can see you
  • Group: DigiStaff
  • Posts: 1,855
  • Joined: 24-December 00
  • Gender:Male
  • Location:Caras Galadhon

Posted 16 January 2010 - 05:01 PM

I have to agree, this is really nice work, first encoder I've seen that actually does a passable job with video, instead of just "hey, that's kind of neat that you got that video into MZX". Being able to clearly read text on screen in a big part of it.

"I'm just a song from the 80's."
To lie is to change the truth.
..Ignorance is to be unaware of the truth.
....Incompetence is to be unable to grasp the truth.
......And escape is to run away from the truth.
It is useless to run, since the truth is right next to you.

-Wervyn
0

#4 User is offline   mzxgiant 

  • DigitalMZX Server Ninja & Code Monkey
  • Group: DigiStaff
  • Posts: 1,127
  • Joined: 02-January 01
  • Gender:Male
  • Location:Rochester, NY

Posted 16 January 2010 - 05:06 PM

Lancer's right -- I'm impressed, the text is the dead giveaway to how great this looks :confused:
0

#5 User is online   Lachesis 

  • the pinnacle of human emotion
  • Group: DigiStaff
  • Posts: 3,904
  • Joined: 17-July 04
  • Gender:Female
  • Location:Sealand

Posted 16 January 2010 - 06:31 PM

I think your game has replaced Focus Point as the greatest MZX game of all time :confused:
"Let's just say I'm a GOOD hacker, AND virus maker. I'm sure you wouldn't like to pay for another PC would you?"

xx̊y (OST) - HELLQUEST (OST) - Zeux I: Labyrinth of Zeux (OST) (DOS OST)
w/ Lancer-X and/or asgromo: Pandora's Gate - Thanatos Insignia - no True(n) - For Elise OST
MegaZeux: Online Help File - Keycode Guide - Joystick Guide - Official GIT Repository
0

#6 User is offline   Sai'ke 

  • =)
  • PipPipPipPipPip
  • Group: Members
  • Posts: 2,272
  • Joined: 08-September 02
  • Gender:Not Telling

Posted 16 January 2010 - 08:13 PM

Oh ho ho, very FUNY :'(
Everything is a potato to a degree you do not realize till you have tried to make it into fries.
- Bertrand Potato
0

#7 User is offline   Pyro1588 

  • wojtek
  • PipPip
  • Group: Members
  • Posts: 145
  • Joined: 20-October 02
  • Gender:Male
  • Location:Minnesota

Posted 17 January 2010 - 12:22 AM

i forgot how much i liked clannad. i really should finish the after story. thank you for reminding me of this =)
<Tox> bah. I may as well give in and shop australia. D:
<pyro1588> "welcome to australia, can i help you find what you're looking for?"
<Tox> pyro1588, I'm giving you the most reproachful of glares right now.
--------
Go show those nutty Koreans what us crazy Europeans are made of pirate.gif pirate.gif pirate.gif - Saike
<exophase> The old Commodore strategy of, "Go friggin' bankrupt!"
<wervyn> Go away! I'm writing the same engine I always do!
0

#8 User is offline   Exophase 

  • Laughing on the inside.
  • Group: DigiStaff
  • Posts: 7,155
  • Joined: 23-October 00
  • Gender:Male
  • Location:Cleveland, OH

Posted 17 January 2010 - 01:21 AM

Impressive results. What's the algorithm?
~ ex0 has a kickass battle engine, without it you sux0rz! without it you sux0rz! ~

"The fact that I say I've one of the best, is called honesty." -Akwende
"Megazeux is not ment to be just ASCII, it is ANSI!" - T-bone6
"I hate it when you get all exo on me." - emalkay

Exophase can what Rubi-cant.
exoware is ware ur ware is exoware
ps. not loking 4 new membrs kthx
0

#9 User is offline   Sai'ke 

  • =)
  • PipPipPipPipPip
  • Group: Members
  • Posts: 2,272
  • Joined: 08-September 02
  • Gender:Not Telling

Posted 17 January 2010 - 03:58 PM

(It is impressive btw :confused:)
Everything is a potato to a degree you do not realize till you have tried to make it into fries.
- Bertrand Potato
0

#10 User is offline   CJA 

  • «≡larch bucket≡»
  • PipPipPipPipPipPip
  • Group: Members
  • Posts: 3,262
  • Joined: 23-June 05
  • Gender:Male
  • Location:......@.c....

Posted 18 January 2010 - 02:27 AM

This converter is going to take a while to beat. I think the war is won for now.

However, what I'm unsure of at all is the feasibility of movies in MZX. Odds are that if you were going to go out of your way to make a movie, you'd probably want the movie to be something in itself. Uploading the 1 minute video to YouTube, standing alone, with no game, would probably get you a the same amount of viewing time than if you added it to a 30 minute MZX game and released it.
Need a dispenser here.
0

#11 User is offline   Mr_Alert 

  • Doesn't look edible.
  • PipPipPip
  • Group: Members
  • Posts: 151
  • Joined: 25-May 02
  • Gender:Male
  • Location:Torrance, CA

Posted 18 January 2010 - 03:28 AM

Looks like my fears of using dithering with the pixel-by-pixel character comparison function are unfounded. I've got improvements with all three videos by enabling dithering in the converter. Here is a look at the results of the converter over time. (3rd image was converted with the same version that converted the 3 videos in this thread)

The conversion algorithm is as follows:
  • Convert image to grayscale
  • Create 16-color grayscale palette from histogram
  • Find minimum/maximum values of pixels in each tile and assign colors accordingly
  • Create a character for each tile (assuming an SMZX mode 1-type color assignment from the 16-color palette)
  • Reduce character set to 256 characters by finding the minimum distance of each character from every character before it (multiplying the distance by that tile's contrast between min/max to give higher-contrast areas more priority) and sorting by that minimum distance in descending order
  • Map each tile to the reduced character set by comparing to each character and their reverse
  • Find the average color of each palette entry using the original image and the pixels covered by each palette entry in the final result, scaling the colors to the grayscale brightness afterwards.


The only really new things compared to my old converter is the fact that it uses SMZX, the histogram-based palette stuff, the tile contrast weighting, and the colorization at the end (obviously inspired by Lancer's converter.) Since the colorization is pretty much just tacked on to the end of a grayscale converter, there's room for improvement in that area (that much is obvious from some parts of the videos.)

As for the feasibility of video in MegaZeux, I was actually more interested in using this converter to convert static images for another project I was working on.
?
0

#12 User is offline   Dr Lancer-X 

  • 電波、届いた?
  • Group: DigiStaff
  • Posts: 8,938
  • Joined: 20-March 02
  • Location:ur mom nmiaow

Posted 18 January 2010 - 10:22 AM

Ah, so it's SMZX mode 1? I guess that explains why the colourisation step doesn't work quite so well.
Posted Image
<Malwyn> Yes, yes. Don't worry I'd rather masturbate with broken glass than ask you for help again. :(
0

#13 User is offline   Mr_Alert 

  • Doesn't look edible.
  • PipPipPip
  • Group: Members
  • Posts: 151
  • Joined: 25-May 02
  • Gender:Male
  • Location:Torrance, CA

Posted 18 January 2010 - 03:23 PM

No, it's SMZX mode 2, but it assigns grayscale values as though it were SMZX mode 1. Colorization would actually be a good deal worse if it were mode 1.
?
0

#14 User is offline   smilymzx 

  • Those Goodie-Goodies!
  • PipPipPip
  • Group: Members
  • Posts: 349
  • Joined: 25-October 03
  • Gender:Male
  • Location:I.M.MEEN's book

Posted 18 January 2010 - 07:16 PM

Only one comment on the 2nd movie:

You have been RickRoll'd.

Good movie quality, by the way!

This post has been edited by smilymzx: 18 January 2010 - 07:18 PM

SmilyMZX, A.K.A. Hamtaro126 (A.K.A. AtariHacker)

I am at:

Z2 - ZZT forums, NESDEV Forums, SMW Central (Super Mario World)

Other interests:

Museum of ZZT, NESDEV Wiki, Wiki of Weavers (ZZT-related!)
0

#15 User is offline   iamgreaser 

  • cats.py
  • PipPip
  • Group: Members
  • Posts: 141
  • Joined: 24-March 08
  • Gender:Male
  • Location:Not Australia

Posted 20 January 2010 - 08:07 AM

I'm sorry, but I don't particularly like it when I'm being rickrolled and the video desyncs.

Pretty flippin' sweet quality, though.
blah blah raycasters blah blah blah

<Stephen> are you dozing
<gm|lap> totally
<Stephen> good
<Stephen> i will bury you
0

#16 User is offline   Frobozz 

  • Ryiah
  • PipPipPipPipPip
  • Group: Members
  • Posts: 1,808
  • Joined: 07-March 01
  • Gender:Not Telling

Posted 20 January 2010 - 10:30 PM

Very nice quality on the animes. Also when I saw "Some live action thing" I immediately realized what it was.
0

#17 User is offline   Seventh Shade 

  • willfully disreputable
  • PipPipPipPip
  • Group: Members
  • Posts: 917
  • Joined: 10-March 04
  • Gender:Male

Posted 22 January 2010 - 01:28 AM

View PostCJA, on Jan 17 2010, 08:27 PM, said:

However, what I'm unsure of at all is the feasibility of movies in MZX. Odds are that if you were going to go out of your way to make a movie, you'd probably want the movie to be something in itself. Uploading the 1 minute video to YouTube, standing alone, with no game, would probably get you a the same amount of viewing time than if you added it to a 30 minute MZX game and released it.


It might be okay for a very short title screen or intro video.
0

#18 User is offline   Mr_Alert 

  • Doesn't look edible.
  • PipPipPip
  • Group: Members
  • Posts: 151
  • Joined: 25-May 02
  • Gender:Male
  • Location:Torrance, CA

Posted 29 January 2010 - 08:18 AM

Well, it's been a while. I've made a few small improvements, like using histograms of the pixels covering the tiles using each color pair to make the mid-range grayscale levels instead of interpolating them mode 1-style. At this point, I can't think of much else that would improve this any further, so I'm just gonna go ahead and release the converter now. I'm only releasing the source code, but if anybody wants to compile win32 binaries or whatever, be my guest.

png2smzx converts a PNG image into an MZM file, a CHR file, and a PAL file (SMZX mode 2). It depends on libpng and uses the following syntax:
png2smzx in.png out.mzm out.chr out.pal


y4m2smzx converts a 640x350 YUV4MPEG stream into the raw palette, character set, and tile data used by the included player. It automatically skips or repeats frames to match the frame rate of the source stream to MZX speed 4, but this can be easily changed in the source code. It depends on mjpegtools and uses the following syntax:
y4m2smzx < in.yuv > out.raw

Attached File  smzxconv.tar.bz2 (15.31K)
Number of downloads: 65
?
0

#19 User is offline   Frobozz 

  • Ryiah
  • PipPipPipPipPip
  • Group: Members
  • Posts: 1,808
  • Joined: 07-March 01
  • Gender:Not Telling

Posted 29 January 2010 - 10:38 AM

I went to compile it, realized I lacked the libraries, and decided I was too lazy to do anything further. Oddly the makefile is failing for me in MinGW because it can't find cc. So I had to throw in a rule redefining cc as gcc.

This post has been edited by Frobozz: 29 January 2010 - 10:40 AM

0

#20 User is offline   ajs 

  • carpe diem
  • PipPipPipPipPip
  • Group: Members
  • Posts: 1,614
  • Joined: 21-October 00
  • Gender:Male
  • Location:United Kingdom

Posted 29 January 2010 - 11:35 AM

Nice. Mind if I add png2smzx to utils/ in MZX?

--ajs.
0

#21 User is offline   mzxgiant 

  • DigitalMZX Server Ninja & Code Monkey
  • Group: DigiStaff
  • Posts: 1,127
  • Joined: 02-January 01
  • Gender:Male
  • Location:Rochester, NY

Posted 13 May 2010 - 02:36 AM

Sorry for the bump, I just felt this might be useful...

Compiled this for win32 (using MinGW32/MSYS)...

Attached File(s)


0

#22 User is offline   mzxgiant 

  • DigitalMZX Server Ninja & Code Monkey
  • Group: DigiStaff
  • Posts: 1,127
  • Joined: 02-January 01
  • Gender:Male
  • Location:Rochester, NY

Posted 13 May 2010 - 12:13 PM

Something to note here after spending a few hours mucking with this...

Exporting a YUV from VLC (as I did) doesn't include a framerate in the header of the YUV file for some reason. Aaand without it, the program just silently quits. Later today (if Alert doesn't beat me to it) I'll probably re-compile my version with a fallback switch on the framerate and throw it up here for all that are interested.
0

#23 User is offline   ajs 

  • carpe diem
  • PipPipPipPipPip
  • Group: Members
  • Posts: 1,614
  • Joined: 21-October 00
  • Gender:Male
  • Location:United Kingdom

Posted 16 May 2010 - 05:50 PM

I haven't tackled the mjpegtools dependency issue yet, but I've imported png2smzx into MZX proper:

http://github.com/aj...afde3481f642809

It will be shipped with the next version of MZX..

--ajs.
0

#24 User is offline   Mr_Alert 

  • Doesn't look edible.
  • PipPipPip
  • Group: Members
  • Posts: 151
  • Joined: 25-May 02
  • Gender:Male
  • Location:Torrance, CA

Posted 08 June 2010 - 11:01 PM

Patchings

New syntax for y4m2smzx is:
y4m2smzx [mzxspeed] [nnn:ddd] < in.y4m > out.raw
where nnn:ddd is the source frame rate in ratio form (24:1, 30000:1001, etc.)
?
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users