[MPlayer-users] AC3 encoding on the fly

Floris jkfloris at dds.nl
Wed Jan 28 18:11:34 CET 2009


Is there a way to encode a multi channel wav file to an AC3 stream on 
the fly?

sample multi channel file:
    http://www.halfgaar.net/media/chan-id.zip

I tried the -af lavcac3enc option in mplayer, but I get an error:

    $mplayer chan-id.wav -ao alsa:device=spdif -af lavcac3enc=1
    MPlayer dev-SVN-r26940
    CPU: Intel(R) Pentium(R) 4 CPU 3.60GHz (Family: 15, Model: 4,
Stepping: 3)
    CPUflags:  MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
    Compiled with runtime CPU detection.

    Playing chan-id.wav.
    Audio file file format detected.
    
==========================================================================
    Opening audio decoder: [pcm] Uncompressed PCM audio decoder
    AUDIO: 44100 Hz, 6 ch, s16le, 4233.6 kbit/100.00% (ratio:
529200->529200)
    Selected audio codec: [pcm] afm: pcm (Uncompressed PCM)
    
==========================================================================
    Audio LAVC, couldn't find encoder for codec ac3.
    [libaf] Couldn't create or open audio filter 'lavcac3enc'
    Error at audio filter chain pre-init!

but mplayer -af help will show lavac3enc

...
  extrastereo    : Extra stereo
  lavcac3enc     : runtime encode to ac3 using libavcodec
  lavcresample   : Sample frequency conversion using libavcodec
...


Floris



More information about the MPlayer-users mailing list