[MPlayer-advusers] Option -endpos fails with stream sources

Maik Musall lists at musall.de
Fri Dec 14 16:02:55 CET 2007


Hello,

I'm new to this list and joined since I cannot find out the source of
the following problem. I already searched extensively through the list
archives and other sources and tried mplayer versions up to
1.0_rc2_p24929 without success (on Gentoo Linux).

I want to decode an audio stream and write it to a file. Nothing magic.

This works:
mplayer -vc null -vo null -ao pcm:file=file.wav http://sky:28401

This doesn't:
mplayer -vc null -vo null -ao pcm:file=file.wav -endpos 10 http://sky:28401

(sky is my local streaming server.) While the first runs and writes
file.wav until I manually quit mplayer (or the stream finishes), the
second always looks like this:

************ snip
radio at einstein ~ $ mplayer -vc null -vo null -ao pcm:file=file.wav -endpos 10 http://sky:28401
MPlayer dev-SVN-rUNKNOWN-4.1.2 (C) 2000-2007 MPlayer Team
CPU: Intel Celeron 2/Pentium III Coppermine,Geyserville (Family: 6,
Model: 8, Stepping: 6)
CPUflags:  MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 0
Compiled for x86 CPU with extensions: MMX MMX2 SSE

Playing http://sky:28401.
Resolving sky for AF_INET...
Connecting to server sky[192.168.20.44]: 28401...
Cache size set to 320 KBytes
Cache fill: 12.50% (40960 bytes)
Win32 LoadLibrary failed to load: avisynth.dll, /usr/lib/win32/avisynth.dll, /usr/local/lib/win32/avisynth.dll
TS file format detected.
NO VIDEO! AUDIO MPA(pid=111) NO SUBS (yet)!  PROGRAM N. 28401
Stream not seekable!
==========================================================================
Opening audio decoder: [mp3lib] MPEG layer-2, layer-3
AUDIO: 48000 Hz, 2 ch, s16le, 320.0 kbit/20.83% (ratio: 40000->192000)
Selected audio codec: [mp3] afm: mp3lib (mp3lib MPEG layer-2, layer-3)
==========================================================================
[AO PCM] File: file.wav (WAVE)
PCM: Samplerate: 48000Hz Channels: Stereo Format s16le
[AO PCM] Info: Faster dumping is achieved with -vc null -vo null -ao pcm:fast
[AO PCM] Info: To write WAVE files use -ao pcm:waveheader (default).
AO: [pcm] 48000Hz 2ch s16le (2 bytes per sample)
Video: no video
Starting playback...
A:85962.7 (23:52:42.7) of -0.3 (unknown) ??,?% 0%

Exiting... (End of file)
radio at einstein ~ $ ls -l file.wav
-rw-r--r-- 1 radio audio  65580 2007-12-13 17:01 file.wav
************ snap

It doesn't matter if you specify 10 seconds or an hour (01:00:00) with
-endpos, same result each time.

I'd simply like mplayer to decode the stream and write the file for a
defined time period, and then exit.

Thanks for any help!

Maik



More information about the MPlayer-advusers mailing list