[MPlayer-dev-eng] [PATCH] encoding audio with libavcodec
Nico
nsabbi at libero.it
Sat Nov 1 14:10:05 CET 2003
Hi,
Daniele Forghieri and I have developed this patch to use Lavc audio
codecs during encoding.
How to use:
mencoder -oac alavc -alavcopts acodec=ac3:abitrate=128:atag=0x2000 ...
where:
-acodec is the name of one of the codecs supported by lavc (same ones as
ffmpeg -formats)
-abitrate is the bitrate in kilobits/second
-atag is the AVI tag to be used in the output file. Since lavc's codecs
are so many (and don't provide a
tag after initialization) you can override the default one (that is 0).
In the case of mp2 and ac3
atag defaults to 0x50 and 0x2000 respectively
The code is disabled is libavcodec sources aren't present in the source
directory.
Encoding was tested with mp2 (successful with -of mpeg, too), ac3 and
several pcm_*, but adpcm_*
never succeded (don't know why).
The source is supposed to have 16 bits per sample; encoding is done in
CBR mode, and seems to work
well even after having applied audio filters and channels modifications.
Shortcomings:
- some initialization parameters (mux_a->wf->nBlockAlign and
mux_a->h.dwSampleSize) seem to
work in a different manner than we two understand, so someone with more
knowledge than us
check them, please.
- if the chosen encoding parameters aren't accepted, the audio encoding
part is skipped, so mplayer can encode
video (if any).
The man patch will follow one of these days.
Thanks to Daniele for his help!
Nico
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: diff4
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20031101/29440926/attachment.txt>
More information about the MPlayer-dev-eng
mailing list