Hacker News new | past | comments | ask | show | jobs | submit login
MacFlim: Full-motion video on B&W Macs (macflim.com)
223 points by smagoun on May 5, 2021 | hide | past | favorite | 61 comments



Hi. I am the author of macflim.

This is the old video, I am finishing the techdemo that have sound, there is a video on youtube (https://youtu.be/YRe6I5AICJ0). I'll update the macflim.com website later today.

And yes, diskspace is one of the reason why it is impractical, but with a SCSI2SD, one can get 4 2Gb partitions on you mac for around $100.

And yes, it is bizarre and useles, hence absolutely necessary. If you have time, try the app, it is full of inside time-correct jokes.


Super cool! How are you handling the dithering? The website examples look a bit 'swimmy,' with dots wandering around a lot, but looks a bit better in the bit of the tech talk I looked at. Did you find a nice improvement to the dithering technique?

In both cases, there's lines of dots in wide dark spaces, as one would expect from an error-diffusion dither. Did you look into other approaches?


I looked at several approaches, but I absolutely wanted to do floyd-steinberg, as this is what were, for me, "realistic" images on my Mac back in the 80s.

The example on the website are identical to the ones in the first video, as the simple looping gif is a by-product of the encoding.

On the second video (the one with sound), you cannot compare, as the video is compressed and not all the parts of the image are updated. But the algo is the same.

The swimmy bits come from the fact that I encode images using the preceeding one, and use the pixels from the preceeding images to "control" where the error gets diffused, to try to get some temporal stability in error diffusion (I have a long blog post that explains that, but I never got around finishing it, it seems people were more interested by having me coding sound).

I am not completely sure why the swim effect seems to always be in the north-west direction (I understand why pixels go in that diagonal, but no why they always seem to crawl on the top-left, and never the bottom-right).

The dithering code can be found in the encoder, on github:

https://github.com/fstark/macflim/blob/main/flimmaker.cpp#L3...

If you have other dithering ideas, let me know. I am happy with the one I have, which matches what I was looking for, but we never know. Also, for the compressed version (the one with sound), the dithering have a huge impact on the ability to play on slow machines.

(Btw, I tried ordered dithering, but I have always found it awful looking. Maybe in motion it would fare better?).


Another period-accurate approach would be Atkinson dithering, which is similar to Floyd-Steinberg but slightly simpler in implementation. I did a writeup about this technique a while back:

https://beyondloom.com/blog/dither.html


Cool, yeah Floyd Sternberg is definitely period appropriate!

This article on dithering made the rounds a few months ago, and was a fascinating read; the hilbert curve method at the end (Riemersma) might be a good fit and get rid of some of the line effects (if that's of interest). And the Atkinson error diffusion sounds like it even has some history in old macs.

https://surma.dev/things/ditherpunk/

There's a really nice blog post on video stable dithering in Return to the Obra Dinn, but in that case it's a 3d game, and they've got direct access to the scene geometry. I'm curious if there's a nice way to use video encoding pixel tracking vectors to reduce swimminess...


You made the right call.

I think there should be a clipping of the lower-grayscale coming into your filter. A black-point cut-off.

I think that would get rid of most of the "swimming pixels" in the very dark areas (would become completely black areas).

Some loss of detail of course in the dark areas ... but what details was there anyway?


Interesting. I tried some light posterization (splitting into discrete levels), but it made the image uglier. Your approach would make nice blacks and whites. Grays would still suffer, but it is an interesting take.


Floyd-Steinberg was usually the better choice for rendering an image.

It might be an option to offer Ordered by a menu option?


The dithering is performed by the C++ linux encoder. I could add it as an encoding stage option...


Do you have patreon or something? This is a project I can wholeheartedly support with my hard earned money.


That's kind of you, but no, I don't have a patreon nor need financial support. Having enthousiats users/lurkers if all that I need.

However, if anyone can help me getting my hands on some vintage hardware, that would be awesome (mac or non-mac, I have a few nasty software projects involving weird hardware).

[I'm ready to pay "normal" prices for those items, of course]

In particular, I am looking for a network card (for the next couple of years) for the SE/30, as I see streaming could be useful to a late 80's computer... :-) . I did found one, once, but the seller didn't ship outside of the US, and the time to organize, it went poof :-(

I also try to get my hands on a Performa/LC 575 motherboard to perform a Mystic upgrade of my Color Classic -- the goal being to see what kind of crazyness we could get on a top-of-the line color compact mac. Again, those things seems to be made of unobtainium, and probably hoarded by collectors...

A Turbo NeXT Cube would be awesome, but again, nowhere to be found...


Congrats. This is a massive technical feat. Are you going to publish the source, and/or give a technical talk on how all of this is achieved?


Source code of the silent version is at https://github.com/fstark/macflim (Mac app source code, C++ encoder source code and instructions). The sound version (the new demo from yesterday's video https://youtu.be/YRe6I5AICJ0 is massively more complicated and I will release the binaries over the week-end and the source code later next week, probably).

I'd love to do a video with the explanations (or a talk), but I am still think about how to present this is a understandable and entertaining way.


I really liked this writeup where someone found a way to push an old Kaypro into running their game at a much higher framerate than expected: http://www.chrisfenton.com/dd9-kaypro-edition/


Wow! The clip on the Mac 128K is kind of rough, but the one on the Mac SE is totally watchable! I could easily see myself watching an entire movie that way, if I didn't have access to any other screen for some bizarro reason.


I love it! (And George Abitbol would be proud of you)


As long as I avoid flim about cyclimse, everything should be ok.


flim sounds like a strange way a French person would pronounce "film" for fun


It is an inside joke about a French movie made from barely legal cuts of hilariously dubbed Warner Bros extracts. I found th3e concept weirdly suitable for a tongue-in-cheek artistic experiment that will probably mostly be used to display extract of other people movies...

https://en.wikipedia.org/wiki/La_Classe_am%C3%A9ricaine


George Abitbol, etc.

I thought it was!!

very nice job anyway


Impressive! That is all really. Makes me wish I had an old Mac.

Had a big grin watching your video.


Knowing people appreciate that made the oh-so-many hours worth it. Thx!


It's actually really fun to see it play so well, and then think back to those times, wonder what would have been possible, what people might say


The catch being the storage solutions employed here would have been impossible to imagine back then. But, perhaps just a 3-5 second video (like some of the gifs on the site) could have made the rounds. Even then they probably wouldn't have fit on a disk! Storage was so tough back then.


Yeah, totally. It was. I myself remember my first 10 megabyte hard card. I had stuffed it into some 8086 PC to run a CAD program. Prior to that, anything over a floppy seemed huge!

Funny, I had a flash back to a high school chat. Friend had picked up on digital music. Sampling was a thing we all heard about and the chat was no noise, perfect music one can carry around on chips...

Seemed like sci-fi. We were using Apple 2 computers, some with a half megabyte of RAM. A CD held so much information!

It all just happened. Fairly quick too.


This is simply wonderful!

Full color next? https://www.anfractuosity.com/projects/rainbow/


Great work, feeling some heavy nostalgia!


THAT is a labor of love!

Kudos!


Thx!


Old Apple II’s and Macs will never truly die, they’re just too much fun. Emulation and FPGA solutions exist and once gone over, the hardware is very robust. Replace the old caps with tantalum, align the screen, and you’re set.


Yep. Emulation is good, but using the real hardware is magical.

Fun fact: the reason why macflim had no sound originally is that my SE30s have bad caps (like most), and no sound. So many people asked for sound that I had to recap those surface mount caps (ouch my eyes!) so I could actually hack a version with sound :-)


That is the good fight!

I love it too. Simple, fun, pretty robust hardware.


There's something special about that stark 1-bit B/W display and the necessary dithering to produce shades of grey. There are patterns to it and a very particular aesthetic.

Early 16- and 256-color systems are great too, but pure B/W has that certain look to it.


I first read “B&W Macs” as meaning “Blue & White Power Mac G3s” and couldn’t figure out why full-motion video would be impressive.

Anyway, this is awesome!


Because full motion video can be impressive on a Power Mac G3. I recall downloading a video from Apple's website soon after the introduction of the G4. Of course I still had a G3. The G3 struggled to play the video at a couple of frames per second. (In retrospect, the video was intended as a technology demonstration of codec quality and performance on the G4.)


Eh, if the G3 has altivec suport it could play XVid videos perfectly.

If you got a MOV file with a MP4 video, OFC a G3 would struggle, but mplayer/mpv may be able to play it fastly if the resolution is under 720p if you skip the loop filter.

EDIT: Ok, just for G4 and up. Understandable.

Also, is NOT that impressive. You could watch XVid illegal rips just fine in 2002-2006.

Heck, even a Pentium 2@450 with NetBSD could do that seamlessly.


Full motion Double High Res video playback on the Apple IIe

https://www.youtube.com/watch?v=5tHenz0oU-4


Yes. This is absolutely insane, with image encoded into 6502 machine code, and PWM sound interleaced. It doesn't work on period hardware, thought (needs a special modern card, the CFFA3000, that is out of production).

I thought that this particular video, using the 1984 ad I used, was a reply to my earlier macflim video :-)

That red skirt made me feel like Constable against Turner... https://www.brightreddot.org/objective/ ...


What a bizarre, mostly useless; yet absolutely neat utility.

Of course, disk space is the immediate reason why it's so impractical.


I'm sure Apple has an ADB->USB dongle for $19.99 that you can use to connect a larger bit of storage.

Actually, did these guys have SCSI ports on the back? SCSI->USB or SCSI->TB4 would be an fun cable.


ADB -> USB is third-party only, somewhat rare, and they only support input devices like mice and keyboards (no storage). I don't think Apple ever made them. The only one I know of is the Wombat ADB-USB converter. (You can find plenty of converters that go the opposite way around, letting you plug ADB devices into USB.)

You can theoretically put anything you want on ADB, but you'd need drivers to do anything but mouse/keyboard, and Wikipedia lists the "actual" bitrate as 10 kbit/s.


The link itself has the answers to your questions.


A fantastic off-the-shelf solution is already available: https://www.bigmessowires.com/floppy-emu/

It can emulate a floppy or hard drive. I tend to use a 2GB hard drive image which makes hacking on classic Mac a delight.


The floppyemu is awesome for floppy emulation or for old HD20-like hard drives. But they are too slow for macflim.

As I say on the link, you need either a real scsi disk, or, better an scsi emulator, like a SCSI2H https://store.inertialcomputing.com/SCSI2SD-s/100.htm, a RaSCSI https://www.tindie.com/products/landogriffin/rascsi-macintos..., a BlueSCSI https://gumroad.com/l/bluescsi-1b or a MacSD http://macsd.com/

The Mac(s) on the video have a SCSI2HD v5.5, with 4 2Gb partitions on a microsd. I can mount the first partition on my linux to copy stuff onto it (in general via the minivmac emulator).


Not ADB, but AppleTalk might have handled it.


A few years ago I built an adapter to allow classic Mac CRT's to be used with BeagleBone or Raspberry Pi systems ( https://trmm.net/Mac-SE_video). X11 has supported 1-bit mono displays since forever, so it mostly worked out of the box with well written programs.

Watching youtube videos in 1-bit is an amazing aesthetic. Unfortunately all of my videos of it were on vine, so this Muybridge-esque cat video seems to be the only one that I cross-posted to twitter: https://twitter.com/qrs/status/1045272076750401536


Hey that's cool, awesome, and completely outside of area of expertise! I love it!


Ah, full justification for me to now upgrade my Mac Plus with an accelerator board: https://www.micromac.com/products/multispeed.html

Surprised these are still ~$100-200 ... that's a bargain.


i'm skeptical this link actually works... googling around, it looks like no one might be watching this site: https://www.reddit.com/r/VintageApple/comments/6svp32/any_ac...

I've been looking for an accelerator board for my mac SE, but can't find anything reasonably priced anywhere...


Ah, well, that's too bad. And you're right, what can be found is expensive.


It's interesting to see old hardware being used for video that was never thought capable.

A few weeks ago I saw that there is a guy making carts that play 80's movies on Atari 2600's.

(The quality of the movies is terrible, but it's a fascinating project. And the carts and boxes look real.)


If the scanout is at 60Hz you can probably get shades of grey in there by a temporal dither.


Ouch.

You planted an idea in my brain that may lead to the complete re-development of the whole thing. 3 colors? That would be the middle link between the Original Mac and the Original NeXT !


I’m not sure I understand what’s new here: I remember watching early QuickTime video on my SE30 and marveling that it managed to convert on the fly to dithered B&W.

Still: love to see this!


Are you sure?

I may be wrong, but I am pretty sure that Quicktime on a SE/30 was not able to display fullscreen videos at 24 fps. Also, the dithering used in QuickTime was an ordered dithering, which IMO is pretty ugly and eats details.


Oh gosh no — not full screen or full frame rate. As I mentioned in another response, “full motion” in my head did not translate to “full screen” so the claim emphasis (again, in my head) was more on the “(dithered) b&w video on old Macs” aspect.

Kudos!


Maybe the difference is smooth full screen playback? I remember the early QT too, and used it on my old LC. Playback was mostly ok (15 fps or so) at 320x240 (think that was the resolution) but would strain if I increased the size.

Memories are a bit weak, so I might be misremembering some of this. But I do clearly remember full screen videos dropping a ton of frames. I used to put full screen videos up when I had parties (computer video was still a novelty and it made for a nice backdrop as people danced/drank) and it was 5 fps at best on that poor underpowered machine.


Yeah having used many Macs from that era even a species out II series Mac would have a lot of stuttering playing any video larger than about 320x240, and definitely nowhere near 24 FPS.


Oh, definitely: video on the SE30 was maybe 100x60 pixels? And as you say, not 30fps.

I was just reacting to how everything here seems to emphasize the “it does b&w dither video” aspect over the “large format and high frame rate” aspect.


This makes me want to dig my old Mac Plus out of the garage. Very cool!


This is so cool




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: