MPEG2PLY.EXE:
Prologue:

 mpeg2play version 1.1b for 32-bit Microsoft Windows.  Ported 
 to Windows via MS Visual C++ on July 16, 1994 by Sorin Papuc 
 (sop@compcore.com) and Chad Fogg (cfogg@netcom.com)

 This archive contains only the files that differ from 
 mpeg2play version 1.1b unix source distribution (mpeg2play_v1.1b.tar.gz).
 MPEG2PLY.EXE is an executable. Some of the modes of mpeg2play Unix
 were disabled for reasons of time or porting difficulty, however the
 user is assured that all modes and features of the main Unix version
 will eventually be implemented in the Windows version.  MPEG2PLY.EXE 
 borrows most of the Windows-specific interface and code templates from 
 MPEG2DEC.EXE.


 1. Systems
  - had to disable "if(base.infile!=0)" in mpeg2ply.c since Windows
    numbers its files (returned by int open()) independent of threads.
    Also, a statement initializing sysstream to 0 was added.

 2. Features
  - frame rate control, loop play, scalability, and fast dither modes not 
    yet implemented due to time or implementation constraints.  This 
    will change fairly soon.  The player is a little slower since we use 
    only the display routines from MPEG2DEC.EXE currently.

MPEG2ENC.EXE:
  - this is an experimental Windows version of mpeg2enc.  It requires
    use of the script file *.par, like the MS-DOS and Unix versions.  It is
    still recommended that you use the MS-DOS version (MPEG2D11.ZIP)
    since Windows offers no advantage due to the fact that no display
    integration has been made yet.  

---------
		    MPEG Software Simulation Group codecs
			     for Windows 32s 
			   (MPEG-L@netcom.com)

MPEG2DEC.EXE and MPEG2ENC.EXE are Windows 32s ports with integrated
display functions of the MPEG Software Simulation Group's programs. 

MPEG2PLY.EXE is the port of mpeg2play---Stefan Eckart's variation of
mpeg2decode which optimizes speed through fast decoding methods such as
approximation techniques, loop unravelling, et al.

All Win32s programs were ported with Microsoft Visual C++.  Only the
main() program and display files (mpeg2dec.c, mpeg2enc.c, or mpeg2ply.c) 
differ from the standard "Unix distribution."

If you do not have a 32-bit Windows environment (e.g. Win 4.0 Chicago,
Windows NT), but plain old Windows 16 (e.g. Windows 3.1), yet you do
possess either a 386, 486, or Pentium-based PC, you can download the
Microsoft 32-bit extension program, "Win32s" from the Microsoft FTP
site:

  site:       ftp.microsoft.com  [198.105.231.1]
  directory:  developers/DEVTOOLS/Win32SDK/
  filename:   Win32s115a.zip     (this is the latest edition--June 23, 1994)

Win32s archive (mpeg2w11.zip):      

 mpeg2dec:   
   mpeg2dec.c             Main() routine.  Initiates application and display.
   mpeg2dec.r             MS Visual C++ resource file.
   makefile               MS Visual C++ project file.
   gui.h                  #include constants for MS GUI values.
   mpeg2dec.exe           Speed-optimized executable
   grayleo.ico            mpeg2dec.exe 32x32 4-bit System Palette icon


About the windows icon:
The 32x32 4-bit icon for MPEG2DEC.EXE and MPEG2ENC.EXE is a silhouette
of Dr. Leonardo Chiariglione (CSELT, Italy), none other than our
co-founder and exhaulted lifetime Convenor of MPEG.

Acknowledgement:
Many thanks to Sorin Papuc (sop@compcore.com) for porting these programs
to Windows 32s.
				 mpeg2play
				 =========

			 Version 1.1b, July 13, 1994

	   (C) Stefan Eckart, stefan@lis.e-technik.tu-muenchen.de





  mpeg2play is based on mpeg2decode, (C) 1994, MPEG Software Simulation Group



Features
========

- plays MPEG-1 and MPEG-2 video bitstreams on 8 bit color X displays
- plays system layer (MPEG-1 only) streams, audio being ignored
- high quality ordered dither algorithm
- high speed interlaced to progressive scan conversion
- speed is about 90% of Berkeley's mpeg_play (somewhat platform and
  stream dependent)
- NCSA Mosaic compatible (as external viewer for video/mpeg)


Introduction
============

mpeg2play is a player for MPEG-1 and MPEG-2 video bitstreams. It is based on
mpeg2decode by the MPEG Software Simulation Group. In mpeg2decode the
emphasis is on correct implementation of the MPEG standard and comprehensive
code structure. The latter is not always easy to combine with high execution
speed. Therefore a version has been derived which is optimized for higher
decoding and display speed at the cost of a less straightforward
implementation and slightly non-compliant decoding. In addition all
conformance checks and some fault recovery procedures have been omitted from
mpeg2play.


Availability
============

The most recent versions of mpeg2play and of the MPEG Software Simulation
Group codec software are available by anonymous ftp from:

  ftp.netcom.com:/pub/cfogg/mpeg2

The Internet address of ftp.netcom.com is [192.100.81.1].


Installation
============

Please report problems, bugs, suggestions etc. to

  stefan@lis.e-technik.tu-muenchen.de

I'm also interested in speed comparisons with mpeg_play on platforms
other than Sparc (preferably based on 'well-known' bitstreams).


Step 1: edit Makefile
---------------------

You may have to set CC to your C compiler and CFLAGS to the flags required
by the compiler. Follow the instructions in the Makefile regarding the
correct setting of the other variables (USE_SHMEM, LIBS, INCLUDEDIR and
LIBRARYDIR).

Use of shared memory (USE_SHMEM) requires SYSV shared memory support and
an X server implementing the MIT-SHM extensions. It results in a
considerable speed increase if server and client run on the same machine.

If you use a C compiler which doesn't understand ANSI-C function prototypes
add -DNON_ANSI_COMPILER to CFLAGS.

Note that decoding speed depends on the compiler. Here are some results on
a SPARCstation 10 (single CPU) for a particular MPEG-2 sequence:

  compiler        user time
  ---------------------------
  cc  -O3         98.1 sec
  gcc -O2 (2.5.8) 90.4 sec
  acc -fast       83.2 sec


Step 2: make
------------

Type 'make'.


Usage
=====

mpeg2play {options} input.m2v {upper.m2v}

Options:

-vn  verbose output (n: level)

Instructs mpeg2play to generate informative output about the sequence
to stdout. Increasing level (-v1, -v2, etc.) results in more detailed
output.

-on  output format (0: X11, 1: none)

-o1 is sometimes useful for benchmarking.

X11: display decoded video on an X Window System server. The current version
     supports only 8 bit color display. You can use the DISPLAY environment
     variable to select a (non-default) display. The output routines perform
     8 bit dithering and interlaced to progressive scan conversion.


-l  loop sequence

Setting this flag results in repeated display of the sequence.


-s infile  spatial scalable sequence

Spatial scalable video is decoded in two passes. The -s option specifies
the names of the output files from the first (lower layer) pass to the
second (enhancement layer) pass. 'infile' describes the name format of the
lower layer pictures for spatial scalable sequences as a printf format
string. It has to contain exactly one integer format descriptor (e.g. %d,
%02d) and, a %c descriptor. The %d descriptor has to be before the %c.

-q

Set this switch to suppress output of warnings to stderr. Usually a bad idea.

-fn

Set frame rate to n frames / sec. Otherwise the sequence is played at maximum
speed.

input.m2v

name of the file containing the MPEG stream. '-' denotes reading the stream
from stdin.

upper.m2v

is the name of the upper layer bitstream of an SNR scalable stream or a
data partioning scalable bitstream (input.m2v is the lower layer).


Examples
========

non-scalable stream (one layer, one pass):

	mpeg2play base.m2v

SNR-scalable stream (two layers, one pass):

	mpeg2play base.m2v snr.m2v

spatial-scalable stream (two layers, two passes):

	mpeg2decode base.m2v l%d%c
	mpeg2play -s l%d%c spatial.m2v

hybrid spatial/SNR-scalable stream (three layers, two passes):

	mpeg2decode base.m2v l%d%c
	mpeg2play -s l%d%c spatial.m2v snr.m2v

hybrid SNR/spatial-scalable stream (three layers, two passes):

	mpeg2decode base.m2v snr.m2v l%d%c
	mpeg2play -s l%d%c spatial.m2v

etc.


Use with Mosaic
===============

mpeg2play can be used as an 'external viewer' in conjunction with the
WWW (World Wide Web) browser NCSA Mosaic:

- add the directory containing mpeg2play to your PATH environment variable
- make sure you have a file .mailcap in your home directory containing the
  line:

video/mpeg; mpeg2play %s

  (or rename mpeg2play to mpeg_play)

It is usually not required to add the MPEG-2 file suffix .m2v to the
mime-types file (if the HTTP server supplies the correct Content-Type: header).

If you want to set up a HTTP daemon to serve MPEG-2 files, you have to add
'AddType .m2v video/mpeg binary 1.0' to the server configuration file (at
least for CERN httpd 3.0).


Acknowledgements
================

Thanks to Dave Wecker for providing the frame rate control routines. I
have made some modifications, so it's me to blame if it doesn't work as
expected.

--
Stefan Eckart
Fraunhofer-Institut fuer Festkoerpertechnologie (IFT-ST)
Hansastr. 27D
D-80686 Muenchen, Germany.

E-mail: stefan@lis.e-technik.tu-muenchen.de
