Archive for July, 2007

Web hosts - 469Chapter 19Playing Music and Video .Grip (grip) While the

Friday, July 27th, 2007

469Chapter 19Playing Music and Video .Grip (grip) While the Grip window is primarily used as a CD ripper, it canalso play CDs. Select Multimedia.Grip (or type gripfrom a Terminal window). It includes tools for gathering data from and submitting data to CD databases. It also includes tools for copying (ripping) CD tracks and converting them todifferent formats (encoding). (The grip package must be installed to use thiscommand.) .CDPlay (cdp) If you don t have access to the desktop, you can use the text- based cdpcommand. This player lets you use keyboard keys to play your CD, select tracks, go forward or back, or eject. (The cdp or cdplay package, depend- ing on your Linux distribution, must be installed to use this command.) .X Multimedia System (xmms) The XMMS player plays a variety of audio for- mats but can also play directly from a CD. If you try some of these CD players and your CD-ROM drive is not working, see thesidebar Troubleshooting Your CD-ROM for further information. Automatically Playing CDsWhen you put an audio CD into your CD-ROM drive, a CD player automatically popsup on your desktop. If you are using the GNOME desktop, you can probably thankmagicdev, which monitor your CD-ROM drives and opens a CD player when it seesan audio CD. While most Linux distributions still use magicdev to launch a CD player on yourdesktop, the GNOME 2.8 desktop (included with Fedora Core 3 on this book s DVD) relies on the new GNOME volume manager. This volume manager monitors CDs, DVDs, USB drives, digital cameras, and other removable media and offers a rangeof options about how to manage those devices. If you are running Fedora Core 3, select Preferences.Removable Storage to see how your system is configured tohandle removable media. The fact that inserting a CD starts a player automatically is nice to some people andannoying 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 youchoose, you may find autoplaying a bother. If you insert a data CD or a blank CD, magicdev exhibits different behavior. Here is what magicdev does by default withthe GNOME desktop: .Audio CD When the music CD is inserted, magicdev starts gnome-cd andbegins playing the first track of the CD. .Data CD When a data CD is inserted, the CD is mounted on your file system, any autorun program that may be on the CD is launched, and a CD icon appearson the desktop. The first CD drive s mount point (/dev/cdrom) is /mnt/cdrom. If you have two drives, the second (/dev/cdrom1) is mounted on /mnt/cdrom1(and so on). .Blank CD When a blank CD is inserted, a nautilus window opens withburn:///as the location. NoteNote27_

468Part IVRunning ApplicationsThe devices that (Web host server) the audio programs

Thursday, July 26th, 2007

468Part IVRunning ApplicationsThe devices that the audio programs use to access audio hardware in most Linuxdistributions include: ./dev/audio, /dev/audio1 Compatible with Sun workstation audio imple- mentations (audio files with the .auextension). These devices are not recommended for new sound applications. ./dev/cdrom Represents your first CD-ROM drive. (Additional CD-ROMdrives are located at /dev/cdrom1, /dev/cdrom2, and so on.) ./dev/dsp, /dev/dsp1 Digital sampling devices, which many audio applica- tions identify to access your sound card. ./dev/mixer, /dev/mixer1 Sound-mixing devices. ./dev/sequencer Provides a low-level interface to MIDI, FM, and GUS. ./dev/midi00 Provides raw access to midi ports. ./dev/sndstat Displays the status of sound drivers. For general information about sound in Linux, see the Sound-HOWTO (for tips aboutsound cards and general sound issues) and the Sound-Playing-HOWTO (for tips onsoftware for playing different types of audio files). You can find Linux HOWTOs atwww.tldp.org. Choosing an Audio CD PlayerThe GNOME CD player (gnome-cd) pops up automatically on the GNOME desktopwhen you insert a CD. It s the default CD player for the GNOME desktop. It has standard play buttons and lets you get track information automatically from a CDdatabase, such as freedb.org. (If your CD isn t listed in the database, you canenter your own track information manually.) However, there are a variety of CD players that come with Linux distributions orthat may be downloaded and installed. Here is a cross-section of your other choicesfor playing CDs with Linux: .Rhythmbox (rhythmbox) Import and manage your CD collection withRhythmbox music management and playback software for GNOME. It usesGstreamer on the audio backend and compresses music using Ogg Vorbisaudio format. In addition to enabling you to create playlists of your musiclibrary, Rhythmbox also has features for playing Internet radio stations. .KsCD player (kscd) The KsCD player comes with the KDE desktop. To useit, the kdemultimedia package must be installed. From the main menu on theKDE desktop, select Multimedia.KsCD (or type kscdfrom a Terminal window). Like gnome-cd, this player lets you get title, track, and artist information fromthe CD database. KsCD, however, also lets you submit information to a CDdatabase (if your CD isn t found there).

Http web server - 467Chapter 19Playing Music and VideoFortunately most modern PCs

Thursday, July 26th, 2007

467Chapter 19Playing Music and VideoFortunately most modern PCs include a sound card, often of the integrated variety. In the rare case that one isn t included (or the slightly more common case where itisn t supported in Linux), you can add a supported sound card starting for only afew dollars. If you re really pinched, check out eBay, where you probably can get adecent SoundBlaster (still thestandard) compatible card for next to nothing. If you try the procedures in this book but still don t have a working sound card, visit the Advanced Linux Sound Architecture at www.alsa-project.org, homeof the ALSA sound architecture. ALSA is the preferred sound software for Linux andis built into the Linux kernel itself (beginning with the 2.6 kernel). The ALSA siteoffers support, information, and help. The following list summarizes the basic features that are included in the popularSoundBlaster family of sound cards: .Sound recording and playback The card can convert analog sound into 8-bitor 16-bit digital numbers. To convert the sound, the board samples the soundin waves from 5 KHz to 48 KHz, or 5,000 to 48,100 times per second. (Of course, the higher the sampling, the better the sound and larger the output.) .Full-duplex support This allows for recording and playback to occur at thesame time. This is particularly useful for bidirectional Internet communicationor simultaneous recording and playback. .Input/output ports Several different ports on the board enable you to con- nect other input/output devices. These ports include: Line-In Connects an external CD player, cassette deck, synthesizer, MiniDisc, or other device for recording or playback. If you have a televisioncard, you might also patch that card s line out to your sound card s line in. Microphone Connects a microphone for audio recording or communications. Line-Out (Speaker Out) Connects nonpowered speakers, headphones, or a stereo amplifier. Joystick/MIDI Connects a joystick for gaming or MIDI device. Internal CD Audio Connects the sound card to your computer s inter- nal CD-ROM board (this port isn t exposed when the board is installed). Sound drivers provided in Linux come from many sources, including a projectthatno longer exists: Open Sound System/Free (OSS/Free). However, as previouslymentioned, Advanced Linux Sound Architecture (ALSA) is the sound system thatisintegrated into the 2.6 kernel. The older OSS drivers are useful if ALSA does notsupport your sound card. Before you install a separate sound driver distribution, check to see if your currentdistribution already has a recent driver. Using the driver that came with the kernelis always a safe play if you are not experiencing a specific driver-related issue. CautionNote27_

466Part IVRunning ApplicationsPlaying MusicWith an understanding of the (Frontpage web hosting)

Wednesday, July 25th, 2007

466Part IVRunning ApplicationsPlaying MusicWith an understanding of the challenges and advances in digital media under yourbelt, let s move on to actually putting digital media to use. This section shows youhow to set up your Linux installation for audio playback. It examines the process forgetting the hardware up and running and then explores available software optionsfor audio playback. Setting Up Audio CardsTo start your quadraphonic wall of sound, you need to have a sound card in yourPC. A sound card can be an add-in PCI (or even ISA) card, or it can be integrated onyour motherboard. Your card will have a ton of uses from gaming to audio/videoplayback, having a multimedia system just isn t the same without sound. Troubleshooting Your CD-ROMIf you are unable to play CDs on your CD-ROM drive, here are a few things you can checkto correct the problem: .Verify that your sound card is installed and working properly. .Verify that the CD-ROM drive was detected when you booted Linux. If your CD-ROMdrive is an IDE drive, type dmesg | grep ^hd. You should see messages about yourCD-ROM that look like this: hdc: CD-ROM CDU701, ATAPI CDROM driveor this: hdc: ATAPI 14X CD-ROM drive, 128kB Cache. .If you see no indication of a CD-ROM drive, verify that the power supply and cablesto the CD-ROM are connected. To make sure that the hardware is working, you canalso boot to DOS and try to access the CD. .Try inserting a software CD-ROM. If you are running the GNOME or KDE desktop, adesktop icon should appear indicating that the CD mounted by itself. If no such iconappears, go to a Terminal window and type mount /dev/cdrom. Then change tothe /mnt/cdromor /dev/mediadirectory and list the contents using the commandcd /mnt/cdrom; ls. This tells you if the CD-ROM is accessible. .If you get the CD-ROM working but it fails with the message CDROM device: Permission denied when you try to play music as a non root user, the problemmay be that /dev/cdrom(which is typically a link to the actual hardware device) isnot readable by anyone but root. Type ls -l /dev/cdromto see what the device islinked to. Then (as the root user), if, for example, the CD device were /dev/hdc, type chmod 644 /dev/hdcto enable all users to read your CD-ROM and to enablethe root user to write to it. One warning: If others use your computer, they will beable to read any CD you place in this drive.

465Chapter 19Playing Music and Video .Real (Tomcat web server) Networks Real has

Wednesday, July 25th, 2007

465Chapter 19Playing Music and Video .Real Networks Real has developed a set of audio and video codecs thathave an amazing ability to serve up streaming content. This protocol is notwidely supported by anyone but Real. The Helix project produces a playerforLinux that enables playback of Real media encoded files. .WMA Windows Media Audio is used to create high-quality digital audio. WMA is considered a lossless codec, and among its other benefits is that it sone of the first widely used codecs to support digital surround sound. .WMV Windows Media Video is used, not surprisingly, to encode anddecodevideo. This is also a very high-quality encoder and is billed to pro- ducea video that is half the size of a MPEG-4 encoded video at a comparablequality level. .DivX This video codec has revolutionized digital video. Extremely high- quality video can be stored with amazingly small file sizes when using thiscodec. DivX (Digital Video Express) is based on the MPEG-4 video standardand can produce 640 480 video that is about 15 percent of the size of thesource DVD material. Some of these codecs are integral parts of Digital Rights Management (DRM) sce- narios. For example, WMA, WMV, and DivX have elements that support DRM. DRMis basically proprietary copy protection. The term DRM applies to a wide range oftechnologies that use server-based activation, encryption, and other elements tocontrol who can access content and what they can then do with the content onceithas been accessed. While it is very attractive to distributors of audio and video, who are trying to prevent unchecked digital piracy of their content, it can be a realstumbling block for the consumer. Many DRM solutions require proprietary software and even hardware to work withthe protected content. A prime example is the recent production of some DRM- protected audio CDs, particularly in Europe. Some of these disks will not play inolder standalone CD players, some will play only on a computer that supports theDRM application on the CD itself, and (especially frustrating) some will not play ona computer at all. Just to make things clear, the codecs just discussed do not use DRM inherently, butsome are specifically designed to integrate with DRM solutions. In other words, allof these codecs can theoretically be used to play encoded content on a Linux sys- tem. If the content is protected by a DRM solution, the likelihood that the content isplayable on a Linux system is fairly remote. Despite this fact, however, Linus Torvaldshas not excluded the possibility of including support for DRM in Linux. Likewise, there are several open source projects working on Linux DRM solutions.

Space web hosting - 464Part IVRunning ApplicationsRelatively few audio CDs come with

Wednesday, July 25th, 2007

464Part IVRunning ApplicationsRelatively few audio CDs come with protection of any kind, particularly those CDsalready owned by the world s audiophiles. If you make fair-use copies of materialsyou own for your own use, you re not likely to have to worry about anything. If youshould decide to transport copyrighted works in a public forum (peer-to-peer networks for example), you are rolling the dice. The RIAA (Recording IndustryAssociation of America) and MPAA (Motion Picture Association of America) haveboth successfully located and sued users including children distributing con- tent illegally online. Exploring CodecsIf you want to play a video or audio file you need the appropriate codec installedand ready for use by your media player. There are many codecs available, so mak- ing sure you have the ones you need is not usually an issue. Advances in codecshave continued to increase the quality of the encoded content, while reducing filesize. Fortunately most widely distributed videos and audio files (from news sites, for example) are created using a few commonly used codecs. A codec is a compressor-decompressor that is generally used to take existing digitalaudio/video data and reduce the size of the content while retaining the quality ofthe output. If you encounter a media file that you know is a working (i.e., playable) file and you cannot play the file, you may need to identify and install the propercodec. This often involves installing the proper playback application such as the DivX5.0.5 for Linux, which will install the MPEG4 codec for video and audio playback. While there are some commonly used encoding standards, there are also a slew ofproprietary codecs in use today as well. This is really a battleground of sorts witheach vendor/developer trying to produce the superior standard and hopefully thespoils of market share that could follow. For the end user this means you may haveto spend time chasing a variety of playback utilities to handle multiple video andaudio formats. Another debate continues: Can digital media match the quality of analog formats? Not really much of question anymore because DVD has shown the potential forhigh-quality digital video, and MPEG codecs have made huge strides in digital audiofidelity. The quality of digital media files is very high and getting better all the time. Some of the key technologies that have made this the case and are still improvinginclude: .Ogg Vorbis This audio codec has been developed as a freely availabletool no patents or licensing needed. Ogg is the data container portionofthe codec, and Vorbis is the audio compression scheme. There are othercompression schemes that can be used with Ogg such as Ogg FLAC, which isused for archiving audio in a lossless format, and Ogg Speex, which is used tospecifically handle encoding speech. Note27_

Photo web hosting - 463Chapter 19Playing Music and Video .Users can sell

Tuesday, July 24th, 2007

463Chapter 19Playing Music and Video .Users can sell copyrighted works that they own. You can sell your books, DVDs, audio CDs, and other materials as long as you are not retaining a copyfor yourself, or (of course) selling copies of the work without permission fromthe copyright holder. Some people arguing in favor of file trading with copy- righted materials claim that the DMCA infringes on their ability to share content they own. In fact under existing copyright law they do not own much at all and certainly do not possess the rights to redistribute the contentunless they are reselling them in an allowed manner. .Copyrights will expire at some time in the future and fall into the public domain. Basically, you run into the same issue as with the first item. So your DVD moviefalls into the public domain (eventually), but to freely copy the content youmust again circumvent the protection inherent on the DVD and by doing so, you run afoul of the DMCA. It is important to realize the DMCA is very vague about how it defines many oftheacts that are illegal. What is a protection scheme? Some argue that it could benearly anything. Many pundits fear that the DMCA can be used to curtail the use ofnondigital copyrighted works such as books because the law is so vague in definingits own borders. While the courts are trying to clarify where the legal line is in any particular situation, there s a problem in that often the company suing to protect its copyrights is a largecorporation or group and the defendant is either a new company or even an individ- ual user. Court battles are expensive, and the broad scope of the DMCA essentiallyprevents the little guy from ever making his case because he cannot afford to fight. In 1998 a law known as the Sonny Bono Copyright Term Extension Act, or CTEA , waspassed. This act took the already lengthy copyright protection period (generally70years) and extended it by another 20 years, preventing several valuable proper- ties, including film and images of Steamboat Willie (the first Mickey Mouse), fromentering the public domain. The question of practicality is very important when examining copyright issues. Inother words what does all of this mean to you as a Linux user? Well, it means thatifyou have to use any trickery to copy MP3s off your CD collection, you could bebreaking the law. Several CD protection schemes used by record companies are designed to preventdigital piracy, but they are very easy to circumvent in most cases. But should youget caught making MP3s off a protected CD, you could be sued and or arrested(hypothetically speaking). It is quite possible that some of the security on CDs isintentionally weak. It saves development costs and allows the copyright holder topursue anyone who has ripped the CD because there is no legal means of doing so. But that is just speculation. Note27_

462Part IVRunning ApplicationsHow you are allowed to use (Cheap web hosting)

Tuesday, July 24th, 2007

462Part IVRunning ApplicationsHow you are allowed to use the audio, video, and other media you keep on yourcomputers is increasingly dictated by law (U.S. and international). There was a timewhen you could essentially disregard this issue, but in the era where individualcomputer users have been successfully sued by corporations and industry groups, a little more caution is required. Copyright Protection IssuesThe biggest factor in the new world of digital media policy is the 1998 DigitalMillennium Copyright Act (DMCA). This law ostensibly establishes a frameworkforimplementing several international treaties concerning copyright protection. The DMCA has been widely criticized because it potentially intrudes on the free- speech provisions of the U.S. Constitution. Many people view computer code as aprotected form of speech. A conflict arises because the DMCA forbids the develop- ment of applications that are designed to intentionally circumvent content security. For example, Dmitry Skarlov is a Russian cryptographer who was arrested by the FBIwhile attending a conference in Las Vegas because he demonstrated an applicationthat could decrypt Adobe eBooks. If nothing else this event demonstrated that the DMCA had teeth. Unfortunately theseteeth have been used not only to protect legitimate commerce, but to pursue com- puter scientists at academic institutions researching content protection schemes, encryption, and a range of other technologies. Because the DMCA makes it a crimeto manufacture and transport technology used to circumvent copyright protectionschemes, many researchers have abandoned valuable research that could yield better (stronger and more useful) protection schemes or reveal critical flaws inexisting ones. While DCMA has provided some clout for content providers to legitimately protecttheir material, such as persuading search engines to drop information about linksto illegally posted and copyrighted information, there are times when that clout hasbeen abused. Some copyright holders, it seems, are more than willing to use theDMCA to curtail three rights allowed under pre-DMCA copyright law. Copyrightlaw stipulates: .Users can make a copy of any copyrighted work for academic purposes, report- ing or critique. This includes a wide range of uses, from students/instructorscopying materials for research to someone creating a parody of publishedmaterials. But what about a student making a copy of some DVD materials fora multimedia presentation? The student has fair-use access to the material onthe DVD, but the DMCA makes it illegal for the student to break the DVD encryp- tion that would allow the student to actually copy the material. The fair-use rule is a privilege in others than the owner of the copyright to use thecopyrighted material in a reasonable manner without his consent. Note27_

Web design templates - Playing Musicand VideoOne of the most popular and

Monday, July 23rd, 2007

Playing Musicand VideoOne of the most popular and enjoyable activities on acomputer is playing audio and video. With improvedmultimedia players and tools for storing and managing con- tent, Linux has become a great platform for storing, playing, and managing your music and video files. In this chapter, you learn to use the sound, video, digital imag- ing, and other multimedia tools available for Linux. You explorethe process of configuring audio and select video devices andexamine the kinds of media formats available for Linux plat- form, how they work, and how to make the most of them byusing the right applications. Linux is an excellent platform for taking advantage of widelyused formats such as MPEG, AVI, OGG, QuickTime, andRealMedia. There are several players available for the variousformats, and this chapter discusses several of them to helpyou determine which might be the right one (or combination) for your interests and/or needs. Probably still the most widely used piece of multimedia tech- nology remains the CD-ROM, so this chapter takes a detailedlook at setting up and burning your own CDs. Regardless ofyour need to store data or create audio and software CDs, youwill find there are many tools to help you get the job done. Playing Digital Media and Obeying the LawWhat an end user can legally do with digital media is a hottopic right now. What exactly can you do as faras makingcopies of your CDs, DVDs, and other media? Unfortunately, there is no real good answer. This issue affects just aboutevery computer user, either directly or indirectly. 1919CHAPTER …In This ChapterLegal issues withdigital mediaUsing your Windowscontent on LinuxPlaying musicSetting up TV andaudio cardsRecording andripping musicWatching TV andcamerasWatching moviesandvideos …

RunningApplications…In This PartChapter 19Playing Music and VideoChapter 20Working (Web site developers)

Monday, July 23rd, 2007

RunningApplications…In This PartChapter 19Playing Music and VideoChapter 20Working with Wordsand ImagesChapter 21E-Mailing and Web BrowsingChapter 22Gaming Alone and Online …