Help encoding divx movies for dreamcast

Discussion of topics related to licensed games, software hacking/modification, prototypes, and development kits belongs here. Includes topics related to emulating the Dreamcast console on your computer or on another gaming console. Discussion of Reicast should go in the Official Reicast Forum.
Post Reply
User avatar
crazyrom
Ex-Help Forum Mod
Ex-Help Forum Mod
Posts: 1112
https://www.artistsworkshop.eu/meble-kuchenne-na-wymiar-warszawa-gdzie-zamowic/
Joined: Wed Mar 20, 2002 11:09 pm
Location: Your mom's bedroom
Has thanked: 0
Been thanked: 0
Contact:

Help encoding divx movies for dreamcast

Post by crazyrom »

Hi long time no see... I used to make divx movies for the dreamcast i think with virtuadub can anybody tell me the setting i should use to make the divx flile work on the dreamcast... thanks...
User avatar
PH3NOM
DC Developer
DC Developer
Posts: 576
Joined: Fri Jun 18, 2010 9:29 pm
Has thanked: 0
Been thanked: 5 times

Re: Help encoding divx movies for dreamcast

Post by PH3NOM »

Whats up man?

Just a coincidence, I have recently decided to try again at writing an XviD Player for DC.
My idea was to hook up to LibXviD and LibMPEG2, and maybe ask BlueCrab about adding things to Kos-Ports. ( It could be convenient for game devs to have a video player out of the box... )

I am using the libxvid_1.3.0 as I used in DCMC 2.1.

However I have written a new player, that currently maxes the DC's resources out by using all available memory and multiple threads.
The stream buffers allow the decoder to run ~3 seconds ahead of the playback to fully utilize the CPU resources.
The player uses a producer / consumer threading model, that uses 3 threads and 3 buffers to handle the 3 main components:
-Main thread tasks:
a.) Read the file chunk (avi or mpeg, currently only avi supported)
b.) Decode Chunk ( Audio or Video ) into local buffer ( not shared by threads )
c.) Push decoded chunk into shared stream buffer ( thread safe )
-Audio thread tasks:
a.) Sleep until AICA sound stream requests more audio samples
b.) Pop audio samples out of shared stream buffer ( thread safe )
c.) Copy audio samples to the AICA for playback
-Video thread tasks:
a.) Pop video out of shared stream buffer ( thread safe )
b.) Copy video frame to the PVR
c.) Using a hardware timer and a given frame rate, sleep until a frame is to be displayed
d.) Render the frame on the PVR
Just a technical note, the stream buffers I wrote use an efficient circular buffer to store the stream data. This is more efficient than, for example, the mp3 and ogg players in KOS that instead, shift the entire buffer back every single time data is read from the buffer.

Here is the current build, it will play a clip "sample.avi" located at the root of the CD, i.e. in the same folder as your 1st_read.bin.

I have tested some 352x192p, 23.976fps XviD clips with MP3 Stereo 192kbps.
You should be able to use any modern video encoder you like, just keep the pixel count around 352x192 at 23.976 fps.

Keep in mind it is still work in progress, but it should be stable enough for testing.

Get the binary here:
xvid-dc.rar
XviD-DC 11-23-14 (binaries)
(1.45 MiB) Downloaded 117 times
Get the source here:
xvid-dc-src-11-23-14.rar
XviD-DC 11-23-14 (source)
(1.99 MiB) Downloaded 116 times
Post Reply