Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống
1
/ 67 trang
THÔNG TIN TÀI LIỆU
Thông tin cơ bản
Định dạng
Số trang
67
Dung lượng
2,15 MB
Nội dung
CHAPTER 17 ■ MOVIES AND MULTIMEDIA 376 Using Totem is easy, and the interface has only a handful of options. At the bottom left of the screen are the transport controls that enable you to pause, play, and move forward and backward in the video file. Alternatively, you can right-click the video window and select the controls from there. Above the controls is the Time bar. You can usually drag the slider to move through the video, but not all files support this function. You might find that some dragging is allowed, but you’re not able to click a new place in the Time bar and have the counter jump to that position. Figure 17-4. Totem can play just about every kind of movie file, such as QuickTime, Windows Media Player, DivX, and Ogg (or .ogv) files, as shown here. At the right of the program window is a playlist. You can queue several video files to be played in sequence by simply dragging and dropping movies from a Nautilus file browser window. You can hide the playlist by clicking the Sidebar button. This gives nearly all of Totem’s program window to the playback window. To play the video full screen, thereby hiding the desktop and Totem controls, press the F key. To return to the program window, press Esc (or press F again). In full-screen mode, you can start and stop the video by pressing the spacebar. To adjust the image quality, click Edit Preferences and then click the Display tab in the Preferences dialog box. You can make adjustments by clicking and dragging the Brightness, Contrast, Saturation, and Hue sliders. If a video is playing in the background, the changes are shown as you make them. CHAPTER 17 ■ MOVIES AND MULTIMEDIA 377 ■ Tip If you find you have problems with video playback, such as Totem showing an error message about another application using the video output, try the following: click System Preferences Terminal, and at the prompt, type gstreamer-properties. Click the Video tab, and in the Plugin drop-down list under Default Output, select Xwindows (No XV). OPEN SOURCE MOVIE FILE FORMATS A number of promising open source movie file formats are in development. Some are more mature than others, but few see widespread use at the moment. All promise much for the future. Many consider the following three formats the chief contenders: • Xvid ( www.xvid.org) is a reworking of the popular DivX MPEG-4–based file format. Unfortunately, Xvid uses technology covered by patents in some parts of the world, so the project exists in a legally gray area. Xvid is able to encode movies to relatively small file sizes (a 90-minute movie can fit on a CD). Despite small file sizes, this format maintains good image and sound quality. In theory, it should also be possible to play Xvid movies by using any MPEG-4 codec, such as DivX or QuickTime. • Ogg Theora ( www.theora.org) is being developed by the Xiph.org Foundation, the people behind the Ogg Vorbis audio codec project that’s a favorite among Linux users. As such, it promises to be a completely open source project. Although the technology, again, is covered by patents, Xiph.org has promised never to enforce them, meaning that anyone in the world can use Theora without charge. • HTML 5 is currently being developed by the World Wide Web Consortium (W3C). Like all its predecessors, from HTML 1.0 onwards, it is supposed to become the dominant web markup language. HTML 5 has explicit support for audio and video. Some parts are stable, others are not, but its video support is being developed vigorously and should be stable by the end of 2010. Watching DVDs DVD movie discs are protected by a form of DRM called CSS. This forces anyone who would like to create DVD playback software or hardware to pay a fee to the DVD Copy Control Association, an industry organization set up to protect DVD movie technology. Nearly all Linux advocates are scornful of any kind of DRM system. Although it is possible to purchase playback software created by Fluendo and CyberLink through Ubuntu’s online store, few appear to be willing to support what they see as restrictive software technology. Some open source advocates reverse-engineered DVD protection and came up with the DeCSS software. This bypasses the CSS system and allows the playback of DVD movies under practically any operating system. Sadly, DeCSS is caught in a legal quagmire. The Motion Picture Association of America (MPAA) has attempted to stop its distribution within the United States, but has so far failed. Some CHAPTER 17 ■ MOVIES AND MULTIMEDIA 378 experts suggest that distributing DeCSS breaks copyright laws, but there has yet to be a case anywhere in the world that proves this. Nor has there been a case proving or even suggesting that using DeCSS is in any way illegal. Ubuntu doesn’t come with DeCSS installed by default, but you can download and install the software by issuing a simple command, following the installation of a software package. Here is the procedure: 1. Choose System Administration Synaptic Package Manager. 2. Click Search and search for libdvdread4. In the list of results, click the check box alongside the package and click Mark for Installation. Click Apply on the main toolbar. Close Synaptic. 3. Open a terminal window (Applications Accessories Terminal). Type the following in the terminal window to download and install the DeCSS component: sudo /usr/share/doc/libdvdread4/install-css.sh 4. After the command has completed, you can close the terminal window. ■ Note You must ensure that Synaptic and Update Manager are closed before typing the command to install the DeCSS software. It will fail if either program is running. After you’ve installed DeCSS, just insert a DVD, and Totem will automatically start playing it, as shown in Figure 17-5. ■ Note If the relevant codecs aren’t installed when you insert a DVD, you will be prompted to install them, as with all kinds of multimedia file playback. If the movie doesn’t start playing automatically, double-click the disc’s icon on the desktop. In the Nautilus file browser window, click the Open Movie Player button. Unfortunately, there is a slight limitation to playing DVD movies within Totem: the chapter menus don’t work, so you can’t navigate from chapter to chapter in the disc. Additionally, in our tests, we noticed that DVD playback can be a little glitchy. To get around both these issues, you can install the totem-xine package. This installs a separate but otherwise identical version of the Totem movie player that utilizes the Xine multimedia framework. Then you can choose between using the standard version of Totem, which relies on the GStreamer multimedia framework, or the Xine version of Totem. Installing the totem-xine package also installs Xine versions of the codecs you need for virtually all multimedia file playback, meaning no extra configuration is necessary. CHAPTER 17 ■ MOVIES AND MULTIMEDIA 379 Figure 17-5. Just insert a DVD in your computer, and it will automatically play in Totem. ■ Note You might be wondering why we didn’t just advise you to install totem-xine back at the beginning of this chapter, if it installs all the codecs you need. The method we recommend installs codecs for the GStreamer multimedia framework, rather than just Totem. GStreamer is used by all the GNOME desktop multimedia software. This means that if you install a different GNOME movie player in the future, it will automatically have support for all the file formats you’ve already added to Ubuntu. In contrast, the totem-xine package is rather self-contained and installs codecs for only the Xine framework, which isn’t supported elsewhere under Ubuntu (but is the default framework under KDE). To install the totem-xine package, start the Synaptic Package Manager (System Administration) and click the Search button. Search for totem-xine. Click the check box alongside the entry in the results list and select to install it. As you’ll see from the warning dialog box, installing totem-xine also installs a lot of other packages, including the necessary codecs for playback of virtually all multimedia files. This is fine. From now on, you’ll need to run the Xine version of Totem to play DVD movies. You’ll have to do this before you insert the DVD movie disc, to avoid the standard version of Totem attempting to play it. To run the Xine version of Totem, you can use either of these methods: Run it from a terminal window: Click Applications Accessories Terminal and type nohup totem-xine. Create a new launcher: Right-click the desktop, select Create Launcher, and in the Command text box, type totem-xine. In the Name box, type something like Totem (Xine) for easy identification, and then click OK. CHAPTER 17 ■ MOVIES AND MULTIMEDIA 380 ■ Tip To find out which version of Totem you’re using—GStreamer or Xine—click Help About in Totem. You’ll see either “Movie Player using xine-lib,” in the case of Xine, or “Movie Player using GStreamer,” in the case of GStreamer. MOVIE EDITING The field of Linux movie-editing software is developing, and only a handful of programs are available for the nonprofessional user. One of the best is Kino ( www.kinodv.org), which is available in the Ubuntu software archives. Although far from being a professional-level program, Kino allows competent users to import and edit videos, apply effects, and then output in either MPEG-1 or MPEG-2 format. If you’re looking for something more powerful, but also more complicated, Cinelerra is worth a look ( http://heroinewarrior.com/cinelerra.php3). Just follow the instructions at http://cvs.cinelerra.org/ getting_cinelerra.php#hardy to install a version of Cinelerra for Ubuntu. For those who want something a little simpler, the PiTiVi ( www.pitivi.org) project is attempting to build a piece of software akin to Apple’s iMovie. The possibilities that are offered by PiTiVi are limited, but you can use it to apply simple movie editing to your video films. You can find a default installation of PiTivi in Applications Sound and Video PiTiVi Video Editor. After starting it, PiTiVi shows the screen that you can see in Figure 17-6. Figure 17-6. PiTiVi offers a simple solution for Video editing on Ubuntu. CHAPTER 17 ■ MOVIES AND MULTIMEDIA 381 Basically, all you can do with PiTiVi is put video clips together to join them in a new file. There are no other editing features, neither is it possible to write to another output format as the default PiTiVi format. If you’re interested in using this application, you can drag and drop your movie files to the pane in the upper left corner. That makes them available for further editing in PiTiVi. From this location, you next drag them to the time line. By dragging several clips to the timeline, you can compose your own video and that is basically it. Another approach to movie editing, is to go web-based. An example of this is Adobe’s Premiere Express (available through the Photobucket picture-sharing service), which is designed specifically for online video editing and distribution. It works very well under Ubuntu with the Flash plug-in. Professional moviemakers don’t just use software that comes with normal desktops. Quite a few use Linux all the time, particularly when it comes to adding special effects to movies. Movies like Shrek 2, Stuart Little, and the Harry Potter series all benefited from the CinePaint software running under Linux! For more details, see www.cinepaint.org. Watching TV If you have a TV card, you may be able to use it to watch TV under Ubuntu. Ubuntu doesn’t come with a TV tuner application by default, but you can download the tvtime program from the software repositories by using the Synaptic Package Manager. Checking for Video Input Ubuntu includes the Video for Linux project, an extension to the Linux kernel, to allow many popular TV and video-capture cards to work. You can find out whether yours is compatible by opening a terminal window (Applications Accessories Terminal) and typing gstreamer-properties. In the dialog box that appears, click the Video tab and click the Test button in the Default Input part of the window. If you see a video window without an error message, your TV card is compatible. If you receive an error message, your card probably isn’t compatible. ■ Note Getting Video for Linux to work can be troublesome, but there are a lot of resources out there to help. You can start by visiting www.linuxtv.org and www.exploits.org/v4l/. Installing tvtime To download and install tvtime, open the Synaptic Package Manager (System Administration), click the Search button, and enter tvtime as a search term. In the list of results, click the entry for the package, mark it for installation, and then click Apply. When the download has completed, you’ll be asked a number of questions during the configuration process. First, you need to choose your TV picture format. Users in the United States should choose NTSC. Users in the United Kingdom, Australia, and certain parts of Europe should choose PAL. To find out which TV system your country uses, look up your country at www.videouniversity.com/standard.htm. CHAPTER 17 ■ MOVIES AND MULTIMEDIA 382 You also need to choose your geographical area from the list so that tvtime can set the correct radio frequency range for your TV card. After the program is installed, you’ll find it on the Applications Sound & Video menu. Using the program is straightforward, but if you need guidance, visit the program’s web site at http://tvtime.sourceforge.net. ■ Tip If you’re interested in setting up a low-cost personal video recorder (PVR) and entertainment system, you may want to install MythTV by using the Synaptic Package Manager. For more information, check out Practical MythTV: Building a PVR and Media Center PC by Stewart Smith and Michael Still (Apress, 2007). Summary In this chapter, you looked at how you can watch movies on your PC. You’ve seen how you can update Ubuntu to work with the most popular digital video technologies, such as Windows Media Player and QuickTime. In addition, you looked at how you can view online multimedia such as Flash animations on your computer, and learned how you can watch TV on your PC. In the next chapter, you’ll take a look at image editing under Ubuntu. You’ll learn about one of the crown jewels of the Linux software scene: GIMP. C H A P T E R 18 ■ ■ ■ 383 Digital Photos The PC has become a vital tool in the field of photography. In fact, you’re unlikely to find any photographer—professional or amateur—who doesn’t use a PC somewhere in his or her work. Ubuntu includes a number of applications for cataloging and editing images. Chief among these is GIMP (GNU Image Manipulation Program), which compares favorably with professional software such as Photoshop. But there are also applications for more casual users. This chapter begins with a brief tour of F-Spot, an application ideal for cataloging and managing image collections and also doing some basic edits, before introducing GIMP. The GIMP is not part of the default Lucid install, but you can quickly and easily install it via the Ubuntu Software Center. Downloading and Cataloging Images Before you can undertake any image editing, you need to transfer the images to your PC. Depending on the source of the pictures, there are a variety of methods of doing this, but in nearly every case, the work of importing your photos can be handled by F-Spot. But before we cover F-Spot, let’s briefly recap the various methods of transferring images to your PC, some of which were outlined earlier in this book. Connecting Your Camera Most modern cameras use memory cards to store pictures. If you have such a model, when you plug the camera into your PC’s USB port, you should find that Ubuntu instantly recognizes it. An icon should appear on the Desktop, and double-clicking it should display the memory card’s contents in a Nautilus window. Along the top of the window, you’ll see an orange bar reading, “This media contains digital photos” alongside a button marked Open F-Spot Photo Manager. Clicking this button starts F-Spot, with which you can copy the images to your hard disk, as explained in the next section. Of course, you can also drag and drop pictures to your hard disk manually using Nautilus. In the unlikely event that your camera doesn’t appear to be recognized by Ubuntu, you might have more luck with a generic USB memory card reader, which will make the card appear as a standard removable drive on the Desktop. These devices are relatively inexpensive and can usually read a wide variety of card types such as SD, XD, and CompactFlash (CF), making them a useful investment for the future. Some new PCs even come with card readers built in, but they often are hard to address in Linux environments. Most generic USB card readers should work fine under Linux, though, as will most new digital cameras. CHAPTER 18 ■ DIGITAL PHOTOS 384 ■ Caution Before detaching your camera or removing a photo card, you should right-click the Desktop icon and select Safely Remove. This tells Ubuntu that you’ve finished with the device. Using this method to eject the device ensures that all data is written back from memory to the photo card. Failing to eject in this way could cause data errors, as information may be partially written back to the card, or transfers between the two devices may not have finished. If you’re working with print photos, negative film, or transparencies, you can use a scanner and the Simple Scan program (Applications Graphics Simple Scan Image Scanner) to digitize them, as explained in Chapter 7. Importing Photos Using F-Spot F-Spot is designed to work in a similar way to applications you may have encountered under Windows or Mac OS X, such as iPhoto or Picasa. After you run F-Spot (Applications Graphics F-Spot Photo Manager), or after you click the Open F-Spot Photo Manager button that appears along the top of a Nautilus file browser window when you insert a memory card or attach your digital camera, the F-Spot Import window will appear. (Depending on your configuration, the Import window may appear within a file browser.) For some devices, though, this doesn’t happen automatically. If, for instance, you attach your mobile phone to your computer, you may have it attached as a disk device by default. To import photos in that case also, use the Import button in F-Spot to browse to the appropriate device and import your pictures from there. The Import window contains a preview of the pictures stored in your camera, the option to tag the pictures, and the target directory where the photos will be copied. If you have no camera attached, you’ll see some default pictures that are available in the F-Spot program directory. While working on your camera, by default, all the pictures are selected. You can deselect and select photos by using the standard selection techniques (Ctrl-click or Shift-click). Embedded tags are very useful in filtering and searching for pictures, as discussed in the “Tagging Images” section a little later in the chapter. The default target directory where the photos will be copied is Photos in your /home directory, but you can change it to any directory you want. To import the pictures from your camera to your hard disk, just click the Import button. F-Spot will import your photos in the target location, in directories named after the year, month, and day the photos were originally taken. Importing pictures from a mounted Windows partition, or any other folder on your computer’s hard disk is easy. Click Photo Import. In the Import window, click the Import Source drop-down list and then click Select Folder. Using the file browser, navigate to the Windows directory containing your images and then click Open. (Don’t double-click the directory, because that causes F-Spot to open the directory in the file browser.) After you’ve selected the folder, F-Spot displays thumbnail previews of the images, and this might take some time. Keep your eye on the orange status bar. When this indicates “Done Loading,” you can click the Import button to import all the images in one go, or Ctrl-click to select photos in the left side of the window and then click the Import button. If you’re importing the photos from a particular event, this is also a great time to define a set of tags for the whole set, which will save having to manually tag pictures later. Using tags makes it much easier to find back your photos later. Of course, a well-organized directory tree containing your photo albums might suit you as well. As with photos from a camera, by default, F-Spot copies the images into a directory it creates within your /home directory, called Photos. Therefore, after you’ve imported the photos, you can delete the originals from the Windows partition if you want. Download from Wow! eBook <www.wowebook.com> [...]... to take program code and create your own version is the foundation of Linux GIMPshop isn’t available via the Ubuntu Software Center, but the Linux version offered for download at the GIMPshop web site can be installed under Ubuntu After you’ve downloaded the package, see Chapter 20 to learn how software installation works under Ubuntu A second Photoshop-like fork of the software is called GimPhoto... possibilities that the casual gamer has at hand In this chapter we first examine what games Ubuntu has to offer by default and in its official repositories Those are games developed specifically for Linux and that are at some level endorsed by Canonical, the company behind Ubuntu There are also other sources of games for Ubuntu, not officially acknowledged, which can provide many hours of fun But the gaming... What if you can have the OS of choice (Ubuntu) and your games at the same time and computer? As you see in this chapter, such thing is possible So start warming up your thumbs, because at the end of this chapter there’ll be action! Linux Games As with any type of application, Ubuntu has a bunch of games installed by default and many other readily available at the Ubuntu Software Center You will usually... installing Ubuntu, you find that Firefox tells you that “Additional plug-ins are required to display all the media on this page,” and where the game should be, a broken link is all you get Many people have thought that that was all for Linux, that they could never be able to play Flash games in Ubuntu This isn’t so In fact, there’s not one but three different ways of playing Flash files in your Ubuntu. .. Plugin in the Ubuntu Software Center 409 CHAPTER 19 ■ PLAYING GAMES Installing Windows Games One of the reasons you might be reluctant to make the switch to Ubuntu is you have made a large investment in Windows games and don’t want to throw all that money away, even when finding Ubuntu the superior OS This is a very understandable concern, but there is a workaround Follow us Welcome to PlayOnLinux In Chapter... sources of games for Ubuntu, this demo is useful because adding software sources is almost always the same two-step process: adding the repository in the Other Software tab, and importing the key in the Authentication tab The next time you open the Ubuntu Software Center after reloading the catalog, you should see under Get Software a new entry, GetDeb, along with Provided by Ubuntu and Canonical Partners... through a lazy day Who hasn’t spent hours at the office playing Minesweeper (Ubuntu s version is called Mines)? 403 CHAPTER 19 ■ PLAYING GAMES ■ Tip You will not find gnome-games if you look for it in the Games department in the Ubuntu Software Center Being a metapackage, you’ll find it either in Get Software or in the Provided by Ubuntu folder Table 19-1 GNOME Games: That’s Entertainment! Aisleriot is... Canonical Partners folder 5 The application Adobe Flash Plugin 10 should be at the top of the list Click Install 6 When it finishes, close the Ubuntu Software Center and open Firefox 7 Go to your favorite Flash gaming site Now you shouldn’t have any problem Ubuntu Software Center ■ Tip You might find Java-based games at some web sites Although Java’s use is less mainstream nowadays than Flash for these... full of obstacles and penguin traps to safety Although penguins (unlike lemmings) are rather smart, they sometimes rely on you to save them Some of the most popular Linux games find their home too in the Ubuntu repositories Before ditching Ubuntu as a gaming platform, try out these games You will be surprised! • Tremulous: Tremulous is a free, open source game that blends a team-based firstperson shooter... doesn’t make games themselves sharable Original licensing restrictions still applies You can install PlayOnLinux from the official repositories Just look for it in the Ubuntu Software Center and click Install Once installed, a shortcut will be created in Applications Games The first time you launch PlayOnLinux it will try to download the game’s catalog from the Internet, which can take a few minutes If a . PiTiVi shows the screen that you can see in Figure 17- 6. Figure 17- 6. PiTiVi offers a simple solution for Video editing on Ubuntu. CHAPTER 17 ■ MOVIES AND MULTIMEDIA 381 Basically, all you. file playback, meaning no extra configuration is necessary. CHAPTER 17 ■ MOVIES AND MULTIMEDIA 379 Figure 17- 5. Just insert a DVD in your computer, and it will automatically play in. is playing in the background, the changes are shown as you make them. CHAPTER 17 ■ MOVIES AND MULTIMEDIA 377 ■ Tip If you find you have problems with video playback, such as Totem showing