diff --git a/en_US.ISO8859-1/books/handbook/Makefile b/en_US.ISO8859-1/books/handbook/Makefile index 8118ae69d2..b88bbd7361 100644 --- a/en_US.ISO8859-1/books/handbook/Makefile +++ b/en_US.ISO8859-1/books/handbook/Makefile @@ -1,187 +1,187 @@ # # $FreeBSD$ # # Build the FreeBSD Handbook. # # ------------------------------------------------------------------------ # # Handbook-specific variables # # WITH_PGPKEYS The print version of the handbook only prints PGP # fingerprints by default. If you would like for the # entire key to be displayed, then set this variable. # This option has no affect on the HTML formats. # # Handbook-specific targets # # pgpkeyring This target will read the contents of # pgpkeys/chapter.sgml and will extract all of # the pgpkeys to standard out. This output can then # be redirected into a file and distributed as a # public keyring of FreeBSD developers that can # easily be imported into PGP/GPG. # # ------------------------------------------------------------------------ MAINTAINER=nik@FreeBSD.org DOC?= book FORMATS?= html-split HAS_INDEX= true INSTALL_COMPRESSED?= gz INSTALL_ONLY_COMPRESSED?= IMAGES = advanced-networking/isdn-bus.eps IMAGES+= advanced-networking/isdn-twisted-pair.eps IMAGES+= advanced-networking/natd.eps IMAGES+= install/userconfig.scr IMAGES+= install/userconfig2.scr IMAGES+= install/hdwrconf.scr IMAGES+= install/probstart.scr IMAGES+= install/main1.scr IMAGES+= install/sysinstall-exit.scr IMAGES+= install/main-doc.scr IMAGES+= install/docmenu1.scr IMAGES+= install/main-keymap.scr IMAGES+= install/keymap.scr IMAGES+= install/main-options.scr IMAGES+= install/options.scr IMAGES+= install/main-std.scr IMAGES+= install/fdisk-drive1.scr IMAGES+= install/fdisk-edit1.scr IMAGES+= install/fdisk-edit2.scr IMAGES+= install/boot-mgr.scr IMAGES+= install/fdisk-drive2.scr IMAGES+= install/disklabel-ed1.scr IMAGES+= install/disklabel-auto.scr IMAGES+= install/disklabel-root1.scr IMAGES+= install/disklabel-root2.scr IMAGES+= install/disklabel-fs.scr IMAGES+= install/disklabel-root3.scr IMAGES+= install/disklabel-ed2.scr IMAGES+= install/dist-set.scr IMAGES+= install/dist-set2.scr IMAGES+= install/media.scr IMAGES+= install/ed0-conf.scr IMAGES+= install/ed0-conf2.scr IMAGES+= install/ftp-anon1.scr IMAGES+= install/ftp-anon2.scr IMAGES+= install/nfs-server-edit.scr IMAGES+= install/security.scr IMAGES+= install/console-saver1.scr IMAGES+= install/console-saver2.scr IMAGES+= install/console-saver3.scr IMAGES+= install/console-saver4.scr IMAGES+= install/timezone1.scr IMAGES+= install/timezone2.scr IMAGES+= install/timezone3.scr IMAGES+= install/mouse1.scr IMAGES+= install/mouse2.scr IMAGES+= install/mouse3.scr IMAGES+= install/mouse4.scr IMAGES+= install/mouse5.scr IMAGES+= install/mouse6.scr IMAGES+= install/xf86setup.scr IMAGES+= install/desktop.scr IMAGES+= install/pkg-cat.scr IMAGES+= install/pkg-sel.scr IMAGES+= install/pkg-install.scr IMAGES+= install/pkg-confirm.scr IMAGES+= install/adduser1.scr IMAGES+= install/adduser2.scr IMAGES+= install/adduser3.scr IMAGES+= install/mainexit.scr IMAGES+= install/disk-layout.eps IMAGES+= install/edit-inetd-conf.scr IMAGES+= install/example-dir1.eps IMAGES+= install/example-dir2.eps IMAGES+= install/example-dir3.eps IMAGES+= install/example-dir4.eps IMAGES+= install/example-dir5.eps # Images from the cross-document image library IMAGES_LIB= callouts/1.png IMAGES_LIB+= callouts/2.png IMAGES_LIB+= callouts/3.png IMAGES_LIB+= callouts/4.png IMAGES_LIB+= callouts/5.png IMAGES_LIB+= callouts/6.png IMAGES_LIB+= callouts/7.png IMAGES_LIB+= callouts/8.png IMAGES_LIB+= callouts/9.png IMAGES_LIB+= callouts/10.png # # SRCS lists the individual SGML files that make up the document. Changes # to any of these files will force a rebuild # # SGML content SRCS+= book.sgml SRCS+= advanced-networking/chapter.sgml SRCS+= basics/chapter.sgml SRCS+= bibliography/chapter.sgml SRCS+= config/chapter.sgml SRCS+= boot/chapter.sgml SRCS+= cutting-edge/chapter.sgml SRCS+= disks/chapter.sgml SRCS+= eresources/chapter.sgml SRCS+= install/chapter.sgml SRCS+= introduction/chapter.sgml SRCS+= kernelconfig/chapter.sgml SRCS+= l10n/chapter.sgml SRCS+= linuxemu/chapter.sgml SRCS+= mail/chapter.sgml SRCS+= mirrors/chapter.sgml +SRCS+= multimedia/chapter.sgml SRCS+= pgpkeys/chapter.sgml SRCS+= ppp-and-slip/chapter.sgml SRCS+= printing/chapter.sgml SRCS+= security/chapter.sgml SRCS+= serialcomms/chapter.sgml -SRCS+= sound/chapter.sgml SRCS+= users/chapter.sgml SRCS+= x11/chapter.sgml SRCS+= ports/chapter.sgml SRCS+= preface/preface.sgml SRCS+= colophon.sgml # Entities SRCS+= chapters.ent SYMLINKS= ${DESTDIR} index.html handbook.html # Turn on all the chapters. CHAPTERS?= ${SRCS:M*chapter.sgml} SGMLFLAGS+= ${CHAPTERS:S/\/chapter.sgml//:S/^/-i chap./} # XXX The Handbook build currently overflows some internal, hardcoded # limits in pdftex. Until we split the Handbook up, build the PDF # version using ps2pdf instead of pdftex. PS2PDF?= ${PREFIX}/bin/ps2pdf book.tex-pdf: ${TOUCH} book.tex-pdf book.pdf: book.ps ${PS2PDF} book.ps book.pdf pgpkeyring: pgpkeys/chapter.sgml @${JADE} -V nochunks ${JADEOPTS} -d ${DSLPGP} -t sgml ${MASTERDOC} DOC_PREFIX?= ${.CURDIR}/../../.. # # Handbook-specific variables # .if defined(WITH_PGPKEYS) JADEFLAGS+= -V withpgpkeys .endif .include "${DOC_PREFIX}/share/mk/doc.project.mk" diff --git a/en_US.ISO8859-1/books/handbook/book.sgml b/en_US.ISO8859-1/books/handbook/book.sgml index 5db33b399d..02d4d49172 100644 --- a/en_US.ISO8859-1/books/handbook/book.sgml +++ b/en_US.ISO8859-1/books/handbook/book.sgml @@ -1,204 +1,204 @@ %man; %bookinfo; %freebsd; %chapters; %authors; %teams; %mailing-lists; %newsgroups; - + %pgpkeys; ]> FreeBSD Handbook The FreeBSD Documentation Project February 1999 1995 1996 1997 1998 1999 2000 2001 2002 The FreeBSD Documentation Project &bookinfo.legalnotice; Welcome to FreeBSD! This handbook covers the installation and day to day use of FreeBSD &rel.current;-RELEASE. This manual is a work in progress and is the work of many individuals. Many sections do not yet exist and some of those that do exist need to be updated. If you are interested in helping with this project, send email to the &a.doc;. The latest version of this document is always available from the FreeBSD web site. It may also be downloaded in a variety of formats and compression options from the FreeBSD FTP server or one of the numerous mirror sites. If you would prefer to have a hard copy of the handbook, you can purchase one at the FreeBSD Mall. You may also want to search the handbook. &chap.preface; Getting Started This part of the FreeBSD Handbook is for users and administrators who are new to FreeBSD. These chapters: Introduce you to FreeBSD. Guide you through the installation process. Teach you some Unix basics. Show you how to install the wealth of third party applications available for FreeBSD. Introduce you to X, the Unix windowing system, and detail how to configure a desktop environment that makes you more productive. We have tried to keep the number of forward references in the text to a minimum so that you can read this section of the Handbook from front to back with the minimum of page flipping required. System Administration The remaining chapters of the FreeBSD Handbook cover all aspects of FreeBSD system administration. Each chapter starts by describing what you will learn as a result of reading the chapter, and also details what you are expected to know before tackling the material. These chapters are designed to be read when you need the information. You do not have to read them in any particular order, nor do you need to read all of them before you can begin using FreeBSD. - + Appendices &chap.colophon; diff --git a/en_US.ISO8859-1/books/handbook/chapters.ent b/en_US.ISO8859-1/books/handbook/chapters.ent index ba3cafcfe9..111e5b8351 100644 --- a/en_US.ISO8859-1/books/handbook/chapters.ent +++ b/en_US.ISO8859-1/books/handbook/chapters.ent @@ -1,44 +1,44 @@ - + diff --git a/en_US.ISO8859-1/books/handbook/multimedia/Makefile b/en_US.ISO8859-1/books/handbook/multimedia/Makefile index 0ea7f84352..f90e1cd2b0 100644 --- a/en_US.ISO8859-1/books/handbook/multimedia/Makefile +++ b/en_US.ISO8859-1/books/handbook/multimedia/Makefile @@ -1,15 +1,15 @@ # # Build the Handbook with just the content from this chapter. # # $FreeBSD$ # -CHAPTERS= sound/chapter.sgml +CHAPTERS= multimedia/chapter.sgml VPATH= .. MASTERDOC= ${.CURDIR}/../${DOC}.${DOCBOOKSUFFIX} DOC_PREFIX?= ${.CURDIR}/../../../.. .include "../Makefile" diff --git a/en_US.ISO8859-1/books/handbook/multimedia/chapter.sgml b/en_US.ISO8859-1/books/handbook/multimedia/chapter.sgml index fc05ff119d..bf114601d7 100644 --- a/en_US.ISO8859-1/books/handbook/multimedia/chapter.sgml +++ b/en_US.ISO8859-1/books/handbook/multimedia/chapter.sgml @@ -1,589 +1,1397 @@ - - - - - Moses - Moore - Contributed by - - - - - - Sound - - - Synopsis + + + + + Ross + Lippert + Edited by + + + + + Multimedia + + Synopsis FreeBSD supports a wide variety of sound cards, allowing you to enjoy high fidelity output from your computer. This includes the ability to record and playback audio in the MPEG Audio Layer 3 (MP3), WAV, and Ogg Vorbis formats as well as many other formats. The FreeBSD Ports Collection also contains applications allowing you to edit your recorded audio, add sound effects, and control attached MIDI devices. - After reading this chapter, you will know: + With some willingness to experiment, FreeBSD can support + playback of video files and DVD's. The number of applications + to encode, convert, and playback various video media is more + limited than the number of sound applications. For example as + of this writing, there is no good re-encoding application in the + FreeBSD Ports Collection, which could be use to interconvert + between formats, as there is with audio/sox. However, the software + landscape in this area is changing rapidly. + + This chapter will describe the necessary steps to configure + your sound card. The configuration and installation of XFree86 + () has already taken care of the + hardware issues for your video card, though there may be some + tweaks to apply for better playback. + + After reading this section, you will know: + - How to locate your sound card. - How to configure your system so that your sound card is - recognized. - Methods to test that your card is working using - sample applications. - How to troubleshoot your sound setup. - How to playback and encode MP3s. - How to rip CD audio tracks into data files. + + How to configure your system so that your sound card is + recognized. + + + + Methods to test that your card is working using + sample applications. + + + + How to troubleshoot your sound setup. + + + + How to playback and encode MP3s and other audio. + + + + How video is supported by XFree86. + + + + Some video player/encoder ports which give good results. + + + + How to playback DVD's, .mpg and .avi files. + + + + How to rip CD and DVD information into files. + Before reading this chapter, you should: Know how to configure and install a new kernel (). + + For the video sections, it is assumed that XFree86 4.X + (x11/XFree86-4) has been + installed. XFree86 3.X may work, but it has not been tested + with what is described in this chapter. If you find that + something described here does work with XFree86 3.X please + let us know. + + + Trying to mount an audio CD + or a video DVD with the mount command will + result in an error, at least, and a kernel + panic, at worst. These media have specialized + encodings which differ from the usual ISO-filesystem. + + - + + + + + Moses + Moore + Contributed by + + + + + + Setting Up The Sound Card + + Locating the Correct Device PCI ISA sound cards Before you begin, you should know the model of the card you have, the chip it uses, and whether it is a PCI or ISA card. FreeBSD supports a wide variety of both PCI and ISA cards. If you do not see your card in the following list, check the &man.pcm.4; manual page. This is not a complete list; however, it does list some of the most common cards. Crystal 4237, 4236, 4232, 4231 Yamaha OPL-SAx OPTi931 Ensoniq AudioPCI 1370/1371 ESS Solo-1/1E NeoMagic 256AV/ZX Sound Blaster Pro, 16, 32, AWE64, AWE128, Live Creative ViBRA16 Advanced Asound 100, 110, and Logic ALS120 ES 1868, 1869, 1879, 1888 Gravis UltraSound Aureal Vortex 1 or 2 kernel configuration To use your sound device, you will need to load the proper device driver. This may be accomplished in one of two ways. The easiest way is to simply load a kernel module for your sound card with &man.kldload.8;. Alternatively, you may statically compile in support for your sound card in your kernel. The sections below provide the information you need to add support for your hardware in this manner. For more information about recompiling your kernel, please see . - + Creative, Advance, and ESS Sound Cards If you have one of the above cards, you will need to add: device pcm to your kernel configuration file. If you have a PnP ISA card, you will also need to add: device sbc For a non-PnP ISA card, add: device pcm device sbc0 at isa? port 0x220 irq 5 drq 1 flags 0x15 to your kernel configuration file. The settings shown above are the defaults. You may need to change the IRQ or the other settings to match your card. See the &man.sbc.4; manual page for more information. The Sound Blaster Live is not supported under FreeBSD 4.0 without a patch, which this section will not cover. It is recommended that you update to the latest -STABLE before trying to use this card. - + - + Gravis UltraSound Cards For a PnP ISA card, you will need to add: device pcm device gusc to your kernel configuration file. If you have a non-PnP ISA card, you will need to add: device pcm device gus0 at isa? port 0x220 irq 5 drq 1 flags 0x13 to your kernel configuration file. You may need to change the IRQ or the other settings to match your card. See the &man.gusc.4; manual page for more information. - + - + Crystal Sound Cards For Crystal cards, you will need to add: device pcm device csa to your kernel configuration file. - + - + Generic Support For PnP ISA or PCI cards, you will need to add: device pcm to your kernel configuration file. If you have a non-PnP ISA sound card that does not have a bridge driver, you will need to add: device pcm0 at isa? irq 10 drq 1 flags 0x0 to your kernel configuration file. You may need to change the IRQ or the other settings to match your card. - + - + Onboard Sound Some systems with built-in motherboard sound devices may require the following option in your kernel configuration: options PNPBIOS - - + + - + Creating and Testing the Device Nodes device nodes After you reboot, log in and run dmesg | grep pcm as shown below: &prompt.root; dmesg | grep pcm pcm0: <SB16 DSP 4.11> on sbc0 The output from your system may look different. If no pcm devices show up, something went wrong earlier. If that happens, go through your kernel configuration file again and make sure you chose the correct - device. Consult the troubleshooting section for additional - options. + device. Common problems are listed in . If the previous command returned pcm0, you will have to run the following as root: &prompt.root; cd /dev &prompt.root; sh MAKEDEV snd0 If the command returned pcm1, follow the same steps as shown above, replacing snd0 with snd1. The above commands will not create a /dev/snd device! MAKEDEV will create a group of device nodes, including: Device Description /dev/audio SPARC-compatible audio device /dev/dsp Digitized voice device /dev/dspW Like /dev/dsp, but 16 bits per sample /dev/midi Raw midi access device /dev/mixer Control port mixer device /dev/music Level 2 sequencer interface /dev/sequencer Sequencer device /dev/pss Programmable device interface If all goes well, you should now have a functioning sound - card. You may want to install an application such as - audio/mpg123 to listen to audio files. + card. If your CD-ROM or DVD-ROM drive is properly coupled to + your soundcard, you can put a CD in the drive and play it + with &man.cdcontrol.1;. - + &prompt.user; cdcontrol -f /dev/acd0c play 1 + + Various applications, such as audio/workman offer a better + interface. You may want to install an application such as + audio/mpg123 to listen to + MP3 audio files. + + Common Problems Error Solution device node unsupported subdevice XX One or more of the device nodes was not created correctly. Repeat the steps above. I/O port sb_dspwr(XX) timed out The I/O port is not set correctly. IRQ bad irq XX The IRQ is set incorrectly. Make sure that the set IRQ and the sound IRQ are the same. - xxx: gus pcm not attached, out of - memory + xxx: gus pcm not attached, out of memory There is not enough available memory to use the device. DSP xxx: can't open /dev/dsp! Check with fstat | grep dsp if another application is holding the device open. - Noteworthy troublemakers are esound and KDE's sound + Noteworthy troublemakers are esound and KDE's sound support. - + + + + + + + + Munish + Chopra + Contributed by + + + + Utilizing Multiple Sound Sources + + It is often desirable to have multiple sources of sound that + are able to play simultaneously, such as when + esound or + artsd do not support sharing of the + sound device with a certain application. + + FreeBSD lets you do this through Virtual Sound + Channels, which can be set with the &man.sysctl.8; + facility. Virtual channels allow you to multiplex your sound + card's playback channels by mixing sound in the kernel. + + To set the number of virtual channels, there are two sysctl + knobs which, if you are the root user, can + be set like this: + &prompt.root; sysctl hw.snd.pcm0.vchans=4 +&prompt.root; sysctl hw.snd.maxautovchans=4 + + hw.snd.pcm0.vchans is the number of + vchans pcm0 has, and is configurable + once a device has been attached. + hw.snd.maxautovchans is the number of vchans + a new audio device is given when it is attached using + &man.kldload.8;. Since the pcm module + can be loaded independently of the hardware drivers, + hw.snd.maxautovchans can store how many + vchans any devices which are attached later will be + given. + + If you are not using &man.devfs.5;, you will have to point + your applications at /dev/dsp0.x, where + 'x' is 0 to 3 if hw.snd.pcm.0.vchans is set + to 4. On a system using &man.devfs.5, the above will automatically be + allocated to the user transparently. + Chern Lee Contributed by MP3 Audio MP3 (MPEG Layer 3 Audio) accomplishes near CD-quality sound, leaving no reason to let your FreeBSD workstation fall short of its offerings. MP3 Players By far, the most popular XFree86 MP3 player is XMMS (X Multimedia System). Winamp skins can be used with XMMS since the GUI is almost identical to that of Nullsoft's Winamp. XMMS also has native plug-in support. XMMS can be installed from the audio/xmms port or package. XMMS' interface is intuitive, with a playlist, graphic equalizer, and more. Those familiar with Winamp will find XMMS simple to use. The audio/mpg123 port is an alternative, command-line MP3 player. mpg123 can be run by specifying the sound device and the MP3 file on the command line, as shown below: &prompt.root; mpg123 -a /dev/dsp1.0 Foobar-GreatestHits.mp3 High Performance MPEG 1.0/2.0/2.5 Audio Player for Layer 1, 2 and 3. Version 0.59r (1999/Jun/15). Written and copyrights by Michael Hipp. Uses code from various people. See 'README' for more! THIS SOFTWARE COMES WITH ABSOLUTELY NO WARRANTY! USE AT YOUR OWN RISK! Playing MPEG stream from BT - Foobar-GreastHits.mp3 ... MPEG 1.0 layer III, 128 kbit/s, 44100 Hz joint-stereo /dev/dsp1.0 should be replaced with the dsp device entry on your system. Ripping CD Audio Tracks Before encoding a CD or CD track to MP3, the audio data on the CD must be ripped onto the hard drive. This is done by copying the raw CDDA (CD Digital Audio) data to WAV files. The cdda2wav tool, which is a part of - the sysutils/cdrtools suite, is used for ripping - audio information of CDs and the information associated with - it. + the sysutils/cdrtools + suite, is used for ripping audio information from CDs and the + information associated with them. With the audio CD in the drive, the following command can be issued (as root) to rip an entire CD into individual (per track) WAV files: &prompt.root; cdda2wav -D 0,1,0 -B + cdda2wav will support + ATAPI (IDE) CDROM drives. To rip from an IDE drive, specify + the device name in place of the SCSI unit numbers. For + example, to rip track 7 from an IDE drive: + + &prompt.root; cdda2wav -D /dev/acd0a -t 7 + The indicates the SCSI device 0,1,0, which corresponds to the output of cdrecord -scanbus. To rip individual tracks, make use of the option as shown: &prompt.root; cdda2wav -D 0,1,0 -t 7 This example rips track seven of the audio CDROM. To rip a range of tracks, for example, track one to seven, specify a range: &prompt.root; cdda2wav -D 0,1,0 -t 1+7 - cdda2wav will also support - ATAPI (IDE) CDROM drives. To rip from an IDE drive, specify - the device name in place of the SCSI unit numbers. For - example, to rip track 7 from an IDE drive: - - &prompt.root; cdda2wav -D /dev/acd0a -t 7 - Encoding MP3s Nowadays, the mp3 encoder of choice is lame. Lame can be found at audio/lame in the ports tree. Using the ripped WAV files, the following command will convert audio01.wav to audio01.mp3: &prompt.root; lame -h -b 128 \ --tt "Foo Song Title" \ --ta "FooBar Artist" \ --tl "FooBar Album" \ --ty "2001" \ --tc "Ripped and encoded by Foo" \ --tg "Genre" \ audio01.wav audio01.mp3 128 kbits seems to be the standard MP3 bitrate in use. Many enjoy the higher quality 160, or 192. The higher the bitrate, the more disk space the resulting MP3 will consume--but the quality will be higher. The option turns on the higher quality but a little slower mode. The options beginning with indicate ID3 tags, which usually contain song information, to be embedded within the MP3 file. Additional encoding options can be found by consulting the - lame manual page. + lame man page. Decoding MP3s In order to burn an audio CD from MP3s, they must be converted to a non-compressed WAV format. Both XMMS and mpg123 support the output of MP3 to an uncompressed file format. Writing to Disk in XMMS: Launch XMMS. Right-click on the window to bring up the XMMS menu. Select Preference under Options. Change the Output Plugin to Disk Writer Plugin. Press Configure. Enter (or choose browse) a directory to write the uncompressed files to. Load the MP3 file into XMMS as usual, with volume at 100% and EQ settings turned off. Press PlayXMMS will appear as if it is playing the MP3, but no music will be heard. It is actually playing the MP3 to a file. Be sure to set the default Output Plugin back to what it was before in order to listen to MP3s again. Writing to stdout in mpg123: Run mpg123 -s audio01.mp3 > audio01.pcm XMMS writes a file in the WAV format, while mpg123 converts the MP3 into raw PCM audio data. Both of these formats can be used with cdrecord or burncd to create audio CDROMs. Read for more information on using a CD burner in FreeBSD. - + + + + + + + Ross + Lippert + Contributed by + + + + + + Video Playback + + Video playback is a very new and rapidly developing application + area. Be patient. Not everything is going to work as smoothly as + it did with sound. + + Before you begin, you should know the model of the video + card you have and the chip it uses. While XFree86 supports a + wide variety of video cards, fewer give good playback + performance. To obtain a list of extensions supported by the + X-server using your card use the command &man.xdpyinfo.1; while + X11 is running. + + It is a good idea to have a short MPEG file which can be + treated as a test file for evaluating various players and + options. Since some DVD players will look for DVD media in + /dev/dvd by default, or have this device + name hardcoded in them, you might find it useful to make + symbolic links to the proper devices: + + &prompt.root; ln -sf /dev/acd0c /dev/dvd +&prompt.root; ln -sf /dev/racd0c /dev/rdvd + + On FreeBSD-5.X, which uses devfs there + is a slightly different set of recommended links: + + &prompt.root; ln -sf /dev/acd0c /dev/dvd +&prompt.root; ln -sf /dev/acd0c /dev/rdvd + + Additionally, DVD decryption, which requires invoking + special DVD-ROM functions, requires write permission on the DVD + devices. + + Some of the ports discussed rely on the following kernel + options to build correctly. Before attempting to build, add + these options to the kernel and reboot: + + option CPU_ENABLE_SSE +option USER_LDT + + To enhance the shared memory X11 interface, it is + recommended that the values of some &man.sysctl.8; variables + should be increased: + + kern.ipc.shmmax=67108864 +kern.ipc.shmall=32768 + + + Determining Video capabilities + + Xvideo + SDL + DGA + + kernel configuration + options CPU_ENABLE_SSE + + + kernel configuration + options USER_LDT + + + There are several possible ways to display video under X11. + What will really work is largely hardware dependent. Each + method described below will have varying quality across + different hardware. Secondly, the rendering of video in X11 is + a topic receiving a lot of attention lately, and with each + version of XFree86 there may be significant improvement. + + A list of common video interfaces: + + + + X11: normal X11 output using shared memory + + + XVideo: an extension to the X11 + interface which supports video in any X11 drawable. + + + SDL: the Simple Directmedia Layer + + + DGA: the Direct Graphics Access + + + SVGAlib: low level console graphics layer + + + + + XVideo + + XFree86 4.X has an extension called + XVideo (aka Xvideo, aka Xv, aka xv) which + allows video to be directly displayed in drawable objects + through a special acceleration. This extension provides very + good quality playback even on low-end machines (for example my + PIII 400Mhz laptop). Unfortunately, the list of cards in which + this feature is supported out of the box is + currently: + + + + 3DFX Voodoo 3 + + + Intel i810 and i815 + + + some S3 chips (such as Savage/IX and Savage/MX) + + + + If your card is not one of these, do not be disappointed yet. + XFree86 4.X adds new xv capabilities with each release + + A popular familiar graphics card with generally very good + XFree86 performance, nVidia, has yet to release the specifications + on their XVideo support to the XFree86 team. It may be some time + before XFree86 fully support XVideo for these cards. + . + To check whether the extension is running, + use xvinfo: + + &prompt.user; xvinfo + + XVideo is supported for your card if the result looks like: +X-Video Extension version 2.2 +screen #0 + Adaptor #0: "Savage Streams Engine" + number of ports: 1 + port base: 43 + operations supported: PutImage + supported visuals: + depth 16, visualID 0x22 + depth 16, visualID 0x23 + number of attributes: 5 + "XV_COLORKEY" (range 0 to 16777215) + client settable attribute + client gettable attribute (current value is 2110) + "XV_BRIGHTNESS" (range -128 to 127) + client settable attribute + client gettable attribute (current value is 0) + "XV_CONTRAST" (range 0 to 255) + client settable attribute + client gettable attribute (current value is 128) + "XV_SATURATION" (range 0 to 255) + client settable attribute + client gettable attribute (current value is 128) + "XV_HUE" (range -180 to 180) + client settable attribute + client gettable attribute (current value is 0) + maximum XvImage size: 1024 x 1024 + Number of image formats: 7 + id: 0x32595559 (YUY2) + guid: 59555932-0000-0010-8000-00aa00389b71 + bits per pixel: 16 + number of planes: 1 + type: YUV (packed) + id: 0x32315659 (YV12) + guid: 59563132-0000-0010-8000-00aa00389b71 + bits per pixel: 12 + number of planes: 3 + type: YUV (planar) + id: 0x30323449 (I420) + guid: 49343230-0000-0010-8000-00aa00389b71 + bits per pixel: 12 + number of planes: 3 + type: YUV (planar) + id: 0x36315652 (RV16) + guid: 52563135-0000-0000-0000-000000000000 + bits per pixel: 16 + number of planes: 1 + type: RGB (packed) + depth: 0 + red, green, blue masks: 0x1f, 0x3e0, 0x7c00 + id: 0x35315652 (RV15) + guid: 52563136-0000-0000-0000-000000000000 + bits per pixel: 16 + number of planes: 1 + type: RGB (packed) + depth: 0 + red, green, blue masks: 0x1f, 0x7e0, 0xf800 + id: 0x31313259 (Y211) + guid: 59323131-0000-0010-8000-00aa00389b71 + bits per pixel: 6 + number of planes: 3 + type: YUV (packed) + id: 0x0 + guid: 00000000-0000-0000-0000-000000000000 + bits per pixel: 0 + number of planes: 0 + type: RGB (packed) + depth: 1 + red, green, blue masks: 0x0, 0x0, 0x0 + + Also note that the formats listed (YUV2, YUV12, etc) are not + present with every implementation of Xvideo and their absense may + hinder some players. + + If the result looks like: +X-Video Extension version 2.2 +screen #0 +no adaptors present + + Then XVideo is probably not supported for your card. + + If XVideo is not supported for your card, this only means + that it will be more difficult for your display to meet the + computational demands of rendering video. Depending on your + video card and processor, though, you might still be able to + have a satisfying experience. You should probably read about + ways of improving performance in the advanced reading . + + + + + Simple Directmedia Layer + + The Simple Directmedia Layer, SDL, was intended to be a + porting layers between Microsoft Windows, BeOS, and Unix, + allowing cross-platform applications to be developed which made + efficient use of sound and graphics. The SDL layer provides a + low-level abstraction to the hardware which can sometimes be + more efficient than the X11 interface. + + The SDL can be found at devel/sdl12 + + + + + Direct Graphics Access + + Direct Graphics Access is an XFree86 extension which allows + a program to bypass the X-server and directly alter the + framebuffer. Because it relies on a low level memory mapping to + effect this sharing, programs using it must must be run as + root + + The DGA extension can be tested and benchmarked by + &man.dga.1;. When dga is running, it + changes the colors of the display whenever a key is pressed. To + quit, use q. + + + + + + + Ports and Packages Dealing with Video + + video ports + video packages + + This section discusses the software available from the + FreeBSD Ports Collection which can be used for video playback. + Video playback is a very active area of software development, + and the capabilities of various applications are bound to + diverge somewhat from the descriptions given here. + + Firstly, it is important to know that most of the video + applications which run on FreeBSD were developed as Linux + applications, originating in the past year. For this reason, + they are both very experimental and riddled with + Linux-isms which might prevent them from working at full + efficiency on FreeBSD. + + By experimental, I mean that you should expect + re-encoders, players, and DVD decrypters to have some major + bugs, or interoperability problems with other programs. Here is + a short list of the sort of things I mean: + + + + + An application cannot playback a file which another + application produced. + + + + An application cannot playback a file which the + application itself produced. + + + + The same application on two different machines, + rebuilt on each machine for that machine, plays back the same + file differently. + + + + A seemingly trivial filter like rescaling of the image + size results in very bad artifacts from a buggy rescaling + routine. + + + + An application always dumping core. + + + + Documentation is not installed with the port and can be + found either on the web or under + PORTPATH/work/ + . + + + + + By Linux-isms, I mean that there are some + issues resulting from the way some standard libraries are + implemented in the Linux distributions, or some features of the + Linux kernel which have been assumed by the authors of the + applications, because that is where the authors are primarily + developing. These issues may not be noticed and worked around + by the port maintainers which can lead to some problems like + these: + + + + + The use of /proc/cpuinfo to detect + processor characteristics. + + + + A misuse of threads which causes a program to hang upon + completion instead of truly terminating. + + + + Software not yet in the FreeBSD Ports Collection + which is commonly used in conjunction with the application. + + + + + So far, these application developers have been cooperative with + port maintainers to minimize the work-arounds needed for + port-ing. + + + MPlayer + + MPlayer is a recently developed and rapidly developing + video player. The goals of the MPlayer team are speed and + flexibility on Linux and other Unices. The project was + started when the team founder got fed up with bad playback + performance on then available players. Some would say that + interface has been sacrificed for streamlined design, but once + you get used to the command line options and the key-stroke + controls, it works very well. + + + Building MPlayer + mplayer + making + + MPlayer resides in graphics/mplayer. MPlayer + performs a variety of hardware checks during the build + process, resulting in a binary which will not be portable + from one system to another. Thus it is important to build + it from ports and not to use a binary package. + Additionally, a number of options can be specified in the + make which echo at the start of the + build. + + &prompt.root; cd /usr/ports/graphics/mplayer +&prompt.root; make +You can enable additional compilation optimizations +by defining WITH_OPTIMIZED_CFLAGS +You can enable GTK GUI by defining WITH_GUI. +You can enable DVD support by defining WITH_DVD. +You can enable SVGALIB support by defining WITH_SVGALIB. +You can enable VORBIS sound support by defining WITH_VORBIS. +You can enable XAnim DLL support by defining WITH_XANIM. + + + If you have x11-toolkits/gtk12 installed, then + you might as well enable the GUI. Otherwise, it is not + worth the effort. If you intend to play (possibly CSS + encoded) DVD's with MPlayer you must enable the DVD support + option here Unauthorized DVD playback is a + serious criminal act in some countries. Check local laws + before enabling this option. . Some + reasonable options are: + + &prompt.root; make WITH_DVD=yes WITH_SVGALIB=yes + + As of this writing, the MPlayer port will build its HTML + documentation and one executable, + mplayer. It can also be made to build an + encoder, mencoder, which is a tool for + re-encoding video. A modification to the + Makefile can enable it. It may be + enabled by default in subsequent versions of the port. + + The HTML documentation to MPlayer is very informative. + If the reader finds the information on video hardware and + interfaces in the chapter lacking, the MPlayer documentation + is a very thorough alternative. You should definitely take + the time to read the documentation of + MPlayer, if you are looking for + information about video support in UNIX. + + + + + Using mplayer + mplayer + use + + Any user of mplayer must set up a + .mplayer subdirectory directory of her + home directory. To create this necessary subdirectory, + you can do the following: + +&prompt.user; cd /usr/ports/graphics/mplayer +&prompt.user; make install-user + + The command options for mplayer are + listed in the manual page. For even more detail there is HTML + documentation. In this section, we will give some of the + common use cases. + + To play from file, such as + testfile.avi through one of the various + video interfaces set the : + + &prompt.user; mplayer -vo xv testfile.avi + &prompt.user; mplayer -vo sdl testfile.avi + &prompt.user; mplayer -vo x11 testfile.avi + &prompt.root; mplayer -vo dga testfile.avi + &prompt.root; mplayer -vo 'sdl:dga' testfile.avi + + It is worth trying all of these options, as their relative + performance depends on many factors and will vary significantly + with hardware. + + To play from a DVD, replace the + testfile.avi with where <N> is + the title number to play and + DEVICE is the + device file for the DVD-ROM. For example, to play title 3 + from /dev/dvd: + + &prompt.root; mplayer -vo dga -dvd 2 /dev/dvd + + To stop, pause, advance and so on, consult the + keybindings, which are output by running mplayer + -h or read the manual page. + + Additional important options for playback are: + which engages the fullscreen mode + and which helps performance. + + In order for the mplayer command line to not become too + large, the user can create a file + .mplayer/config and set default options + there: +vo=xv +fs=yes +zoom=yes + + Finally, mplayer can be used to rip a + DVD title into a .vob file. To dump out title 2 from a DVD: + + &prompt.root; mplayer -dumpstream -dumpfile out.vob -dvd 2 /dev/dvd + + The output file, out.vob, will be + MPEG and can be manipulated by the other packages described + in this section. + + + + mencoder + + mencoder + + + If you opt to install mencoder when + you build, be forewarned that it is still quite + experimental. + + To use mencoder it is a good idea to + familiarize yourself with the options from the HTML + documentation. There is a manual page, but it is not very + useful without the HTML. There are innummerable ways to + improve quality, lower bitrate, and change formats, and some + of these tricks may make the difference between good + or bad performance. Here are a couple of examples to get + you going. First a simple copy: + + &prompt.user; mencoder input.avi -oac copy -ovc copy -o output.avi + + It is easy to find examples where the output is + unplayable even by mplayer. Thus, if you + just want to rip to a file, stick to the + in mplayer. + + To convert input.avi to the MPEG4 + codec with MPEG3 audio encoding (audio/lame is required): + + &prompt.user; mencoder input.avi -oac mp3lame -lameopts br=192 \ + -ovc lavc -lavcopts vcodec=mpeg4:vhq -o output.avi + + This has produced output playable by mplayer + and Xine. + + input.avi can be replaced with + and run as + root to re-encode a DVD title + directly. Since you are likely to be dissatisfied with + your results the first time around, it is recommended you + dump the title to a file and work on the file. + + + + + Xine + + Xine is a project of wide scope aiming not only at being an + all in one video solution, but also in producing a reusable base + library and a modular executable which can be extended with + plugins. It comes both as a package and as a port, graphics/xine. + + The good news is that the above is pretty much true. Xine + is still very rough around the edges, but it is clearly off to a + good start. In practice, Xine requires either a fast CPU with a + fast video card, or support for the XVideo extension. The GUI is + usable, but a bit clumsy. + + As of this writing, there is no input module shipped with + Xine which will play CSS encoded DVD's. There are third party + builds which do have modules for this built in them, but none + of these are in the FreeBSD Ports Collection. + + Compared to MPlayer, Xine does more for the user, but at the + same time, takes some of the more fine-grained control away from + the user. Xine also may perform much worse on the non-XVideo + interfaces and has very few good alternatives to it. The Xine + FAQ highly recommends that you have a video card which supports + it. + + Xine can be started by itself: + + &prompt.user; xine + + The menus can then be used to open a file, or it can be + started to play a file immediately without the GUI + with the command: + + &prompt.user; xine -g -p mymovie.avi + + + + + Transcode + + Transcode is not a player, but a suite of tools for + re-encoding .avi and .mpg files. With Transcode, one has the + ability to merge video files, repair broken files, using command + line tools with stdin/stdout stream + interfaces. + + Like MPlayer, Transcode is very experimental software which + must be build from the port graphics/transcode. Using a great + many options to the make command. I + recommend: + + &prompt.root; make WITH_LIBMPEG2=yes + + If you plan to install graphics/avifile, then add the + WITH_AVIFILE option to your + make command line, as shown here: + + &prompt.root; make WITH_AVIFILE=yes WITH_LIBMPEG2=yes + + Here are two examples of using transcode + for video conversion which produce rescaled output. The first + encodes the output to an openDIVX AVI file, while the second + encodes to the much more portable MPEG format. + + &prompt.user; transcode -i input.vob -x vob -V -Z 320x240 \ +-y opendivx -N 0x55 -o output.avi + + &prompt.user; transcode -i input.vob -x vob -V -Z 320x240 \ +-y mpeg -N 0x55 -o output.tmp +&prompt.user; tcmplex -o output.mpg -i output.tmp.m1v -p output.tmp.mpa -m 1 + + There is a manual page for transcode, but + for the various tc* utilities (such as + tcmplex) which are also installed, there is + only a curt output. + + In comparison, transcode runs + significantly slower than mencoder, but it + has a better chance of producing a more widely playable file. I + can play transcode MPEGs on older copies of + Windows Media Player and Apple's Quicktime, for example. + + + + + + + Further Reading + + I have no doubt that within a year, much that is in this + chapter will be out of date. Video will probably be much less + problematic to get working well and a port will be in the + collection which turns a FreeBSD system into a DVD-playing, PVR, + and virtual A/V studio. Until that day arrives, those who + want to get the very most out of FreeBSD's A/V capabilities will + have to cobble together knowledge from several FAQs and tutorials + and use a few different applications. + + This section exists to give the reader some links to learn + more in case this chapter was just helpful enough. + + The + MPlayer documentation + is very technically informative. + These documents should probably be consulted by anyone wishing + to obtain a high level of expertise with Unix video. The + MPlayer mailing list is hostile to anyone who has not bothered + to read the documentation, so if you plan on making bug reports + to them, RTFM. + + The + Xine HOWTO + contains a chapter on performance improvement + which is general to all players. + + Finally, there are some other promising applications which + the reader may try: + + + + + AVIFile which + is also a port graphics/avifile. + + + + Ogle + which is also a port graphics/ogle. + + + + XTheater + + + + + + diff --git a/share/sgml/man-refs.ent b/share/sgml/man-refs.ent index 1c88b62a90..0e955abd60 100644 --- a/share/sgml/man-refs.ent +++ b/share/sgml/man-refs.ent @@ -1,4125 +1,4127 @@ + +