Major release: FMV transcoding and playback on X68000

Started by eidis, June 15, 2014, 05:19:41 AM

Previous topic - Next topic

eidis

  Hi Guys !

Today I made a massive discovery which was inspired by Neko68k. A method was discovered how to transcode video files to X68000 and play them, even with audio. It works pretty well, even on stock 10Mhz machines with 2MB RAM. I would like to dedicate this discovery to Lawrence.

Check out the proof on concept here:
http://nfggames.com/X68000/Misc/Video.zip

Boot from the image and select short or long version.

-=How to transcode video to X68000=-

Things you will need:

Avidemux
http://fixounet.free.fr/avidemux/

VirtualDub
http://www.virtualdub.org/

AVI->CPK Encoder (aka AviToSaturn)
http://vberthelot.free.fr/SX/satdev/Tools.html

SoX - Sound eXchange
http://sox.sourceforge.net/

Step1 - Preparing video

First of all prepare your video file and try opening it in VitualDub. It will most likely fail to open or complain about variable bitrate audio, because the file format is too modern. In that case open the file in Avidemux, select Video Output as Mpeg4 ASP (xvid4) and Audio output as MP3 (lame). Then hit save button and input name for the new file.

The newly created file will be fully compatible with VirtualDub. Now open it and select the following options:

Video -> Filters -> Add -> Resize:
Type "30" in the Relative % box
Select Filter mode "Lanczos3"
Select "Crop to aspect ratio"
OK
OK
(VirtualDub.png)

Video->Frame Rate:
Select Convert to fps "10"

Video->Compression:
Intel IYUV codec (i420)

Audio->No audio (We'll get back to it later)

File->Save as AVI

Save it as Video.avi

Step2 - Preparing audio

Reopen your source video file in VitualDub and select the following options:

Audio->Source audio->Stream 1
Audio->Full processing mode
Audio->Compression-><No compression (PCM)>
OK
File->Save WAV

Save it as Audio.wav

Copy the created WAV file to SoX directory and run the following command from command prompt:

sox.exe Audio.wav -r 22050 -b 8 -c 1 out.wav

It will convert it to 8bit mono 22050kHz out.wav file.

Step3 - Joining the two files together

Open Video.avi in VirtualDub and select the following options:

Video->Direct stream copy
Audio->Audio from other file->out.wav
Make sure that "Audio->Direct stream copy" is selected
File->Save as AVI
Save it as Ready.avi

Now open Ready.avi in your media player and make sure that it plays correctly and has sound.

Step4 - Transcoding to X68000

Open AviToSaturn, click "Add files" and select Ready.avi. Click "Start" and enjoy the show. AviToSaturn will close with error, if the Audio part was not done right. If everything went well, you should now have Ready.cpk file in the same directory as Ready.avi.

Step5 - Let's get it on

Copy Ready.cpk to HDD video template video directory and play it by typing "hcpkplay ready.cpk"

A few words of advice:

10fps is the sweet spot. Go higher and everything will start to lag. Go lower and experience will be unenjoyable.

Try not to use resolution which is higher than 200x200. I noticed that best results are achieved when average bitrate, shown while converting with AviToSaturn, is close to 100 kBytes/sec. The resolution which can be seen in VirtualDub.png gets decreased if "Crop to aspect ratio" is selected. In this case the final resolution will be 192x144.

The audio part is as good as it gets. Go lower and the sound will become unbearable.

Keep the scene alive !
Eidis
X68000 personal computer is called, "X68K" or "no good good" is called, is the PC that are loved by many people today.


Neshek

Wow.
Great finding guys :)

Cinepak.
I get the feeling...
Searching for old Saturn game.

AvitoSaturn? :)

Edit: Ok, it plays Sega saturn cinepak files, but i guess 320x244 is a bit too much for my 10mhz x68k ^^'