24 April 2017, 10:53 | #1 |
Registered User
Join Date: Nov 2016
Location: USA
Posts: 134
|
HAM Video Variants - FS-UAE vs Real Amiga Hardware
Hi guys,
I've created a video with 5 different HAM variants (+ 8-bit sound), 4 run on my real Amiga (4000/060) just fine, the very last (version 5), is not fast enough on my real Amiga, but runs fine in FS-UAE 2.8.3 (in 4000/040 mode). The video shows HAM6/HAM8, with a shared color palette and with multiple color palettes (one per frame) in lores (4 versions), and one version in hires. My guess is that FS-UAE doesn't model certain aspects of the Amiga bus sytems and IO systems that's why version 5 shows a different behavior. It didn't run that well in older UAE versions, but with FS-UAE 2.8.3 this appears to work better now (or too good, depends on how one sees it). FS-UAE runs in full-screen mode. The nice side-effect is that you can run converted HD videos this way in the Emulator (e.g. converted to 320x256), but when stretched it all comes out right (with correct ratios) again. Here is the recorded FS-UAE session, in case you want to see it (from artefact-rich to very good) : [ Show youtube player ] For version 5 (hires with 8-bit sound) I also created the full-length video: [ Show youtube player ] I hope to find time to look into what can be done with my CD32 cheers! |
24 April 2017, 23:40 | #2 |
Banana
Join Date: Jul 2016
Location: Darmstadt
Posts: 1,217
|
Impressive!
It just occurred to me that HAM is a form of run length encoding, or at least close to it. |
25 April 2017, 00:26 | #3 |
Registered User
Join Date: Mar 2012
Location: Norfolk, UK
Posts: 1,157
|
Very cool! Can the real Amiga cope with Hires if you drop from HAM8 to HAM6, I wonder?
|
25 April 2017, 00:34 | #4 |
Moderator
Join Date: Jan 2002
Location: Chicago, IL
Posts: 3,392
|
Kool, thanx for taking the time to do this.
|
25 April 2017, 08:28 | #5 |
Registered User
Join Date: Nov 2016
Location: USA
Posts: 134
|
Intersting idea. I think it would be close to what is possible considering only memory bandwidth. Although I don't think that it would look better than some "Copper-stretched" HAM8 hires, it would be interesting to see whether it is fast enough.
|
25 April 2017, 09:07 | #6 | |
Registered User
Join Date: Nov 2016
Location: USA
Posts: 134
|
Quote:
My variants are 1) a lossy 24-bit picture compression format with hardware decoder 2) the HAM pixel data is an instruction sequence with 4 different instructions; 3) it's an extended fancy planar mode. |
|
25 April 2017, 09:52 | #7 |
Banana
Join Date: Jul 2016
Location: Darmstadt
Posts: 1,217
|
I'd argue that, for a given pallet, it is lossless. There's loss going from 24-bit to whatever HAM pallet you've chosen though.
I find it amazing what 20+ year old hardware can do. The Amigas were such well designed machines for their day. |
25 April 2017, 11:27 | #8 |
Registered User
Join Date: Mar 2016
Location: Australia
Posts: 882
|
There was a bug in older UAE versions where ham6 on emulated AGA hardware would display an incorrect palettte.
I know it's fixed in recent winuae vertsions, I assume the latest FS-UAE includes the fix. |
25 April 2017, 13:11 | #9 | |
Registered User
Join Date: Mar 2012
Location: Norfolk, UK
Posts: 1,157
|
Quote:
I wonder, too, what could be achieved in HAM6, by carrying forward errors from each frame to the next when encoding, to introduce a temporal dithering element. (Assuming you're not already doing that?) |
|
25 April 2017, 13:58 | #10 |
Registered User
Join Date: Jul 2015
Location: The Netherlands
Posts: 3,437
|
Wonderful results there. The palette-per-frame options are great quality, regardless of OCS or AGA. The HAM-8 hires version looks more or less identical to the original
I wonder how these would play on less powerful hardware, like an AGA machine with 68030 or maybe an ECS machine with 68030/68040? |
25 April 2017, 19:19 | #11 | |
J.M.D - Bedroom Musician
Join Date: Apr 2014
Location: los angeles,ca
Posts: 3,603
|
Quote:
What bothers me is the weight of those animations; if we envision some practical use - for an opening movie or cut scenes in a game in example - it cannot be around 700 megabytes for three minutes; some form of codec might be needed that is viable for the target platform. |
|
26 April 2017, 05:49 | #12 |
Registered User
Join Date: Nov 2016
Location: USA
Posts: 134
|
|
26 April 2017, 06:14 | #13 |
Registered User
Join Date: Nov 2016
Location: USA
Posts: 134
|
I applied dithering on each frame (with multiple palettes), but not temporal. The dithering certainly improves it.
|
23 June 2017, 06:24 | #14 |
Registered User
Join Date: Nov 2016
Location: USA
Posts: 134
|
I just found out that one of the tools that I used for converting the pictures, png2ilbm, doesn't support HAM and the generated frames in versions V3-V5 in this video are actually "only" AGA8 frames! Hence, there might be even more possible (png2ilbm does an awesome job in converting to AGA though). Versions V1 and V2 are indeed HAM videos.
|
23 June 2017, 15:24 | #15 |
Registered User
Join Date: Feb 2012
Location: #DrainTheSwamp
Posts: 4,545
|
|
25 June 2017, 00:22 | #16 | |
Registered User
Join Date: Nov 2016
Location: USA
Posts: 134
|
Quote:
With png2ilbm I also do dithering. Dithering makes a great difference; png2ilbm is available for many platforms (including Amiga): http://oscomp.hu/?games/s/png2ilbm In particular, with png2ilbm you can also force the background color to be black in all frames. It's a detail, but unlike all the CDXL workarounds with black frames around the video etc. the videos I generate work out of the box (otherwise you get flashing backgrounds if the video is not covering the entire screen). I am looking for excellent looking&sounding results, but I am willing to compromise on everything else. However, I am also interested in playing videos on my CD32 (most likely with a CDXL-ish format reading directly from the CD ROM). The key to good quality of AGA videos on the original Amiga hardware is to have different color palettes per frame, but this also complicates any compression. The ANIM format compresses most frames only by about 1-8% in these videos. The reason for this low compression ratio is also the different color palettes per frame. The ANIM players also have a significant overhead in decompressing the videos. For these kinds of videos the ANIM format doesn't pay off, but the AnimFX player is most flexible and supports sound. That's the only reason why I am generating ANIM files. The CDXL player 'cdgsxl' is too slow @25 FPS on my A4000 with the blit option (in PIO4 mode). Without the blit option it is "fast enough" to play the video at 25 FPS in lores, but has a lot of flicker (in other words it doesn't work). The other option is the RiVA mpeg player. But so far I couldn't find any ffmpeg conversion setting where the RiVA player is fast enough @ 25 FPS on my A4000/60 and it looks at least somewhat as good as the AGA videos I generate. The sound works great, but it is skipping too many frames. However, I didn't spend much time on this one, there might be a way to get better results. I also have a Picasso IV. BTW, just for the fun of it, I am also looking into writing my own player |
|
25 June 2017, 00:38 | #17 |
Registered User
Join Date: Jun 2010
Location: PL?
Posts: 2,883
|
ffmpeg can create files with CLUT (CLUT can be computed for whole video sequence or independently for every frame as separate step) and ffmpeg quality is not bad.
https://ffmpeg.org/ffmpeg-filters.html#palettegen https://ffmpeg.org/ffmpeg-filters.html#paletteuse |
25 June 2017, 19:03 | #18 |
Registered User
Join Date: Feb 2012
Location: #DrainTheSwamp
Posts: 4,545
|
@movec: some valuable infos, thanks. if you have something to test, just announce it
@pandy71: this is cool, have to test that too. thnx |
16 July 2017, 16:50 | #19 | |
Registered User
Join Date: Nov 2016
Location: USA
Posts: 134
|
Quote:
[ Show youtube player ] |
|
16 July 2017, 19:25 | #20 |
Banned
Join Date: Jan 2010
Location: Kansas
Posts: 1,284
|
It looks and sound great, especially for the resolution, but the file is big at 493MB for 3 minutes. You need AGA, a fast CPU (>=68040?), fast drive interface (3+ MB/s?) and a large drive. There are probably fewer than 5% of active Amiga owners who could play the video on real hardware. HAM8 video may have been good for fast and easy low compression decoding years ago but it is primitive with the CPU performance and video encoding technology of today.
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Netplay on real Amiga hardware? | lesta_smsc | support.Hardware | 3 | 04 December 2018 08:03 |
HAM Video tutorial | majsta | Amiga scene | 59 | 17 October 2018 22:44 |
Help Needed - Is HAM Video Possible? | HAM6_Video | Amiga scene | 6 | 15 March 2017 21:05 |
Technical info on HAM-E, DCTV, ColorBurst hardware wanted | mark_k | Coders. General | 5 | 12 January 2008 01:52 |
Amiga Video Hardware, Worth anything? | Mick_AKA | MarketPlace | 3 | 07 April 2006 01:45 |
|
|