[MPlayer-users] Incorrect wav length after dump

AlannY m at alanny.ru
Sat May 16 11:46:58 CEST 2009


On Sat, May 16, 2009 at 10:22:21AM +0200, Reimar Döffinger wrote:
> --ignorelength, you might need SVN oggenc or at least a newer version.
> I only know others have used it successfully as you'll see if you search
> this list.

I have 1.2.0 vorbis-tools in my Gentoo and there are no alternative ;-(
Of cource, I can build oggenc from source, but I don't want ;-)

So, I have solved my problem as follow:

First try was to use pipe and send audio data from mplayer to oggenc
directly. But pipes don't works with mplayer (u no) ;-) So, the only way
to do it is named pipes.

  mkfifo audio.wav
  mplayer -ao pcm:fast:file=audio.wav ... &
  oggenc -o audio.ogg audio.wav

But, after 33 minutes of source mplayer crashes every time. I can
compile mplayer with debug symbols and post backtrace for you, but I want
only to encode audio, not to send bug reports ;-) So, solution with
named pipes is not works for me ;-(

as I have said before, the main problem is with length of wav file. So,
I decide to dump not to wav, but to plain PCM with nowaveheader option.

  mplayer -ao pcm:fast:nowaveheader:file=audio.wav ...

Everything good (?). After that I have encoded it with oggenc.

  oggenc -r -B 16 -C 6 -R 44100 ...

But audio.ogg have only noise. So... there are a *mistake* in mplayer
command.

In my example, mplayer have saved data as is - in 6 channels, resample
to 44100 and (important) with 4 bytes per sample (floatile). After
searching in net, I have found that oggenc cannot deal with 32 bits per
sample (even cannot with 24). So, before oggenc, you must convert format
of sample.

  mplayer -ao pcm:fast:nowaveheader:file=audio.wav -af format=s16le ...

I think s16le is what I want ;-) After that oggenc works well ;-)

The problem is solved. Thanks to everyone ;-)

-- 
   )\._.,--....,'``.
  /,   _.. \   _\  (`._ ,.
 `._.-(,_..'--(,_..'`-.;.' 


More information about the MPlayer-users mailing list