Red Hat Linux 7.2 Bible, Unlimited ed phần 4 pot

86 427 0
Red Hat Linux 7.2 Bible, Unlimited ed phần 4 pot

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

Tip When I configured my sound card, the default sound level was a bit low for my taste. I inserted a music CD to have something to listen to. Then I ran the aumix command to adjust the volume levels. Volume (Vol) should be highlighted when aumix opens. You can use the right and left arrows to adjust volume levels. Use the up and down arrows to choose particular sound devices: speaker, line, mic, CD, and so on. With a device highlighted, use the tab key to be able to adjust balance for the device. Type s to save the changes and q when you are done. Audio file conversion If you have a sound file in one format, but you want it to be in another format, Linux offers some conversion tools you can use to convert the file. The Sox utility can translate to and from any of the audio formats listed in Table 8−1. Table 8−1: Sound Formats Supported by Sox Utility File Extension or Pseudonym Description File Extension or Pseudonym Description .8svx 8SVX Amiga musical instrument description format. .aiff Apple IIc/IIgs and SGI AIFF files. May require a separate archiver to work with these files. .au Sun Microsystems AU audio files. This is a popular format. .cdr CD−R files used to master compact disks. .cvs Continuously variable slope delta modulation, which is used for voice mail and other speech compression. .dat Text data files, which contain a text representation of sound data. .gsm Lossy Speech Compression (GSM 06.10), used to shrink audio data in voice mail and similar applications. .hcom Macintosh HCOM files. .maud Amiga format used to produce sound that is 8−bit linear, 16−bit linear, A−law, and u−law in mono or stereo. .ossdsp Pseudo file, used to open the OSS /dev/dsp file and configure it to use the data type passed to Sox. Used to either play or record. .sf IRCAM sound files, used by CSound package and MixView sample editor. .smp SampleVision files from Turtle Beach, used to communicate with different MIDI samplers. .sunau Pseudo file, used to open a /dev/audio file and set it to use the data type being passed to Sox. .txw Yamaha TX−16W from a Yamaha sampling keyboard. .vms Used to compress speech audio for voice mail and similar applications. .voc Sound Blaster VOC file. .wav Microsoft WAV RIFF files. This is the native MS Windows sound format. .wve 8−bit, a−law, 8 kHz sound files used with Psion Palmtop computers. .raw Raw files (contain no header information, so sample rate, size, and style must be given). .ub, .sb, .uw, .sw, .ul Raw files with certain characteristics. ub is unsigned byte; sb is signed byte; uw is unsigned word; sw is signed word; and ul is ulaw. Tip It may be that not all audio types are compiled into your version of Sox. Type sox −h to see the supported audio types. This also shows the options and effects that Sox supports. If you are not sure about the format of an audio file, you can add the .auto extension to the filename. This triggers Sox to guess what kind of audio format is contained in the file. The .auto extension can only be used for the input file. If Sox can figure out the content of the input file, it translates the contents to the sound type for the output file you request. In its most basic form, you can convert one file format (such as a .wav file) to another format (such as an .au file) as follows: sox file1.wav file1.au Note I had good luck getting .wav files to play with my sound card by converting them to .au and directing them to /dev/audio (that is, cat file1.au > /dev/audio). If the file is a .voc file, I direct it to /dev/dsp (that is, cat file1.voc > /dev/dsp). To see what Sox is doing, use the −V option. For example, $ sox −V file1.wav file1.voc sox: Reading Wave file: Microsoft PCM format, 1 channel, 11025 samp/sec sox: 11025 byte/sec, 1 block align, 8 bits/samp, 676354 data bytes sox: Input file: using sample rate 11025 size bytes, style unsigned, 1 channel sox: Input file: comment "file1.wav" sox: Output file: using sample rate 11025 size bytes, style unsigned, 1 channel sox: Output file: comment "file1.wav" You can apply sound effects during the Sox conversion process. The following example shows how to change the sample rate (using the −r option) from 10,000 kHz to 5000 kHz: $ sox −r 10000 file1.wav −r 5000 file1.voc To reduce the noise, you can send the file through a low−pass filter. Here’s an example: $ sox file1.voc file2.voc lowp 2200 For more information on Sox and to get the latest download, go to the SoX — Sound eXchange — home page (sourceforge.net/projects/sox/). CD audio players The same CD−ROM drive that you use to install software can be used to play music CDs. A couple of basic CD players that you get with Red Hat are gtcd (an X−based CD player) and cdp (a text−based CD player). Tip Before you try any of the CD players, unmount the CD in your drive (if one is mounted) by typing umount /mnt/cdrom. Then you can eject the old CD and place an audio CD in the drive. One feature to look for in a CD player to use with Red Hat Linux is CD Database (CDDB) support. With CDDB, the player can detect which CD is loaded and download Title, Artist, and Track name information from the database. After you store that information for your favorite CDs, you will always be able to see what CD is in your player and what each track is. Note If you try some of these CD players and your CD−ROM drive is not working, see the sidebar “Troubleshooting Your CD−ROM” for further information. Troubleshooting Your CD−ROM If you are unable to play CDs on your CD−ROM drive, there are a few things you can check to correct the problem: • Check that your sound card is installed and working properly (see “Configuring your sound card” earlier in this chapter). • There could be a problem with the physical connection between your sound card and your CD−ROM drive. Check that the wire between your CD−ROM and sound card is connected. • Check that the CD−ROM was detected when you booted Linux. If your CD−ROM drive is an IDE drive, type dmesg | grep ^hd. You should see messages about your CD−ROM that look like hdc: CD−ROM CDU701, ATAPI CDROM drive or hdc: ATAPI 14X CD−ROM drive, 128kB Cache. If there is no indication of a CD−ROM drive, check that the power supply and cables to the CD−ROM are connected. To make sure that the hardware is working, you can also boot to DOS and try to access the CD. • If it turns out that the CD−ROM hardware is working in DOS but still doesn’t show up in Linux, you may need to rebuild your kernel. At this point, you may want to get some help about your specific CD−ROM drive by asking about it in some Linux newsgroup. • Try mounting a software CD−ROM. If you are running the Gnome or KDE desktop, a window should appear indicating that the CD has mounted automatically. If a window doesn't appear, go to a Terminal window and type mount /mnt/cdrom. Then change to the /mnt/cdrom directory and list the contents (type cd /mnt/cdrom; ls). This tells you if the CD−ROM is accessible. • If you get the CD−ROM working, but it fails when you try to play music as a nonroot user with the message — CDROM device: Permission denied — the problem may be that /dev/cdrom (which is typically a link to the actual hardware device) is not readable by anyone but root. Type ls −l /dev/cdrom to see what the device is linked to. Then, assuming the device name it is linked to is /dev/hdc, as the root user type chmod 644 /dev/hdc to enable all users to read your CD−ROM and the root user to write to it. One warning: if others are using your computer, they will be able to read any CD you place in this drive. Automatically playing CDs You insert a music CD into your computer, and suddenly it begins to play. If you are using the Gnome desktop, you can thank magicdev. The magicdev process monitors your CD−ROM drives and starts a CD player automatically. The fact that inserting a CD starts a player automatically is nice to some people and annoying to others. If you just want the CD to play, this behavior is a good thing. However, if you want to choose your own CD player or not play the CD until you choose, you may find auto−playing a bother. If you insert a data CD, magicdev exhibits different behavior. Here is what magicdev does by default: • Music CD — When the music CD is inserted, magicdev starts the gtcd player to play the first track of the CD. • Data CD — When a data CD is inserted, the CD is mounted on your file system, and you are asked if you want to run any auto−run program that may be on the CD. The mount point for the first CD−ROM drive (/dev/cdrom) is /mnt/cdrom. If you have two drives, the second (/dev/cdrom1) is mounted on /mnt/cdrom1 (and so on). You can change the behavior of magicdev from the Gnome Control Panel. Here’s how: 1. Open the Gnome Control Center from the Gnome menu by choosing Programs → Settings → Gnome Control Center. 2. Under the Peripherals heading, click CD Properties. CD properties information for data and music CDs appears. 3. For Data CDs, select from the following options: ♦ Automatically mount CD when inserted — If this is selected, when a data CD is inserted it is automatically mounted in a subdirectory of /mnt. This option is on by default. ♦ Automatically start auto−run program on newly mounted CD — If this is selected, after a data CD is mounted, the user is asked to choose whether to run an auto−run program from the CD. This option is on by default. ♦ Open file manager window for newly mounted CD — If this is selected, after a data CD is mounted, a file manager window opens to display the contents of the top−level directory of the CD. For the first CD drive, the directory is /mnt/cdrom. This option is on by default. 4. For Audio CDs, you can select Run Command When CD Is Inserted to have the CD start playing automatically after it’s inserted. The command shown in the box labeled Command is used to play the CD. By default, the option is on, and the gtcd command is used, though you can change the CD player to any player you prefer. 5. Click OK. Playing CDs with gtcd The gtcd CD player is the one that pops up automatically when you insert a CD as you use the Gnome desktop. This player has controls that look similar to what you would see on a physical CD player. If you are using the Gnome desktop, from the System Menu select Multimedia → CD Player; from a Terminal window, type: $ gtcd & Adding track information The interface for adding information about the CD and its tracks is very nice. Click the Open Track Editor button. If you have an active connection to the Internet, gtcd automatically tries to grab track information for your CD. So, you may already see the CD title and track name for each song when you open the editor. If information about the CD doesn't appear, you can add Artist and Title information about the CD yourself. Then you can select each track to type in the track name. To add the name of the artist and the CD name, click in the Artist/Title box and type in that information. Figure 8−2 shows the CD Player and the Track Editor. Figure 8−2: Play CDs and store artist, title, and track information with gtcd. Using the CD database By default, the player contacts the freedb.freedb.org server to get CD artist and track information from the CD Database. However, you can add the address of a different CDDB server if you choose. To get information about the CD you are playing from the CD Database, do the following from your gtcd window: 1. Click the Open Track Editor button. 2. From the Track Editor window that appears, click the CDDB Status button. 3. From the CDDB Status window that appears, click the Get CDDB Now button. The CDDB Status window opens a connection to the CD Database on the Internet and tries to download artist, title, and track information for the current CD. If the procedure is successful, information about the CD should appear in the Track Editor window. You will see the name of the artist, the title of the CD, and the title of each track. Note You need a connection to the Internet from your Red Hat Linux system to take advantage of Internet CD databases. Playing CDs with cdp If you are working from a dumb terminal or just don’t have your X desktop running, you can run the cdp utility (which comes with Red Hat Linux) to play CDs. I don’t suggest running this from an X Terminal window; it doesn’t display properly. First, insert the music CD you want to play. Then, to start cdp, go to a virtual terminal (Ctrl+Alt+F3) and type: $ cdp You should see a blue screen containing the cdp display. If instead of starting on the first track you want to start on another track (for example, track 5), type: $ cdp play 5 When cdp starts, you can see all the tracks, how long each track plays, and total play time. To control the play of the CD, use the following controls (turn on Num Lock to use these numbers from the numeric keypad): • 9 — Play • 8 — Pause/Resume • 7 — Stop • 6 — Next Track • 5 — Replay Current Track • 4 — Previous Track • 3 — Forward 15 Seconds • 2 — Quit (Stop Music and Exit) • 1 — Back 15 Seconds • 0 — Exit (Continue Music and Exit) • . — Help (Press the period key) The cdp display also lets you enter the names of the Artist, CD, and each song. Because this information is saved, you can see it each time you play the CD. Type these commands while the cdp display is showing to edit information about the CD currently playing: • a — Edit the Artist Name • c — Edit the CD Name • Enter — Edit the title of the current song Caution If you try to edit a song name and cdp crashes, type eject to stop the CD from playing. Editing the song name seems to work better if you pause the song first. The arrow keys are also pretty handy for controlling CDs in cdp. The up arrow is for pause/play, and the left arrow is to go back a track. The right arrow is to go forward a track, and the down arrow is to eject. MP3 audio players One of the most popular, and controversial, audio formats is the MPEG layer 3 audio format (MP3). This format produces relatively small music files that can produce excellent sound quality for recorded music. MP3 is becoming the format of choice for high−quality music distribution on the Web. An MPEG file is usually identifiable by the .mp3 suffix. For music, 1MB of MPEG sound plays about one minute of music. Files that play only spoken words can hold many more minutes of content per megabyte. There are literally thousands of MPEG music files available on the Web. Because of the lawsuits from the music industry to stop copyright infringement, many sites that once promoted the free exchange of music files (such as MP3.com and Napster.com) are moving toward subscription/fee−based businesses. If you are okay with the fees, these services are a great way to get the songs you like in the time it takes to do a download. For playing MP3 content in Red Hat Linux, I describe, in the following sections, the mpg321 command (text−based), the xmms player, and the freeamp player (X Window–based). In general, mpg321 is the more reliable way to play an MP3 (or other MPEG format) audio file, while the xmms player has a great interface. Note The RealPlayer, described later in this chapter, is also capable of playing MP3 audio files. Its primary function, however, is to play RealMedia files (.ram) and streaming video and audio. Playing MP3 with mpg321 The mpg321 player is a free version of the not−free mpg123 player. Besides playing MPEG layer 3 files (MP3), the mpg321 utility also plays MPEG layer 1 and layer 2 files. This utility runs at the command line, by entering the command and the name of the file (or files) you want to play. Here is an example: $ mpg321 music_file.mp3 There are several options available with mpg321. You can test your mp3 file, without producing any output, using the −t option. There are also several options that allow you to decode or mix only selected channels. If you use the verbose option (−v), you can see the frame numbers being played and the elapsed time (and time remaining). The Verbose output looks similar to this: $ mpg321 −v music_file.mp3 Frame# 2456 [ 3456 }, Time: 01:40.34 [01:23.52], Output from mpg321 is usually directed to your sound card (usually /dev/audio or /dev/dsp). You can also direct output directly to the speaker (−o s), headphones (−o h), or the line−out connector (−o l). To play the output faster, use the −d # option, where # is replaced by the number of times faster. For example, −d 2 plays the output twice as fast. To play the output half as fast, use −h 2. Playing MP3 with XMMS Audio Player The XMMS Audio Player (which stands for X Multimedia System) provides a graphical interface for playing your MP3 audio files, as well as audio files in a variety of other formats. It has some nice extras too, which include an equalizer and a playlist editor. If the player looks familiar to you, that’s because it is styled after the Windows winamp program. You can start the XMMS Audio Player from the Gnome desktop menu by choosing Programs → Multimedia → XMMS. Or you can run the xmms command from a Terminal window. Figure 8−3 consists of the XMMS Audio Player with the associated equalizer below and the Playlist Editor to the right. Figure 8−3: Play MP3 and other audio files from the XMMS playlist. As noted earlier, you can play other formats of audio files as well as MP3. Supported audio file formats include the following: • MP2 and MP3 streams • WAV • AU • CD Audio • CIN Movies The XMMS Audio Player can be used in the following way: 1. Obtain music files to play. One way is to download files from the Web (for instance, from MP3.com) and store them in an accessible directory. 2. Choose Programs → Multimedia → XMMS from the Gnome desktop menu to open the XMMS player. (Or type xmms from a Terminal window.) 3. Click the Play button (the arrow pointing to the right) on the console. A Load Files window appears. 4. Select the .mp3 or other music file you want to play and click OK. (Change directories as required to locate the file.) The music file starts playing. 5. With a file selected and playing, here are a few actions you can take: ♦ Control play — Buttons for controlling play are what you may expect to see on a physical CD player. From left to right, the buttons let you go to a previous track, play, pause, stop, go to the next track, or eject. The eject button opens a window, allowing you to load the next file. ♦ Adjust sound — Use the left slider bar to adjust the volume. Use the right slider bar to change the right−to−left balance. ♦ Display time — Click in the elapsed time area to toggle between elapsed time and time remaining. ♦ View file information — Click the button in the upper−left corner of the screen to see the XMMS menu. Then select View File Info. You can usually find out a lot of information about the file: title, artist, album, comments, and genre. For an MP3 file, you can see specific information about the file itself, such as the format, bit rate, sample rate, frames, file size, and more. You can change or add to the tag information and click Save to keep it. 6. When you are done playing music, click the Stop button to stop the current song. Then click the X in the upper−right corner of the display to close the window. Special features of the XMMS Audio Player let you adjust high and low frequencies using a graphic equalizer and gather and play songs using a Playlist Editor. Click the button marked EQ next to the balance bar on the player to open the Equalizer. Click the button marked PL next to that to open the Playlist Editor. Using the Equalizer The Equalizer lets you use slider bars to set different levels to different frequencies played. Bars on the left adjust lower frequencies, and those on the right adjust higher frequencies. Select the EQ button to open the Equalizer. Here are some tasks you can perform with the Equalizer: • If you like the settings you have for a particular song, you can save them as a Preset. Set each frequency as you like it and click the Preset button. Then choose Save → Preset. Type a name for the preset and click OK. • To reload a preset you created earlier, click the Preset button and select Load → Preset. Select the preset you want and click OK. The settings change to those of the preset you just loaded. The small window in the center/top of the Equalizer shows the sound wave formed by your settings. You can adjust the Preamp bar on the left to boost different levels in the set range. Using the Playlist Editor The Playlist Editor lets you put together a list of audio files that you want to play. You can add and delete files from this list, save them to a file, and use them again later. Click the PL button in the XMMS window to open the Playlist Editor. The Playlist Editor allows you to: • Add files to the playlist — Click the “+ File” button. The Load Files window appears. Select the directory containing your audio files (it’s useful to keep them all in one place) from the left column. Then either select a file from the right column and click Add selected files or click Add all files in the directory. Click OK. The selected file or files appear in the playlist. • Select files to play — To select from the files in the playlist, use the previous track and next track buttons in the main XMMS window. The selected file is highlighted. Click the Play button to play that file. Alternatively, you can double−click on any file in the playlist to start it playing. • Delete files from the playlist — To remove a file from the playlist, select the file you want to remove (next/previous track buttons) and click the “− File” button. The file is removed. • Sort files on the playlist — To sort the playlist in different ways, click and hold the Misc Opt button and move the mouse to select Sort List. Then you can select Sort List to sort the list by Title, Filename, or Path and Filename. You can also randomize or reverse the list. • Save the playlist — To save the current playlist, hold the mouse button down on the Load List button and then select Save List. Type the name you want to assign to the playlist and click OK. • Load the playlist — To reload a saved playlist, click the Load List button. Select a previously saved playlist from the file list and click OK. There is also a tiny set of buttons on the bottom of the Playlist Editor screen. These are the same buttons as those on the main screen used for selecting different tracks or playing, pausing, stopping, or ejecting the current track. Playing MP3 with freeamp The freeamp MP3 player has some clever controls. You can click in the display area to cycle through the current time, remaining time, and total time associated with the music. Press and hold the left mouse button on dials on either side of the display, then move them to adjust the volume (left dial) or to seek a particular place in the song (right dial). Freeamp is not part of the Red Hat Linux distribution. The freeamp player is available from the FreeAmp Home Page (http://www.freeamp.org/), or you can type rpmfind freeamp to find it from a Red Hat mirror site. To start freeamp to run on your X display, type the following: $ freeamp & Figure 8−4 shows the freeamp display window. [...]... Linux doesn’t have everything in it that you might expect (see the sidebar “What’s Missing in Netscape for Red Hat Linux? ”), it is still an excellent browser to use with Red Hat Linux What’s Missing in Netscape for Red Hat Linux? Unfortunately, the Red Hat Linux version of Netscape Navigator doesn’t contain some of the features that are available in the Windows versions of Netscape Here is a partial list:... software that is launched as a separate application by Netscape to handle a particular type of data (usually by opening a separate window) Compared to the number of plug−ins available for the Windows platforms, very few plug−ins can be used with your Red Hat Linux system Those plug−ins that apply to multimedia content are described in the text that follows Any application that can play multimedia content... multimedia content in Red Hat Linux, however, can be added to Netscape as a helper application See Chapter 9 for a description of how to add helper applications to Netscape Here are two plug−ins for Netscape that come with Red Hat Linux and allow you to play some types of multimedia content that you may not otherwise be able to play in Linux • Shockwave Flash Player — This plug−in plays multimedia FutureSplash... type of content provided by Web pages is HTML, many other content types can be displayed, played, or presented by a Web browser Most additional data encountered by Netscape is handled in one of two ways: plug−ins or helper apps Plug−ins are self−contained programs that allow data to play within the Netscape window A helper app can be any program that is available on your Red Hat Linux system It is up... technologies in Netscape Xanim viewer The Xanim program is a viewer that runs on your X desktop It can play animation, video, and audio files Until Red Hat Linux 7.1, the xanim package was part of the Red Hat Linux Powertools CD Though there is no longer a Powertools CD, you can download the xanim package from any Red Hat FTP site The types of media formats Xanim supports are: • Animations — Supports FLI,... Olympus — Supported models: D−100Z, D−200L, D−220L, D−300L, D−320L, D−330R, D− 340 L, D− 340 R, D 40 0L Zoom, D 45 0Z, D−500L, D−600L, D−620L, C 40 0L, C 41 0L, C−800L, C−820L, C−830L, C− 840 L, C−900 Zoom, C−900L Zoom, C−1000L, C− 140 0L, and C−2000Z • Panasonic — Supported models: Coolshot KXI−600A and Cardshot NV−DCF5E • Philips — Supported models: ESP60 and ESP 80 • Polaroid — Supported model: PDC 640 • Ricoh RDC... configured for Netscape on your computer appear, along with information on how the plug−ins are handled If you have never added any plug−ins or helper apps to this instance of Netscape, you probably noticed that there are very few plug−ins Most of the entries represent helper apps that are launched when certain types of data are encountered Netscape determines what kind of data it has encountered (and... displaying the Red Hat home page (http://www.redhat.com/) Figure 9−2: The Red Hat Linux opening page appears when you first open Netscape Navigator to browse the World Wide Web Although you can read HTML files from your local computer, Netscape Navigator is most often used with a connection to the Internet To use most of the preset bookmarks and even to get Netscape help files, you need to access sites... systems A lot of that has to do with the fact that there is no version of IE running on Red Hat or other Linux systems (Don’t hold your breath waiting for it, either.) Netscape Communicator is a repackaging of Netscape Navigator, with additional software for other Web−related features besides browsing While the Netscape Communicator package for Red Hat Linux doesn’t have everything in it that you might... that is available today This chapter took you through the steps of setting up and troubleshooting your sound card When that was done, you learned how to find software to play music through that card Video players, such as Xanim, were described for playing video clips in Red Hat Linux The chapter also covered how to get the RealPlayer from Real Networks so you can draw from the large pool of RealMedia . Supported models: DS 7, DX−5, DX−10, MX−500, MX−600, MX 70 0, MX− 120 0, and MX 27 0 0. • Hewlett−Packard PhotoSmart — Supported models: C20, C30, and C2000. • Kodak DC — Supported models: 20 , 25 , 20 0+,. first command line that follows represents a SHOUTcast stream and the second line represents a multicast stream: $ freeamp http:// 123 .48 .23 .4: 8000 $ freeamp rtp://1 32. 43 .21 .4: 4 42 0 You can change. 20 0+, 21 0, 21 0+ Zoom, 21 5 Zoom, 22 0 +, 24 0, and 28 0. • Konica — Supported models: QM100, QM100V, Q−EZ, Q−M100, Q−M100V, and Q−M200. • Leica — Supported model: Digilux Zoom. • Minolta — Supported

Ngày đăng: 14/08/2014, 06:22

Từ khóa liên quan

Mục lục

  • Chapter 8: Multimedia in Red Hat Linux

    • Listening to Audio

      • Audio file conversion

      • CD audio players

      • MP3 audio players

      • MIDI audio players

      • Playing Video

        • Xanim viewer

        • RealPlayer

        • Using a Digital Camera with gPhoto

        • MultiMedia Netscape Plug-ins and Helper Apps

        • Recording Music CDs

          • Configuring an IDE CD-ROM for recording

          • Creating an Audio CD with cdrecord

          • Ripping CDs with grip

          • Creating CD labels with cdlabelgen

          • Multimedia Technologies in Waiting

            • DVD movies

            • Virtual reality

            • Summary

            • Part III: Administering Red Hat Linux

              • Chapter List

              • Chapter 9: Tools for Using the Internet and the Web

                • Overview of Internet Tools

                • Browsing the Web

                  • Uniform Resource Locators

                  • Web pages

                  • Netscape Communicator package

Tài liệu cùng người dùng

  • Đang cập nhật ...

Tài liệu liên quan