LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   mplayer .avi sound problems (https://www.linuxquestions.org/questions/linux-newbie-8/mplayer-avi-sound-problems-534677/)

gavyn 03-05-2007 03:36 AM

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)

akudewan 03-05-2007 06:32 AM

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.

gavyn 03-06-2007 07:22 AM

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?

akudewan 03-06-2007 12:13 PM

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.

Dan Kimberg 03-12-2007 10:17 AM

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

gavyn 03-15-2007 03:01 AM

Thanks Dan,
You were right and now I can play .avi files! Yay!

gavyn 03-25-2007 01:21 AM

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

Nemo73 04-01-2007 09:02 AM

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


All times are GMT -5. The time now is 03:57 AM.