Playing Video


Although several fairly high-quality video players are available for Linux, none are included in the Fedora Core distribution. Legal issues surrounding the playing of encoded DVD movies in Linux might be responsible for keeping players such as the Mplayer (freshmeat.net/mplayer), Ogle (http://www.dtek.chalmers.se/groups/dvd), and Xine (xine.sourceforge.net) video players out of this distribution.

By most accounts, however, if you don’t download and use the DeCSS (software for decrypting DVD movies), you can get and use these video players to play a variety of video content for personal use. The following sections provide descriptions of video applications to use with Fedora.

Watching Video with Xine

The xine player is an excellent application for playing a variety of video and audio formats. You can get xine from xine.sourceforge.net or by downloading RPMs from rpm.livna.org/fedora.

You can start the xine player by typing xine& from a Terminal window. Figure 8-8 shows an example of the xine video player window and controls.

image from book
Figure 8-8: Play video CDs, MP3s, QuickTime, and other video formats with xine.

Note 

When you try to install xine, it will tell you if you need any additional packages. If your xine player fails to start, see the “Xine tips” section later in this chapter.

Xine supports a bunch of video and audio formats, including:

  • MPEG (1, 2, and 4)

  • QuickTime (see “Xine tips” if your QuickTime content won’t play)

  • WMV

  • DVDs, CDs, and VCDs

  • Motion JPEG

  • MPEG audio (MP3)

  • AC3 and Dolby Digital audio

  • DTS audio

  • Ogg Vorbis audio

Xine can understand different file formats that represent a combination of audio and video. These include .mpg (MPEG program streams), .ts (MPEG transport streams), .mpv (raw MPEG audio/video streams), .avi (MS AVI format), and .asf (Advanced Streaming format). While xine can play Video CDs and DVDs, it can’t play encrypted DVDs or Video-on-CD hybrid format as xine is delivered (because of the legal issues mentioned earlier related to decrypting DVDs).

Using xine

With xine started, right-click in the xine window to see the controls. The quickest way to play video is to click one of the following buttons, then press the Play button (right arrow or play, depending on the skin you are using):

  • VCD (looks for a video CD)

  • DVD (looks for a DVD in /dev/dvd)

  • CDA (looks a music CD in /dev/cdaudio)

Next, you can use the Pause/resume, Stop, Play, Fast motion, Slow motion, or Eject buttons to work with video. You can also use the Previous and Next buttons to step to different tracks. The controls are very similar to what you would expect on a physical CD or DVD player.

To select individual files, or to put together your own list of content to play, you can use the Playlist feature.

Creating playlists with xine

Click the Playlist button on the left side of the xine control window. A Playlist Editor appears, showing the files on your current playlist. You can add and delete content from this list, then save the list to call on later. Here's how you use the xine Playlist Editor:

  • CDA, DVD, or VCD — Click any of the buttons that represent a particular CD or DVD. All content from that CD or DVD is added to the playlist.

  • Add — Click the Add button to see the MRL Browser window. From that window, click File to choose a file from your Linux file system to add to the list. Click Select to add that file to the Playlist Editor.

  • Move up/Move down — Use the Move up selected MRL and Move down selected MRL buttons to move up and down the playlist.

  • Delete — Click the Delete Selected MRL button to remove the current selection.

  • Delete all — Click the Delete All Entries button to clear the whole playlist.

  • Save — Click the Save button to save the playlist to your home directory ($HOME/.xine/playlist).

  • Load — To read in the playlist you saved, click the Load button.

The xine content is identified as media resource locators (MRLs). Each MRL is identified as a file, DVD, or VCD. Files are in the regular file path (/path/file) or preceded by file:/, fifo:/, or stdin:/. DVDs and VCD are preceded by dvd and vcd, respectively (for example, vcd://01).

To play your playlist, click the Play button (arrow key) on the Playlist Editor.

Xine tips

Getting video and audio to work properly can sometimes be a tricky business. Here are a few quick tips if you are having trouble getting xine to work properly (or at all):

  • Xine won’t start — To work best, xine needs an X driver that supports xvid. If there is no xvid support for your video card in X, xine will shut down immediately when it tries to open the default Xv driver. If this happens to you, try starting xine with the X11 video driver (which is slower, but should work) as follows:

     $ xine -V XShm 
  • Xine playback is choppy — If playback of files from your hard disk is choppy, there are a couple of settings you can check: 32-bit IO and DMA. (If these two features are supported by your hard disk, they will generally improve hard disk performance.)

    Caution 

    Improper disk settings can result in destroyed data on your hard disk. Do this procedure at your own risk. This procedure is only for IDE hard drives (not SCSI)! Also, be sure to have a current backup and no activity on your hard disk if you change DMA or IO settings as described below.

    First, test the speed of hard disk reads. To test the first IDE drive (/dev/hda), type:

     # hdparm -t /dev/hda  Timing buffered disk reads: 64 MB in 19.31 seconds = 3.31 MB/sec 

    To see your current DMA and IO settings, as root user type:

     # hdparm -c -d /dev/hda /dev/hda:   I/O support = 0 (default 16-bit)   using_dma   = 0 (off) 

    This shows that both 32-bit IO and DMA are off. To turn them on, type:

     # hdparm -c 1 -d 1 /dev/hda /dev/hda:   I/O support = 1 (32-bit)   using_dma   = 1 (on) 

    With both settings on, test the disk again:

     # hdparm -t /dev/hda  Timing buffered disk reads: 64 MB in 2.2 seconds = 28.83 MB/sec 

As you can see from this example, buffered disk reads of 64 MB went from 19.31 seconds to 2.2 seconds after changing the parameters described. Playback should be much better now.

  • Xine won’t play particular media — Messages such as no input plug-in mean that either the file format you are trying to play is not supported or it requires an additional plug-in (as is the case with playing DVDs). If the message is maybe xyx is a broken file, the file may be a proprietary version of an otherwise supported format. For example, I had a QuickTime video fail that required an SVQ3 codec (which is currently not supported under Linux), though other QuickTime files will play fine.

    Note 

    The CrossOver Plugin (described in Chapter 9) can be used to play a variety of content, including the version of QuickTime just mentioned.

Using RealPlayer

A tremendous amount of content is available on the Internet in the RealMedia and RealAudio formats. You can see and hear video clips of popular musicians and comics. You can view live events, such as conferences, news stories, and concerts. You can also listen to your favorite radio stations when you are out of town.

To play RealMedia and RealAudio content you need, as you may have guessed, RealPlayer. Real Networks (www.real.com) is a leader in streaming media on the Internet. More than 50 million unique users have registered with Real Networks and their Web site, downloading more than 175,000 files per day. And that’s not even the good news. The good news is that RealPlayer is available to run in Fedora.

RealPlayer 10 for Linux is available from the www.real.com/linux site. When I tried it, there was a link to download an RPM package. RealPlayer 10 is based on open source code from the Helix Community (www.helixcommunity.org). Helix Player is also available from Real Networks through its Helix Community and is included with Fedora Core 3 (although the most useful codecs are available only in source code at the moment).




Red Hat Fedora Linux 3 Bible
Red Hat Fedora Linux 3 Bible
ISBN: 0764578723
EAN: 2147483647
Year: 2005
Pages: 286

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net