LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 11-13-2004, 10:42 AM   #1
araldit
Member
 
Registered: Feb 2004
Posts: 66

Rep: Reputation: 15
mplayer auto dection of movie format.


hi.

I use mplayer every day, and for now it works and do what it is supposed to do. Even though it is working, there is some minor things that i would like it to do.

If i play want to play a move i use the command:

mplayer -vo xv -ao alsa -fs -ac hwac3 'file.avi'

This is all fine, the movie plays and the dolby digital sound is playing. However, not all of my movies are with ac3 sound, though I have to use the command:

mplayer -vo xv -ao alsa -fs 'file.avi'

This command can play all of my files including the once in ac3, but naturally the once in ac3 is to be played with ac3, is it possible to make a script, to autodetect the audioformat and then execute the right argument . Perhaps in the config file to specify the preferred codecs in a row. And if this can be done, is it possible to do the same with the movie aspect, some are made in 16:9 anamorphic, some in 4:3 and others in 16:9 with black borders.

Im using Mythtv as frontend for mplayer, but that shouldn't be a problem.

Best regards.

Araldit
 
Old 11-14-2004, 12:41 PM   #2
tox2ik
LQ Newbie
 
Registered: Nov 2004
Location: norway
Distribution: gentoo
Posts: 23

Rep: Reputation: 15
what the hell are you talking about? mplayer autodetects everything.

Quote:
http://mplayerhq.hu/DOCS/HTML-single...html#id2824626
The directory $PREFIX/share/mplayer contains the codecs.conf file, which is used to tell the program all the codecs and their capabilities. This file is needed only when you want to change its properties, as the main binary contains an internal copy of it. Check if you have codecs.conf in your home directory (~/.mplayer/codecs.conf) left from old MPlayer versions, and remove it.
 
Old 11-14-2004, 12:54 PM   #3
araldit
Member
 
Registered: Feb 2004
Posts: 66

Original Poster
Rep: Reputation: 15
Well, first of all thanx for replying on my post.

However, eighter you have gotten this to work or you simply dont have a card capable of playing AC3, because if I use mplayer, without any arguments telling it to direct AC3 to the spdif output jack, it will play in plain 2 channel stereo (PCM).

So if you would explain to me what you have done to accomplish this I would very much appreciate it.


araldit
 
Old 11-14-2004, 05:37 PM   #4
tox2ik
LQ Newbie
 
Registered: Nov 2004
Location: norway
Distribution: gentoo
Posts: 23

Rep: Reputation: 15
what i did, eh?
well first of all i have alsa, which you probably have too if you have a "modern" version of your distribution if not read the alsa-howto or alsa-mini-howto and make alsa work on your host. After that get the codecs from mplayerhq.hu, i just dload everything i find there and put them in /home/tox2ik/progs/mp.c, you however might not need codecs like xanim and others, its up to you, but you should get at least the essential pack and maybe the windows one (maybe it is in the essential pack, i dont remember). Then you can compile mplayer. what i do is, after ive dloaded and untared the latest stable mplayer source ball:
Code:
CPPFLAGS=-march=i686 -O3
CXXFLAGS=-march=i686 -O3
CFLAGS=-march=i686 -O3 
     ./configure \
     --disable-gui \
     --disable-tv \
     --disable-tv-v4l \
     --disable-tv-v4l2 \
     --disable-tv-bsdbt848 \
     --enable-network \
     --disable-dvdread \
     --disable-mpdvdkit \
     --disable-macosx \
     --disable-inet6 \
     --disable-gif \
     --enable-ftp \
     --disable-smb \
     --enable-largefiles \
     --enable-jpeg \
     --enable-real \
     --enable-xvid \
     --enable-xv \
     --enable-xvmc \
     --disable-internal-matroska \
     --enable-gl \
     --disable-tga \
     --disable-dga \
     --disable-vesa \
     --disable-svga \
     --disable-dvbhead \
     --disable-mga \
     --disable-fbdev \
     --disable-svga \
     --disable-mga \
     --disable-xmga \
     --enable-ossaudio \
     --disable-jack \
     --disable-nas \
     --disable-sgiaudio \
     --disable-sunaudio \
     --disable-arts \
     --disable-esd \
     --disable-sdl \
     --disable-nas \
     --language=en \
     --with-codecsdir=/home/tox2ik/progs/mp.c   \
     --with-win32libdir=/home/tox2ik/progs/mp.c/win32codecs   \
     --with-xanimlibdir=/home/tox2ik/progs/mp.c/xanimdlls  \
     --with-reallibdir=/home/tox2ik/progs/mp.c \
     --with-xvidlibdir=/usr/local/lib  \
     --with-xvidincdir=/usr/local/include

make 
make install (actually, i run checkinstall and build a slackware package)
after that do as the site (which i gave you link to in the previous post) says and copy the codecs.conf to an apropriate place. after that you should be set. i recomend running ./configure --help |less in the MPlayer-"version" directory. you might wanna include things like dvd support and etcetra.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Is there linux software for extracting/editing audio from a .mpg format movie Rick069 Linux - Software 1 11-10-2005 08:42 PM
Xine Auto-closes when I try to play movie fatenabu Linux - Software 12 09-14-2005 10:03 PM
How do you watch a movie in .iso format?NT NoTiG Linux - Newbie 6 05-18-2005 05:59 PM
Xine and Blizzard Warcraft3 movie MPQ file format Kme1e0n Linux - Software 0 10-08-2003 09:12 AM
MPlayer,loading movie..... Swift&Smart Linux - Software 6 05-22-2003 11:49 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:13 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration