[MPlayer-users] HTTP audio playback problem

Mike Mueller mike at subfocal.net
Thu Nov 6 21:23:14 CET 2008


On Thu, Nov 06, 2008 at 02:46:49PM -0500, Mike Mueller wrote:
> I'm having a problem with MP3 audio being played back at the wrong
> speed.  I'm using the -audiofile option to specify an HTTP MP3 stream,
> like so:
> 
> mplayer -audiofile http://scfire-dtc-aa05.stream.aol.com:80/stream/1018 \
>     somevideo.avi
> 
> It will randomly misidentify the sample rate of the audio stream
> (44.1kHz).  Sometimes it's too fast (48kHz), sometimes too slow (32kHz,
> 24kHz, 8kHz).  Sometimes it's just right.  It's fairly reproducible
> using a little bash script to start mplayer up and kill it every 10
> seconds.  The audio is only played correctly maybe 30% of the time.
> 
> It does NOT happen using an actual mp3 file off disk, it has to be a
> stream.  (My example above is a link to SomaFM's Groove Salad station,
> but it also happens with all of my local Icecast streams.)
> 
> If it matters, the video I'm playing back is an MPEG4 video, recorded
> from an RTSP stream.  The problem also occurs if I point to a live RTSP
> stream for the video portion.
> 
> This is using Fedora 9's version of mplayer:
> 
> $ mplayer -v
> MPlayer dev-SVN-r26936-4.3.0 (C) 2000-2008 MPlayer Team
> CPU: Intel(R) Core(TM)2 Duo CPU     T7700  @ 2.40GHz (Family: 6, Model:
> 15, Stepping: 11)
> CPUFlags:  MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
> Compiled with runtime CPU detection.
> 
> Any thoughts?
> 
> Thanks!

Followup, some extra data:

1. The problem only occurs using an HTTP stream via -audiofile, if you
attempt to play an HTTP stream as the primary input file, it plays fine
every time.

2. I just built MPlayer 1.0rc2 and the problem is present there as well.

Finally, here's some output from MPlayer:

AVI file format detected.
[aviheader] Video stream found, -vid 0
[aviheader] Audio stream found, -aid 1
VIDEO:  [XVID]  704x480  12bpp  20.000 fps  1712.0 kbps (209.0 kbytes/s)
Audio file file format detected.
===========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffodivx] vfm: ffmpeg (FFmpeg MPEG-4)
===========================================================================
===========================================================================
Opening audio decoder: [mp3lib] MPEG layer-2, layer-3
AUDIO: 12000 Hz, 2 ch, s16le, 24.0 kbit/6.25% (ratio: 3000->48000)
Selected audio codec: [mp3] afm: mp3lib (mp3lib MPEG layer-2, layer-3)
===========================================================================
AO: [oss] 12000Hz 2ch s16le (2 bytes per sample)
Starting playback...

In this instance, audio was identified as 12000Hz and played back
basically 3.5x too slowly.

-- 
Mike Mueller
mike at subfocal.net



More information about the MPlayer-users mailing list