Jump to content
xisto Community
Sign in to follow this  
abdo1405241556

Do I Need To Do Any Extra Setup For Audio / Video Output? learn more

Recommended Posts

Since we already assumed you have an up and running linux installation, you most likely won't have to do any work in this area. Most modern distributions automatically configure X and audio for you, and there is a host of information on the web for configuring X.

As far as audio goes, there are many different audio architectures available. We recommend choosing a distribution that uses ALSA (the advanced linux sound architecture) by default since it is the most powerful sound system and supports the most hardware. If your distribution doesn't include it, check out Q19 of the AC3 FAQ or this gentoo ALSA guide.

2. What is a good audio/video player for linux?

There are many excellent AV players available for linux, the three most popular are mplayer, videolan's VLC, and xine. Binary packages of these players are included in most distributions.

Since mplayer is one of the most versastile players, includes mencoder, one of the best transcoding softwares, and is one of the easiest players to build from source, we'll mention how to install mplayer here:

1.) Install any applicable libraries/codecs you want to use with mplayer first. For basic operation you'll probably want libavcodec, xvid, and some win32 binary codecs (for formats without open source libraries). Download one of the binary codec packs from the mplayer homepage (for example extralite.tar.gz) and extract it to /usr/local/lib/codecs/. If you're compiling from CVS (recommended) make sure to check out the libavcodec source for copying into the mplayer source directory:
Code:
$ cvs -d:pserver:anonymous@mplayerhq.hu:/cvsroot/ffmpeg co ffmpeg/libavcodecFor more information on the involved software see http://mplayerhq.hu/DOCS/HTML/en/install.html and http://forums.xisto.com/no_longer_exists/ .

2.) Download mplayer source code from http://forums.xisto.com/no_longer_exists/ . The recommended version is always the latest CVS (mplayer-current.tar.bz2) Although binary packages from mplayer are available for many systems, it is usually better to compile from source since mplayer will be optimized for your processor, and the installation will detect what codec and AV output libraries are present on your system. Unpack the tarball in your directory of choice:
Code:
$ tar xvjf mplayer-current.tar.bz2Or if you want to use CVS for quicker future updates:
Code:
$ cvs -d:pserver:anonymous@mplayerhq.hu:/cvsroot/mplayer co mainDon't forget to copy the libavcodec directory we checked out earlier into the 'main' directory.

3.) Configure mplayer by running ./configure from the root of the mplayer directory. './configure --help' will show you some configuration options, and you may want to add support for the GUI and for large files:
Code:
$ ./configure --enable-gui --enable-largefilesAfter running this script will tell you which codecs and output libraries have been detected, check through the list to make sure everything you need has been detected. You can then build and install mplayer and mencoder:
Code:
$ make
# make install4.) Be sure to read over the mplayer manpage ( I know it's enormous) to become familiar with its control. You can add options to the mplayer config file (default /usr/local/etc/mplayer/mplayer.conf) rather than specifying them on the commandline. My mplayer.conf looks like this: (specify dvd drive location, alsa audio driver, and try S/PDIF output before others)
Code:
ao=alsa
dvd-device=/dev/hdc
ac=hwac3,In order to run the GUI you'll need to put a skin in '/usr/local/share/mplayer/Skin/default' (download & install a skin from the homepage, unpack, and rename the folder to 'default') and a default sub font in '~/.mplayer/subfont.ttf'.

Now you should be set to play with mplayer and encode with mencoder. You can find lots more information on all these topics in the mplayer documentation ( http://mplayerhq.hu/DOCS/HTML/en/ ) and the mplayer manpage ('man mplayer').

3. What about a good audio player for linux?

Two good winamp-like players for linux are XMMS and beep-media-player (a fork of XMMS with an updated interface). One or both of these is included with many distributions.

Like winamp there are a host of input and output plugins available for XMMS. You can get the source for these at the xmms homepage or from your distribution's repositories (in the case of gentoo, debian, or other distros with vast repositories).

A newer audio player that is gaining much popularity is amaroK. amaroK features a gstreamer interface, an advanced media library, highly configurable interface, cover art downloading plugin, and much more.

Please note that some distros such as Redhat/Fedora do not include an mp3 decoder with XMMS due to legal reasons. In this case you need to install an mp3 plugin, check out rpm.livna.org for RPMs of this and other packages omitted from the Fedora/Red Hat distribution.

4. What options do I have for playing DVDs under linux?

Many distributions include some sort of DVD capable player in their main repository. Please note that as with MP3, some distributions do not include CSS-decrypting capable players due to legal reasons. As above rpms can be found at rpm.livna.org, or you can install your own player.

A full mplayer install as noted above will be dvd-capable (although mplayer does not support menues at this time) and you can play dvds through the GUI or by the command
Code:
mplayer dvd://1 -dvd-device /dev/hdcIn this example the dvd device is /dev/hdc, you'll need to specify the device via CLI or config file unless the device is the mplayer default /dev/dvd.

Videolan's VLC is another good choice for dvd playback, you can find binaries on their homepage or source install instructions here.

Two other common DVD players are xine and ogle.

4B. How can I playback an ISO image of a DVD on my hard drive?

You can easily mount the iso and then play it back as if it is a mounted DVD disc, for example:
Code:
# mkdir /mnt/dvd_image
creates the mountpoint directory

# mount -o loop -t udf /path/to/image.iso /mnt/dvd_image
mounts the ISO image /path/to/image.iso on the /mnt/dvd_image directory

$ mplayer dvd://1 -dvd-device /mnt/dvd_image
Plays the mounted image with mplayer

$ vlc --dvd /mnt/dvd_image
Plays the mounted image with VLC5. How can I playback audio in multichannel or over S/PDIF?

For S/PDIF, you'll first need to set up the appropriate ALSA settings by running alsamixer (assuming your distro uses ALSA, see Q1 above) and unmuting the S/PDIF output. PCM audio will automatically be played over s/pdif, to play passthrough DTS or AC3 you'll need to specify this setting in the player. In mplayer this is done with the '-ac hwac3' or '-ac hwdts' switches, in VLC the settings can be found in the audio section of the preferences.

For analog multichannel you'll again need to set up the appropriate outputs in alsamixer and you can then specify '-channels 6' in mplayer.

6. How can I play video content over my tv-out in linux?

You'll first want to configure X to run your Tv-out as a second xineramascreen (dual head configuration). There are many guides on the internet for this configuration based on different video card manufacturers, see this LQ wiki page for some starter information. After this is set up you can specify the xineramascreen for playback in mplayer via the '-xineramascreen #' switch or in vlc by the '--x11-xineramascreen #' switch.

Share this post


Link to post
Share on other sites

on fedora

Do I Need To Do Any Extra Setup For Audio / Video Output?

 

Give me codes or the steps to play audio clip in fedora 9 & and also some more tips to on linux

 

-reply by Harikrishna.G

Share this post


Link to post
Share on other sites

Are you talking about codecs ?

If you are missing codecs you can easily install them buy using the package manager that came with your distribution.

As said by abdo, mplayer is a good A/V program it can play almost anything (even corrupt/incomplete files are played pretty well with this program). It usualy is available in your distribution's repository so it's easy to install.

 

 

@abdo: if you have some command line stuff in your topic, it's best to place them in [ code][ /code] tags, makes it a lot easier to read :rolleyes:

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.