LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-05-2007, 04:36 AM   #1
gavyn
LQ Newbie
 
Registered: Mar 2007
Posts: 8

Rep: Reputation: 0
mplayer .avi sound problems


Hey all,
I've recently moved to using Linux (Ubuntu 6.10) and it's great but I've got a problem with mplayer
When I try to play any .avi file or even some .vob files the video is fine but the sound that comes out is just a bunch of static noise (though if you turn it up and listen hard the proper sound is playing)! Totem player that comes with Ubuntu doesn't have any problems playing the sound but I like mplayer more so it'd be great if someone could help me fix it.

I've poked around a bit but can't find what is wrong (I must have done something to it because I remember it playing correctly when I first started using Linux a few weeks ago), I even tried removing and reinstalling it completely (both for source found at sourceforge and from synaptic) and also removing and reinstalling it's codecs.

Anyway, I was hoping some smart person on here could help so I saved the output from a few files and here it is.
The first is a .avi file where the sound doesn't work, then a .vob file where sound doesn't work and then a .vob file where the sound does work:



/****************************************************************/
File 1: avi with not working sound
/****************************************************************/
MPlayer 1.0rc1-4.1.2 (C) 2000-2006 MPlayer Team
CPU: AMD Athlon(tm) 64 Processor 3500+ (Family: 15, Model: 31, Stepping: 0)
CPUflags: MMX: 1 MMX2: 1 3DNow: 1 3DNow2: 1 SSE: 1 SSE2: 1
Compiled for x86 CPU with extensions: MMX MMX2 3DNow 3DNowEx SSE SSE2

Playing Swordfish.avi.
AVI file format detected.
VIDEO: [DIV3] 640x272 24bpp 23.976 fps 839.9 kbps (102.5 kbyte/s)
Clip info:
Software: Nandub v1.0rc2
Name: Swordfish
Subject: Swordfish
Artist: DOMiNiON
Copyright: Warner Bros.
Comments:
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffdivx] vfm: ffmpeg (FFmpeg DivX ;-) (MS MPEG-4 v3))
==========================================================================
==========================================================================
Opening audio decoder: [mp3lib] MPEG layer-2, layer-3
AUDIO: 48000 Hz, 2 ch, s16le, 128.0 kbit/8.33% (ratio: 16000->192000)
Selected audio codec: [mp3] afm: mp3lib (mp3lib MPEG layer-2, layer-3)
==========================================================================
AO: [oss] 48000Hz 2ch s16le (2 bytes per sample)
Starting playback...
VDec: vo config request - 640 x 272 (preferred colorspace: Planar YV12)
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is undefined - no prescaling applied.
VO: [x11] 640x272 => 640x272 Planar YV12
A: 0.1 V: 0.0 A-V: 0.118 ct: 0.000 1/ 1 ??% ??% ??,?% 0 0
<< Here there was a whole bunch of numbers much alike the line just above >>
Exiting... (Quit)


/****************************************************************/
File 2: .vob that doesn't play sound correctly
/****************************************************************/

MPlayer 1.0rc1-4.1.2 (C) 2000-2006 MPlayer Team
CPU: AMD Athlon(tm) 64 Processor 3500+ (Family: 15, Model: 31, Stepping: 0)
CPUflags: MMX: 1 MMX2: 1 3DNow: 1 3DNow2: 1 SSE: 1 SSE2: 1
Compiled for x86 CPU with extensions: MMX MMX2 3DNow 3DNowEx SSE SSE2

Playing departed.vob.
MPEG-PS file format detected.
VIDEO: MPEG2 720x576 (aspect 3) 25.000 fps 8000.0 kbps (1000.0 kbyte/s)
==========================================================================
Opening video decoder: [mpegpes] MPEG 1/2 Video passthrough
VDec: vo config request - 720 x 576 (preferred colorspace: Mpeg PES)
Could not find matching colorspace - retrying with -vf scale...
Opening video filter: [scale]
VDecoder init failed
Opening video decoder: [libmpeg2] MPEG 1/2 Video decoder libmpeg2-v0.4.0b
Selected video codec: [mpeg12] vfm: libmpeg2 (MPEG-1 or 2 (libmpeg2))
==========================================================================
==========================================================================
Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
ADecoder init failed
Opening audio decoder: [hwac3] AC3/DTS pass-through S/PDIF
hwac3: switched to DTS, 768000 bps, 48000 Hz
AUDIO: 48000 Hz, 2 ch, ac3, 768.0 kbit/50.00% (ratio: 96000->192000)
Selected audio codec: [hwdts] afm: hwac3 (DTS through S/PDIF)
==========================================================================
AO: [oss] 48000Hz 2ch s16le (2 bytes per sample)
Starting playback...
VDec: vo config request - 720 x 576 (preferred colorspace: Planar YV12)
Could not find matching colorspace - retrying with -vf scale...
Opening video filter: [scale]
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is 1.78:1 - prescaling to correct movie aspect.
VO: [gl2] 720x576 => 1024x576 BGR 24-bit [fs]
[gl2] You have OpenGL >= 1.2 capable drivers, GOOD (16bpp and BGR is ok!)
[gl2] antialiasing off
[gl2] bilinear linear
<< Again here was a bunch of numbers similar to the .avi that doesn't play >>
Exiting... (Quit)


/****************************************************************/
File 3: .vob that does play correctly
/****************************************************************/


MPlayer 1.0rc1-4.1.2 (C) 2000-2006 MPlayer Team
CPU: AMD Athlon(tm) 64 Processor 3500+ (Family: 15, Model: 31, Stepping: 0)
CPUflags: MMX: 1 MMX2: 1 3DNow: 1 3DNow2: 1 SSE: 1 SSE2: 1
Compiled for x86 CPU with extensions: MMX MMX2 3DNow 3DNowEx SSE SSE2

Playing butterfly_effect.vob.
MPEG-PS file format detected.
VIDEO: MPEG2 720x576 (aspect 3) 25.000 fps 8930.0 kbps (1116.2 kbyte/s)
==========================================================================
Opening video decoder: [mpegpes] MPEG 1/2 Video passthrough
VDec: vo config request - 720 x 576 (preferred colorspace: Mpeg PES)
Could not find matching colorspace - retrying with -vf scale...
Opening video filter: [scale]
VDecoder init failed
Opening video decoder: [libmpeg2] MPEG 1/2 Video decoder libmpeg2-v0.4.0b
Selected video codec: [mpeg12] vfm: libmpeg2 (MPEG-1 or 2 (libmpeg2))
==========================================================================
==========================================================================
Opening audio decoder: [liba52] AC3 decoding with liba52
AUDIO: 48000 Hz, 2 ch, s16le, 448.0 kbit/29.17% (ratio: 56000->192000)
Selected audio codec: [a52] afm: liba52 (AC3-liba52)
==========================================================================
AO: [oss] 48000Hz 2ch s16le (2 bytes per sample)
Starting playback...
VDec: vo config request - 720 x 576 (preferred colorspace: Planar YV12)
Could not find matching colorspace - retrying with -vf scale...
Opening video filter: [scale]
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is 1.78:1 - prescaling to correct movie aspect.
VO: [gl2] 720x576 => 1024x576 BGR 24-bit [fs]
[gl2] You have OpenGL >= 1.2 capable drivers, GOOD (16bpp and BGR is ok!)
[gl2] antialiasing off
[gl2] bilinear linear
<< Again here there was a bunch of numbers that looked untidy so I removed them from this post >>
Exiting... (Quit)
 
Old 03-05-2007, 07:32 AM   #2
akudewan
Member
 
Registered: Apr 2004
Location: India
Distribution: Ubuntu
Posts: 364

Rep: Reputation: 30
Just a shot in the dark, try using another "ao" device:
Code:
mplayer -ao alsa <filename>
Run "mplayer -ao help" to see a list of all drivers.
 
Old 03-06-2007, 08:22 AM   #3
gavyn
LQ Newbie
 
Registered: Mar 2007
Posts: 8

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by akudewan
Just a shot in the dark, try using another "ao" device:
Code:
mplayer -ao alsa <filename>
Run "mplayer -ao help" to see a list of all drivers.
I gave it a go but no luck, kept getting a message saying something like:
"mpg123: Can't rewind stream by 128 bits! << plus some weird numbers >>"
Any other suggestions?
 
Old 03-06-2007, 01:13 PM   #4
akudewan
Member
 
Registered: Apr 2004
Location: India
Distribution: Ubuntu
Posts: 364

Rep: Reputation: 30
I did a google search, and found some people having a similar problem.

I noted one common factor, the guy who posted in the link above is also using gl2 video output.

So maybe you can try:
Code:
mplayer -ao alsa -vo xv <filename>
or just:
Code:
mplayer -vo xv <filename>
Otherwise you can try the suggestions posted in the link above.
 
Old 03-12-2007, 11:17 AM   #5
Dan Kimberg
LQ Newbie
 
Registered: Mar 2007
Distribution: Fedora, Centos
Posts: 6

Rep: Reputation: 0
mplayer .avi sound problems

gavyn, hi. I saw your message while doing a search to solve a similar problem. It looks like you're using an AMD processor, and so am I. I discovered the hard way that the version of mplayer I have has issues with playing mpeg-based audio streams (mp2/mp3) using the default audio codec, which I believe is mp3lib. If you force it to use ffmpeg, it may solve your problem. I did this by editing my ~/.mplayer/config file and adding the following line:

afm = ffmpeg

Please let me know if this helps any and/or if you find a better solution.

dan
 
Old 03-15-2007, 04:01 AM   #6
gavyn
LQ Newbie
 
Registered: Mar 2007
Posts: 8

Original Poster
Rep: Reputation: 0
Thanks Dan,
You were right and now I can play .avi files! Yay!
 
Old 03-25-2007, 02:21 AM   #7
gavyn
LQ Newbie
 
Registered: Mar 2007
Posts: 8

Original Poster
Rep: Reputation: 0
Another solution!

For anyone who is interested I discovered that if I remove the MPlayer version I downloaded from the official MPlayer homepage and instead use the version available through Ubuntu, MPlayer will work fine.
Otherwise Dan's solution does work and if ffmpeg is slow for you try using libmad:
mplayer File.avi -afm libmad
 
Old 04-01-2007, 10:02 AM   #8
Nemo73
LQ Newbie
 
Registered: Apr 2007
Distribution: Fedora Core 5
Posts: 3

Rep: Reputation: 0
Same problem with Fedora Core 5, but only with avi files with mp3 audio, avi files with AC3 audio working perfectly.
Solved using libmad...
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
mplayer sound problems on slack 10.2 sharathg786 Linux - Software 2 08-27-2006 02:58 AM
mplayer sound problems on slack 10.2 sharathg786 Slackware 7 08-26-2006 05:41 AM
mplayer...divx/avi no sound tjb Fedora 0 01-01-2005 05:29 PM
Sound problems in mplayer kaega2 Linux - Software 2 06-03-2004 02:37 AM
mplayer avi killi Linux - Software 2 06-03-2003 09:47 AM


All times are GMT -5. The time now is 06:59 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration