Here and further: I realize that term "flatten" has originally a different 
		  meaning. Here it means: make QuickTime movie playable on
		  non-Mac platform.


				QTFLAT
			QuickTime Flattener for DOS.
 			     Version 1.1


	This program is based on my own investigatons of flattened and
unflattened QuickTime Movies. So it may work and may not. But I hope it'll
solve part of your problem with QuickTime for Windows.


		  The structure of QuickTime movies.

Data fork of the movie begins with 8 bytes:
      first 4 bytes - Double Word (apple double word - reversed sequence of
		      bytes - higher byte - lower address) - offset of Movie
		      Description (that's my guess. When I switched it with
		      the one from another movie all the movie all the movie
		      info was taken from it (and the screen turned into crap
		      )). If this value is 0 the movie is unflattened and
		      this Movie Description locates in resorce fork.

	second 4 bytes - the string 'mdat'. I decided that to be a signature.

Resource Fork begins with apple dword that points to a chain of data chunks 
	with structure: appleDword length , length bytes of data. One of data 
	chunks is movie description.

Movie Description begins with 8 bytes:
	first 4 bytes - Apple Double Word - length of Movie Description. If
		      the movie is flattened and the end of file doesn't
		      follow the Movie Description QTW will say its usual
		      'Couldn't open the movie ...'
	second 4 bytes - the string 'moov'. I decided it to be a signature.

The Movie Descriptions in the tail of flattened and in the resource fork of
unflattened movie are not exactly the same. But the differences seem to be
unimportant (at least for QTW) since flattened with qtflat.exe movies were
loaded with no problem.



		       What this program does.

      The program can build flattened movie from separate resource and data
forks according to format described above. It also can check the integrity
of flattened QuickTime file and try to fix it if it's not correct. Program
recognizes the macbinary headers and skips them.
Call it:

qtflat.exe Data_fork_file Resource_fork_file Resulting_flattened_movie

if you want to build flattened movie from unflattened and

qtflat.exe Flattened_movie_file

if you want to check the integrity of flattened QuickTime movie.


		  Where to get QT Data and Resource forks.

Resource and Data forks I got using PCExchange on Mac to write it on DOS 
diskette (Data fork is the main file. Resorce - the file with the same name
in the directory RESORCE.FRK). And using mac-ette from oak.oakland.edu (or
any othe SimTel mirror) /pub/msdos/diskutil/mac-ette.zip (there's also file 
/pub/msdos/mac/macdisk.txt (I'm not sure about the name) describing the 
programs to read Mac disks on PC).

	The QT files from Internet are usually BinHexed .SIT,.CPT or .SEA 
archives of QT movies. HexBin (DeBinHex) for DOS is available at oak.oakland.edu
/pub/msdos/mac or other SimTel mirror. There's also Unsit (Unstuffit) for DOS
there. Xbin.exe produces 3 files: file.dat file.res file.inf. You need to join
file.inf and file.dat to unsit it. Type: copy file.inf/b+file.dat/b file.sit.
Then  Unstufit x file.sit. That gives two files: resource and data fork (You'll
be prompted to name them). Then you can use my program on them.

	Unfortunately Unstufit handles not any .SIT file. And I haven't seen 
UnCPT for DOS yet. I found the following solution. There's Mac Emulator for IBM
available at  ftp.funet.fi somewhere /pub/msdos/.../emulators/exctr12a.zip 
called Executor. The pack contains BinHex 5.0 and Compact Pro. Place it in 
Executor directory in a root directory. Executor can access DOS disks, Mac 
diskettes and simulated Mac volumes (contained in DOS files). So you start 
Executor, run BinHex 5.0 (important - remove everything in binhexed file up 
to the line (This must me converted....)) choose Open, Press (Drive) till you 
get to the DOS disk (The only disk where Executor is located will be available),
select .hqx file. Then exit Binhex, run Compact Pro and open the debinhexed 
archive. Extract the file to temporarily Mac volume (create it with enclosed 
mkvol.exe and call exdemos1.hfv). Compact Pro refuses to uncompress directly 
to DOS disk. Then choose HFS_Xfer from system menu and copy the file to DOS 
disk. It'll produce two files: file and %file. %file is resource fork. It 
differs from usual resource fork so use /e switch running my program:

 qtflat /e file %file file.mov.

	Executor doesn't always work smoothly. Sometimes HFS_Xfer produces
crap. Sometimes errors appear while accessing Mac diskettes. But it does the
job. But if you intend to handle big files you'll need either to register or
crack Executor because it has 10 work limit.

A couple of flattened movies (unplayable by QTW but fixed by my program)
I got using Veronica Gopher search.

Great thanks to Mark Podlipec who gave me source of his flattener for UNIX.

Hope that helps.

Alex Novikov (hcc@ncc.free.net).