Author Topic: Movie-related code added - update your projects!  (Read 4227 times)

G

  • *
  • Posts: 104
  • , kupo.
    • View Profile
Movie-related code added - update your projects!
« on: 2007-02-21 20:16:11 »
Hi everyone. At last I add code for movie decoding. Updated only Linux makefiles. Please update your project files, added:
q-gears/src/common/movie/PSXMDECDecoder.h
q-gears/src/common/movie/PSXMDECDecoder.cpp
q-gears/src/ffvii/screentest/MovieTest.h
q-gears/src/ffvii/screentest/MovieTest.cpp

Currently I added to MovieTest module only plain STR files from CD1 - it's enough to copy them from PSX CDROM to data/MOVIE directory - don't try to play *.MOV files! - those one is copied incorrectly in Linux, in windows may not be copied at all. I write a dumper utility for them - but it isn't yet supports real *.MOV filenames and works only for CD-images. Later I'll modify it and add to svn.
Now I am working on using SDL_mixer XA-audio for movies (use something other than SDL_mixer? someone can do this better? - tell me... :) - I'll send the code I have [I combined from some sources of the internet console utility to play specified channel of XA file] )
Check out movies - it taked a lot of my time and nerves to figure out how to play them!

gigaherz

  • *
  • Posts: 105
    • View Profile
    • gigaherz's shitty stuff
Re: Movie-related code added - update your projects!
« Reply #1 on: 2007-02-21 21:29:44 »
Haven't tried it with ff7, but AFAIK windows supports mode2form2 sectors fine, else it wouldn't be able to play videoCD movies!
vcd uses mode2form2 sectors to save space on video data, where it doesn't require error correction, and I assume ff7 does the same for movies.

G

  • *
  • Posts: 104
  • , kupo.
    • View Profile
Re: Movie-related code added - update your projects!
« Reply #2 on: 2007-02-22 05:03:50 »
"windows supports mode2form2 sectors fine, else it wouldn't be able to play videoCD movies!" - yes, but windows is a thing, where you never can now whats are doing on the system... Actually clean windows isn't always support copying that files, but when you install for example Nero or other multimedia software - this software installs filter for that mode2form2 files. But one no - if you copy *.MOV files in your windows without problems means that your windows have that filter and this filter add to beginning of your *.MOV file RIFF-header (look in hex-viewer), which totally confuses me - what relation can have RIFF header with PSX sectors? Anyway after that header we have raw sector dump. Of course can skip this header...

gigaherz

  • *
  • Posts: 105
    • View Profile
    • gigaherz's shitty stuff
Re: Movie-related code added - update your projects!
« Reply #3 on: 2007-02-22 12:44:15 »
RIFF is a little-endian version of the FORMs file format in some other OS... it's basically a standard way to define files, no matter what you have inside them. Windows AVI, WAV, and other file formats use it.

RIFF<size>CDXA
fmt <size>....8.XA........
data<size>...

It's basically telling you it's a CDXA-formatted file, with the "fmt "(format) set to those values. after the main fourCC code, there is a 32bit size, and then <size> bytes of data. It's a simple format.

00 00 00 00 ....
38 01 58 41 8.XA --the "." in here is a byte(1)
01 00 00 00 ....
00 00 00 00 ....

I suppose "XA" means it uses XA audio in the stream, but no clue about the other bytes. All the files use the same header so who knows.

Anyway I have a theory: the STR player probably couldn't handle mode2form2 sectors, so when they were reaching the space limit, they decided to use mode2form2 sectors, and had to make a new file format for it. I might be totally wrong on this, but it makes sense. ;)