New Hints about how to set up dosemu(/freedos) and mplayer

Alex Kloss alex at Stud-Mailer.Uni-Marburg.DE
Tue Jan 8 22:36:37 PST 2002


Hello, there!

This are my latest hint additions. The dosemu hint is just in the
beginning, the mplayer hint is pretty much up to date.

Next to come may be a "wine w/o windows" hint. But who wants windows when
linux is working, anyway? :-)

Another thing I am working at is a pcmcia hint. But the bootscript makes
me troubles. I'll appreciate any help.

Alex
-------------- next part --------------
TITLE:		Setting up dosemu with freeDOS or any other dos
LFS VERSION:	any
AUTHOR:		Alex Kloss <l.x. at gmx.de>

SYNOPSIS:
	Sometimes you want to use the good old Disk Operating System,
	e.g. for playing some real old games (like commander keen), but
	you don't want to shutdown your linux box and don't have a DOS
	bootdisk anyway...

HINT:	
	Get dosemu (and freeDOS) now!

DOWNLOADS:
	http://www.dosemu.org
	dosemu-<version>.tgz; dosemu-freedos-bin.tgz

INSTALL:
	dosemu:

	First edit the compiletime-settings to match your preferences.
	The file compiletime-settings.help explains the usage of these
	options. I myself used the following options:

	--snip
	config {
	  experimental on
	  sbemu on
	  mitshm on
	  x on
	  net on
	  dodebug on
	  slangforce on
	  oldslang off
	  runasroot off
	  linkstatic off
	  newint on
	  aspi on
	}
	--snap

	./rebuild all &&
	cp bin/* <wanted prefix, e.g. /usr/bin> &&
	mkdir /var/lib/dosemu /var/lib/dosemu/dosemu &&
	cp src/plugin/commands/*.com /var/lib/dosemu/dosemu

	now try "dos" or "xdos". If xdos complains about not finding
	the necessary fonts, you should edit your etc/X11/XftConfig
	and add to the first lines

	dir "/usr/X11R6/lib/X11/fonts/misc"

	and restart X.

	A minor problem is that the src/plugin/commands dir does not
	contain all of the dosemu stuff, for example the cdrom.sys
	driver is missing. You'll find the turbo C sources in
	/src/commands. Since you propably don't have turbo C, you'll
	have to find a way to 1. extract that driver from the binary
	distribution or 2. compile it without turbo C:

	cd src/commands &&
	for i in aspi cdrom ems emufs; do
	  as86 -b ${i}.sys ${i}.S
	done &&
	cp *.sys /var/lib/dosemu/dosemu

	Just don't mind the errors. The drivers should work anyway.


	freedos:

	mkdir /var/lib/dosemu &&
	cd /var/lib/dosemu &&
	tar xzfv /<wherever it is>/freedos-bin.tar.gz


	any other dos:

	mkdir /var/lib/dosemu /var/lib/dosemu/dos &&
	cp /<wherever it is>/io.sys /var/lib/dosemu &&
	cp /<wherever it is>/msdos.sys /var/lib/dosemu &&
	cp /<wherever it is>/command.com /var/lib/dosemu

	You may be interested in copying other files you want (himem.sys)
	to the dos directory.

CONFIGURE:
	Copy etc/dosemu.users.[easy|secure] and etc/dosemu.conf to /etc and 
	edit them to match your preferences.

TODO:
	Check for other DOS, e.g. Caldera Open Dos, which is also free.

Hope this was helpful!
Alex
-------------- next part --------------
TITLE:		Getting the best out of MPlayer
LFS VERSION:	any
AUTHOR:		Alex Kloss <l.x. at gmx.de>

SYNOPSIS:
	How to get the best of the great linux media player MPlayer.

HINT:	
	Your system is too slow for avifile and you like pure gcc code
	without object orientation better anyway. Why not trying
	MPlayer? You don't even need an X-Server to let it run...

DOWNLOADS:
	http://www.MPlayerHQ.hu/downloads.html (CVS version should be
	fine, but also the stable versions are known to be pretty)

	You should also load a recent package of the windows codecs and
	of the OSD fonts (if you don't want a On Screen Display anyway,
	you could leave those alone).

OPTIONAL PREREQUISITES:
	XFree86 (look at the X hint)
	aalib (www.aalib.org)
	SDL (also uses X; http://www.libsdl.org)
	GGI (if you want it: http://www.libggi.org)
	SVGAlib (www.svgalib.org)
	directfb (used by SDL as well as by MPlayer;
	http://www.directfb.org)
	glib/gtk (http://www.gtk.org, only for gui)
	divx4linux (Videocodec: http://www.projectmayo.com)
	ffmpeg (dito: http://ffmpeg.sourceforge.net; use CVS if
	possible, obsolete since mplayer version 0.6.0)
	lib(dvd)css (for encrypted dvds, http://dvd.sourceforge.net)
	unzip (for unpacking fonts and/or windows codecs,
	http://www.info-zip.org, windows-codecs are in .tar.bz2 format
	since version 0.6.0)

INSTALL:
	aalib:
	------

	Before installing aalib, you should ask yourself if you really
	need it. It's not usable to really watch something (in console
	or not), you'll mostly have a picture like that:

||  00:00:01 ....-..............................................................
------ PAUSED -------................................. .. ... ..................
++=++++++++=;;.:.-..-.-.-.......................................................
+++++++|+|+||||==;.::.:.-.--.-.....-...........-.......................-.:..-...
vIi|++|++|i||Iiilvi;:-------:.:-:.::::-:.:.:.:----:-:.:.:....-.::.:.:.:-:.:.:-::
IIvlxii|i|||+il%||l|::-:.:-:.:-.:.:.:.:-:-----:.:.:.:-:.:.:<>_::.::-:-:.:.:::::.
llIIlvvvIliii||Iixlx==:-::-----:-:-:::::::::::.::-:--:.:-:-::)9aa.::.:-:-::::-::
lvvvIIIIvvIlIIlilIIIi::::::::::-:::::::::::::-::-:-:::::::-::::+Xma;::::::::::::
vIIIIvvIvIvvvvIllIvIi;::::::::::::::::;:;:::::::::::::::::::::::+xUb;;:;::::::::
vvvvlIlIvIvvnvvlllvvvi;;:;;;:;:;:;;=;=;;;;;;;;;;;:;:;:;;;=;;;;;::=Idm;==;=;;;;;;
llvvvlvIlIvvvvvvvlvvvvi;=;=;=;;=;=;;=;=;===;=;=;=;=;====;===;=;=;=|1Zz==========
llIIIvIvIIIvvvvvvvvvvnI>;=;==;==;=;=================;=;===========<oXX=+========
lIvIvvvvIIIIvIvvlvvvnIv>====;====;===;=============================iXA++++++++++
llvIvvvIIlllllvlvvvvnxilii=|=+==========================+===+=+=++|lnc++=+++++++
lllvIvvvvIliiIIIvIvvnvli|ilIxox====================+=+=+=+++++=++<xww|+++++++|++
IIIllIIvvIliIIIIIvIvnvvli|ilvvnn>=+===+==+=++=++++++=++++++=++++<idWt=+++|++++|i
IliIvlvIIvvIIlllIlIIvvvIiiiiinvns=++++=++=+=++=+=+=++++++++++++xumZ(=+|++++|=xn1
liillvIIvIvIvlIIIIvlIIvvIIIiiI1vi|=+=+++=++++=++++++++++++++|iumZ!=++|=+|++<xnnn
liliiiilllIvvvvlvIIIIvvvvvvililvlI>+++=+++++=+++++++++++|saoYT!|=+|+|++|++|ISovv
liiiiilIlvvvvvvlIIvvIvvvvIIlliilII|++=++++++++|=++|++|+|=+++++|+|+|++|+|+|+|3nnv
i|i||iiilIIvvvIllllvvvlvvxIli|inI|+++|+||+++++++|++++++++|+|+|++|++|+||xsi|ixnnv
ii|iiiilllIllIIliiillillxvvvvvvvv|||i||||i|||++++++|+|+|++|++|+|++|++xnnnnnnnnnn
iiiiillllllIIIIlilllllllvvvvlIvvx>||||iiiiii++|+|+|=+++|+|++|++|+|+||IvvIvvnnnon
vlvIlilillvllllliilll +++ Welcome to ASCII ARTS MPlayer +++ |+|+iixvvnvllIvnoooI
""^~^~~^~^^~^^~~^~~^"^""^^""""^^~~^^""^^^^~^^^^~-~----~--~--~--~"^^^^^^~^^^""~~~

	Maybe you'll recognize the DreamWorks trailer, but I wouldn't
	bet on it! It's more a "show off"-feature to make the windows
	users envious...

	./configure --prefix=<e.g. /usr> &&
	make &&
	make install
	

	SDL
	---

	This is a marvellous library for multimedia functions. It
	provides fast scaling and full screen functions using X,
	framebuffer or even ascii art. It's also necessary for a lot of
	other multimedia programs and games, so if you're interested,
	you should have it installed anyway.

	./configure --prefix=<e.g. /usr> &&
	make &&
	make install


	GGI
	---

	Some guys had the nice idea of doing a framework to unify all
	graphic	"targets" like ascii art console, X server,
	SDL, svgalib, framebuffer device, and whatever implemented. The
	drawback was mostly on security. I've tested it in an earlier
	version, but don't like to install it on my current system.
	Please refer to the install instructions of the developers.


	SVGAlib:
	--------
	The framebuffer device in the kernel is still said to be
	experimental. SVGAlib is what the linux community used before
	to have full access to their graphics hardware. It's still
	pretty stable, fast and usable. Only drawbacks: you need root
	rights to run it and it got no accelerated scaling functions.

	./configure --prefix=<e.g. /usr> &&
	make &&
	make install

	Please read the documentation!


	directfb:
	---------
	Since the framebuffer device is somewhat complicated to use,
	there's a library called directfb, which is an abstraction
	graphic layer featuring things like fast resizing, rendering,
	and so on.

	./configure --prefix=<e.g. /usr> &&
	make &&
	make install
	

	ffmpeg:
	-------

	MPlayer version 0.6.0 comes with a copy of libavcodec, so you
	may skip the following steps:
	
	./configure --prefix=<e.g. /usr> &&
	make &&
	make install

	To use ffmpeg codecs with mplayer, you need to copy the whole
	libavcodec dir to the mplayer source main dir:

	cp -av libavcodec ../MPlayer-<version>/libavcodec

	Now ffmpegs libavcodec will be available for mplayer. By the
	way, ffmpeg can come handy if you want to recompress movie
	data. Be sure to read the Documentation.


	divx4linux (libdivxdecore)
	--------------------------
	
	If you want to use the source library (and since you're on LFS,
	I do think so), simply:

	./configure --prefix=<e.g /usr/X11R6> &&
	make &&
	make install &&
	ldconfig

	You could also use the binary version that was shipped w/
	avifile (http://avifile.sourceforge.net), though it has a very
	crude installation script and is not really optimised.

	
	xanim
	-----
	
	You could install that old avi player. You also could use but
	the codecs, but be warned that the unlicensed use of the codec
	with another program than xanim is illegal. If you don't bother
	about legality issues, you may proceed, but you've been
	warned...


	libcss/libdvdcss
	----------------

	These packages could be used to watch encrypted DVDs. It may be
	illegal in your country! You're warned again...


	w32-binaries
	------------

	This package holds the windows codecs currently supported by
	mplayer. You're supposed to unzip the content to /usr/lib/win32
	or any other dir specified during the execution of the mplayer
	configure script with the --with-win32libdir=<directory> option.

	If you have a windows codec not to be in that package and want
	it supported, you could put it in that package, edit the
	codec.conf file and try to use it anyway. If it doesn't work,
	look at the documentation and contact the authors.

	NOTE:
	to unpack .zip archives, you should use unzip from Info-Zip
	(http://www.info-zip.org). Don't try to use gzip! If you don't
	want to install it, I could send you a .tar.gz package.


	mplayer
	-------

	At last! This section will be a bit bigger, since I think it's
	good to explain the most options of the configure script a bit
	more precisely and give [suggestions] for the inexperienced.
	If something is autodetected, you don't need to bother playing
	with those switches.

	./configure <the following options as you like it:> &&

	--prefix=<e.g. /usr/X11R6>     
	--disable-mencoder	mencoder is an <whatever mplayer plays>
				to divx4-encoder that comes with all
				newer CVS versions. If you don't want it,
				you may disable it here. If you don't
				use divx4linux, it wouldn't be
				activated anyway.
				[don't use this switch]

	--enable-largefiles	It so happens that actual file systems
				are able to manage files larger than
				2GB. If you want mplayer to be able to
				play those files, you should use this
				option.
				[you probably won't need it]

	--enable-termcap	The keystroke detection could be
				managed using libtermcap. I haven't yet
				found out what use this has.
				[It's autodetected anyway]

	--enable-lirc		If you want to control mplayer via
				infrared remote control, you need an IR
				reciever and lirc (since I've never used
				this, I don't know much about it - so
				don't bother me).
				[autodetected too]

	--enable-gui		If you want mplayer with a gui (and
				since the developer don't want it for
				good reasons, it's deactivated by
				default), you need to enable it here and
				start mplayer with the -gui option
				afterwards. You need glib/gtk+ for the
				gui!
				[If you need a gui, OK. It wouldn't
				make it faster! Otherwise, don't touch
				it.]
				If you enable this, don't forget to
				download the gui skins!

	--disable-tv		It is a not well known fact that you
				can use mplayer as well to watch tv
				using a video4linux or dvb grabber-card.
				[If you haven't such a card or don't
				want to use mplayer to watch TV, you
				may use that switch]

	--disable-tv-v4l	If you have got a dvb grabber card, but
				no video4linux-card, you may want to
				disable that annoying "try to find 
				/dev/video"-stuff.
				[if you have a bttv-card or similar,
				don't touch it, otherwise you may use
				it] 

	--disable-win32		If you dislike the thought of
				using closed-source codecs, you may
				disable thusly. You could also let this
				option remain but not use that codec
				by default (see CONFIGURE section)
				[Nope]

	--disable-dshow		Only disable the directshow
				codecs. DirectShow is a multimedia
				extension to the ms video libraries, so
				the codecs could use the graphic 
				hardware almost directly. Strangely, on
				some systems are these codecs much
				slower.
				[Nope]

	--disable-xanim		I hope you've read the section
				above. Anyway, there's not much stuff
				only accessible with the xanim codecs
				(some quicktime movies, though).
				Remember it's illegal!
				[If you have xanim or codecs installed
				and want to avoid legal issues, you
				should use that switch; nope]

	--enable-vorbis		It is possible to use the free 
				OggVorbis as audio codec. If you have
				these libs installed, you may use them.
				[Autodetected anyway]

	--disable-iconv		The iconv function may cause
				errors on some systems (I never found
				out which ones, though). If you get
				errors, you may try this one.
				[Autodetected, too]

	--disable-rtc		The usage of /dev/rtc can help 
				synchronizing audio/video. If you have
				it, mind.
				[Autodetected]

	--enable-gl		OpenGL rendering. Not the fastest
				method of rendering the video output,
				but nevertheless usable. Good for
				OpenGL-enabled GFX-cards (like FireGL).
				[Autodetected]

	--enable-dga=[1/2]	DirectGraphicAccess is XFree's answer
				to DirectX(tm), so mplayer accesses the
				gfx hardware almost directly. To run
				this, you need to run mplayer as root.
				[Autodetected; if DGA2 gives you
				errors, you may use that switch to
				downgrade to DGA1]

	--enable-svga		SVGAlib support (also to be run as
				root).
				[Autodetected]

	--enable-aa		AA-lib gives you cool-looking textmode
				output. It may be not very usable to
				watch your movies anyway, but provides
				a nice effect (and you could use it in
				console too, even via telnet!).
				[Autodetected]

	--enable-ggi		GGI can handle multiple devices (AA,
				SDL, X11, DGA, SVGAlib etc. pp). It is
				also considered to be insecure.
				[Autodetected]

	--enable-dxr3		If you have a DXR3/H+ Video Harware
				Decoding board, you may use it with
				that driver.
				[Autodetected]

	--enable-dvb		Some DVB cards have video output
				abilities.
				[Autodetected]

	--enable-mga		If you have a Matrox MGA[200/400/450]
				card, you may compile the mga_vid
				module, load it and have really fast
				overlay graphics.
				You need to set up the device before
				you try to use/detect it:

				cd drivers &&
				make &&
				cp mga_vod.o /lib/modules/<kernel-
				version> &&
				cd .. &&
				mknod /dev/mga_vid c 178 0 &&
				insmod mga_vid.o

				You may also add to modules.conf:
				alias char-major-178 mga_vid

				[Autodetected]

	--enable-xmga		Same for XFree.
				[Autodetected]

	--enable-xv		X Video extension. Works mostly out of
				the box. Only on some Trident and some
				older cards (especially on notebooks),
				you may get errors. Don't report that
				errors as MPlayer bugs! That are errors
				of XFree86!
				[Autodetected]

	--enable-vm		Enable the changing of video modes. On
				a normal CRT, you may want that.
				[Autodetected]

	--enable-xinerama	You could even use more than 1 Screen
				to display your movie.
				[Autodetected]

	--enable-x11		X11 software rendering (slow, no
				scaling). Useful for making screenshots.
				[Autodetected]

	--enable-fbdev		If you have framebuffer device
				support in your kernel and want to use
				it with mplayer, you may enable this.
				[Yes, if you have /dev/fb0; nope]

	--enable-3dfx		Like --enable-mga, only for 3dfx cards
				(all cards currently supported by the
				XFree86 tdfx driver). Look at the docs.
				[You'll need to enable it, if you want
				to use it; nope]

	--enable-tdfxfb		There's a accelerated framebuffer 
				driver for 3dfx cards. If you're using
				this one, it could speed things up.
				[look above; nope]

	--enable-directfb	That's a library to access fast
				framebuffers. Nice to watch vids
				without XServer.
				[Autodetected]

	--disable-ossaudio	If you don't want the normal OSS sound
				driver to be used (ALSA-only system?).
				[Autodetected]

	--disable-alsa		If you don't want the ALSA driver to be 
				used...
				[Autodetected]

	--disable-select	If you want to disable OSS soundcard
				selection. Some older OSS drivers can't
				cope w/ that.
				[If you have new OSS drivers/hardware,
				you may give it a try; nope]

	--language=xx		xx: cz de dk en es fr hu nl no pl ro ru
				Select your language. It happened on
				earlier versions that this could cause
				errors due to unfinished
				internationalisation. If you encounter
				such errors, try to leave that switch
				away.
				[Since you're reading this, you
				understand english: nope]

	Most of the following CPU instruction set enhancements options
	can only be used if you have a recent 2.4. kernel!

	--enable-mmx		Intel's MultiMediaeXtension can be used
				to archieve faster decoding.
				[Autodetected]

	--enable-mmx2		P3 and Athlon have an newer version of
				that codeset.
				[Autodetected]

	--enable-3dnow		AMD K6-II/III have 3D-now! instead of 
				MMX.
				[Autodetected]

	--enable-3dnowex	3D-now!-DSP support on K7 (older Athlon)
				[Autodetected]

	--enable-sse		Newer Celeron/P3/P4 CPUs have an
				enhanced instruction set that helps to
				decode movies.
				[Autodetected]

	--disable-fastmemcpy	Some systems may have problems on fast
				memory copy. If you get such troubles,
				you may disable this here.
				[nope]

	--enable-debug=[1-3]	If you're interested in how the code
				works... but then you'd probably
				wouldn't need this hint anyway...
				[nope]

	--enable-profile	Another debugging option...
				[nope]

	--disable-gcc-checking	If you're in the habit of using
				a flawed gcc version (like the ones
				from redhat), you could do with that
				switch.
				[nope]

	--with-extraincdir=...	If you have videocodecs etc in another
				dir than /usr/local/include, you should
				set it here.
				[=/usr/X11R6/include can never hurt]

	--with-extralibdir=...	Same for libs.
				[=/usr/X11R6/lib wouldn't hurt]

	--with-csslibdir=...	You could use lib(dvd)css to watch
				encrypted DVDs.
				[nope (illegal)]

	--with-win32libdir=...	Normally, the windows codecs are stored 
				to /usr/lib/win32. If you want another
				place, you can set it here.
				[nope]

	--with-xanimdir=...	Where the xanim codecs are installed.
				[nope (illegal)]

	--with-sdl-config=...	If it's not found automatically
				[e.g. =/usr/X11R6/bin/sdl-config]

	--with-gtk-config=...	For gui support...
				[e.g. =/usr/X11R6/bin/gtk-config]

	--with-glib-config=...	Dito.
				[e.g. =/usr/X11R6/bin/sdl-config]
				
	make &&
	make mencoder [if you want to] &&
	make install 

	In the current CVS version as of date 19.12.2001 is a bug that
	appears whenever you use the --enable-gui option and try to
	compile mplayer without dvd support, exiting with the message
	that the entity DVD would be missing while compiling mw.h.

	To correct this error, just insert

	#ifdev USE_DVDREAD

	before the line

	case evSetDVDSubtitle:

	(approx. line 250+/-) and after the line:

	strcpy( mplShMem->Filename,"/dev/dvd" );

	(approx. line 260+/-), you insert

	#endif

	so the dvd stuff wouldn't be necessary for gui support anymore.
	Remember to install the gui graphics as well.

	To use mplayer, you may want to make an .mplayer directory in
	your home directory:

	cd ~ &&
	mkdir .mplayer &&
	cp <where the Mplayer sources are>/etc/codecs.conf .mplayer/

	You can also put a config file into that directory that causes
	mplayer to start with some predefined options, e.g. for sound
	or video. Please read the documentation for the syntax.


USAGE:
	You could look at the manpage, the very good docs in html format
	or the helppage.

	Only thing not well documentated are the video out drivers:
	-vo <driver>[:<target>]

	aa
	--
	This driver features not only targets, but a whole set of
	options. You'll better try mplayer -aahelp.

	xv
	--
	The standard driver for X11. Includes hardware acceleration but
	no true full-screen (you always get the window manager
	decorations). Some errors encountered with S3 and trident
	chipsets are due to XFree86 driver failures and thus not
	mplayer-related!

	x11
	---
	Software rendering driver. Slow, no fullscreen, but usable for
	screenshots.

	sdl
	---
	This driver supports acceleration, scaling, true fullscreen,
	and a multitude of different targets (if compiled into sdl):

	aa - ascii art target
	dga - direct graphics access for XFree. Very fast.
	fbcon - frame buffer console target
	x11 - XFree Server (standard)

	There could be more targets depending on your SDL installation,
	but I wasn't able to find out more about them. Wait for hint
	upgrades.

	sdl features some more options, e.g. -noxv (if the Xv driver is
	buggy, sdl wouldn't fix that) or -xv.

	Currently, the GUI of Mplayer produces a new window for SDL
	output. SDL is not meant to be used w/ gui. If you want to use
	this combination anyway, you'll have to resize the window
	manually or wait until the gui gets more developed.

	fbdev
	-----
	Not very accelerated, but fast anyway. Needs framebuffer
	support enabled in kernel or loaded as module. No fullscreen or
	scaling support. You may choose different framebuffer devices
	as target, e.g. -vo fbdev:/dev/fb1


	Mplayer also features a set of kernel modules for different
	graphic cards, so that all acceleration hardware could be used.
	Currently supported are matrox and 3dfx cards, sis and other
	cards are under development. Please read the docs.


	Other useful Options
	--------------------

	-dvd <title>	Plays a dvd
	-vcd <title>	Plays a video CD (VCD/SVCD)
	-aspect <ratio> Corrects aspect ratio, e.g. 16:9.
	-fps <interval> Frames per second (e.g. for slow-motion)
	-ss <second>	seek to given second or hh:mm:ss
	-framedrop	If you get the "Your System is too slow!"-
			message, you should try this switch



ADDITIONAL UTILITIES:

	mencoder
	--------
	With mplayer comes an "everything to divx4"-encoder. You can
	convert everything you can watch with mplayer to high quality
	divx4! The help should be enough. If you are curious on what
	these options are, you should try the transcode-hint of the
	same author.


OTHER USEFUL PROGRAMS:

	mplayer may not use aviplay of the avifile library, but I found
	that this plays some .avi files that mplayer doesn't support.
	The avifile windows-dll package is not compatible to the one
	mplayer comes with, but the other way round works.

	http://avifile.sourceforge.net

	To cut avi videos a mix of transcode and mplayer is really
	great. mplayer to find out where to cut and transcode to do the
	cutting.

	Read the transcode hint of the same author.

Since this hint will never ever be complete nor perfect, I'd like your
updates send to l.x. at gmx.de!

Hope this was helpful anyway!

Alex


More information about the hints mailing list