BSD DevCenter

oreilly.comSafari Books Online.Conferences.

We've expanded our LAMP news coverage and improved our search! Search for all things LAMP across O'Reilly!

Search
Search Tips

advertisement

Listen Print Discuss Subscribe to BSD Subscribe to Newsletters

Playing Audio and Video Files with FreeBSD
Pages: 1, 2, 3

Now, let's take a look at MIME types. In order to configure any browser to call another application to play a file, you need to know which MIME type is associated with which file extension. This chart shows both for the formats realplay and netshow are capable of playing:



MIME type		  File Extension	Application to use

audio/x-pn-realaudio	  ram			/usr/local/bin/realplay
video/x-ms-asf		  asf			/usr/X11R6/bin/netshow
video/x-ms-wmv		  wmv			/usr/X11R6/bin/netshow

To configure Mozilla, go to the Edit menu->Preferences->Helper Applications, then click on the "New Type" button. In my case, I'll create three new types, one for each line in the above chart.

When creating your own types, choose a description that is useful to you, then fill in the remaining fields using the information from the above chart. By default, Mozilla will prompt to open using your specified application whenever you encounter an associated file type. If you don't want to receive that prompt, highlight your type, then go into Edit and uncheck the "ask me before opening" option.

A couple of notes before leaving the Mozilla browser. The plugger application will play both Quicktime and DivX movies. Between plugger and divxPlayer, I've never had any problems playing a DivX movie. However, I've had mixed success with Quicktime movies. plugger supports the older mov and qt formats, but not the new Quicktime avi format. Most of the Quicktime trailers on the Internet, and everything at Apple's Quicktime site uses the new format. As of this writing, there aren't any workable ports in the ports collection that will play the latest Quicktime format.

I'd like to end this article with one of my favorite applications from the ports collection. I always build this one on my workstations:

$ cd /usr/ports/graphics/chbg
$ make install clean

The executable will be installed to /usr/X11R6/bin/chbg. Information on chbg, including screenshots of all of the configuration screens, can be found at the ChBg home page.

I have a very large collection of favorite pictures that I've collected over the years, and it still never ceases to amuse me whenever I walk by one of my computers and notice that chbg is displaying my collection as an ever-changing slideshow.

I tend to use chbg as a screensaver though it supports several other modes in its Mode tab. Once you've chosen a mode, click on the Picture list tab-> Append pictures button. In my case, I've made a subdirectory in my home directory to store my pictures. Once I've chosen this directory, I can then click on the Select All button.

In the Setup tab, you can choose whether or not to randomize the picture order and can select the speed at which the picture change will occur. To set how often the pictures will change, input a time interval in the Properties tab. This tab also lets you decide whether to tile or to center the picture.

My favorite tab is the Effects tab as chbg supports many effects. The easiest way to test an effect is to select screensaver mode then click the button "run with actual settings." You can quickly scroll through the various effects and see which ones appeal to your taste. If you'd like randomized effects or can't make up your mind on which effect to use, use the Random effects tab to select the effects that interest you.

Once you've customized your settings, you can save these as a scenario by clicking on the save scenario button. You can give your scenario whatever name you like and open it at any time using the open scenario button. You can also use this method to save as many scenarios as you like.

I hope you have enjoyed the multimedia series. The next few articles will cover the subject of VPNs. This topic comes up often on the mailing lists and is probably the most commonly asked question I get asked in private emails. The next article will cover the basic cryptographic terms you need to be familiar with in order to understand how a VPN operates. Then I'll move on to demonstrating some of the applications which can provide VPN support between FreeBSD systems and other systems.

Dru Lavigne is a network and systems administrator, IT instructor, author and international speaker. She has over a decade of experience administering and teaching Netware, Microsoft, Cisco, Checkpoint, SCO, Solaris, Linux, and BSD systems. A prolific author, she pens the popular FreeBSD Basics column for O'Reilly and is author of BSD Hacks and The Best of FreeBSD Basics.


Read more FreeBSD Basics columns.

Return to the BSD DevCenter.



What are your experiences with multimedia playback on free Unixes?
You must be logged in to the O'Reilly Network to post a talkback.
Post Comment
Full Threads Oldest First

Showing messages 1 through 5 of 5.

  • Realplayer won't start
    2002-10-28 03:35:40  anonymous2 [Reply | View]

    I couldn't start realplayer, keep getting this error message:

    ELF binary type "0" not known.
    Abort

    Any help is appreciated.

    ps. I've got Linux_Base-7.1_1 installed.
    • Realplayer won't start
      2003-11-14 00:51:02  anonymous2 [Reply | View]

      You have to use

      % brandelf -T Linux /path/to/realplayer/binary
  • avifile
    2002-10-19 23:24:20  anonymous2 [Reply | View]

    I have found that the avifile port works well in mozilla for windows media player file formats. Only problem is that it has a dependency on the Qt library and I run a gnome only system.
  • Netshow, does it really work?
    2002-10-19 16:04:42  anonymous2 [Reply | View]

    I have two systems, both running 4.7, kde3, xfree 4.x.x. One has a radeon mobile 7500 and the other system has a old tnt card in it. I can't get any display from netshow on either system. Next i'm building a linux system in an attempt to get it to work. Or would an earlier version of Xfree or kde be a better thought?
  • Plugger is good but...
    2002-10-18 12:21:18  anonymous2 [Reply | View]

    Plugger is a fine tool, but not very easy to configure on KDE3. I have yet to get Plugger to funnel the helper apps that need audio to route through KDE's Arts server. Mplayer, mpg123, and xanim all have problems playing sounds as the arts server locks up the audio unless these apps are launched via artsdsp. Granted, I am not all that familiar with the interaction of Plugger and Arts so I may have missed something in my pluggerrc file. However, I wonder how many others are having this issue as a Google search gave me little help.


Sponsored Resources

  • Inside Lightroom
Advertisement

Sponsored by:

O'Reilly Media

©2009, O'Reilly Media, Inc.
(707) 827-7000 / (800) 998-9938
All trademarks and registered trademarks appearing on oreilly.com are the property of their respective owners.
About O'Reilly
Academic Solutions
Authors
Contacts
Customer Service
Jobs
Newsletters
O'Reilly Labs
Press Room
Privacy Policy
RSS Feeds
Terms of Service
User Groups
Writing for O'Reilly
Content Archive
Business Technology
Computer Technology
Google
Microsoft
Mobile
Network
Operating System
Digital Photography
Programming
Software
Web
Web Design
More O'Reilly Sites
O'Reilly Radar
Ignite
Tools of Change for Publishing
Digital Media
Inside iPhone
O'Reilly FYI
makezine.com
craftzine.com
hackszine.com
perl.com
xml.com

Partner Sites
InsideRIA
java.net
O'Reilly Insights on Forbes.com