[vlc] Re: [Partial patch] vlc and xvid encoding
Bernhard Rosenkraenzer
bero at arklinux.org
Sun Nov 28 12:13:54 CET 2004
On Sunday 28 November 2004 10:45, Sigmund Augdal wrote:
> VLC's avi muxer is broken, and nobody wants to fix it, since avi apperantly
> is a horrible format.
It is -- unfortunately it's also the most common one out there.
> Most probably. If you can write a encoder module for vlc, you can probably
> search through the ogg muxer for the fourcc as well?
Sure, already done in my local tree (will post the patch when I've verified it
actually works).
I've found a new problem though -- at least if my reading of the code is
correct, even if xvid support is present in ffmpeg it's never actually used
by vlc.
vlc determines which ffmpeg encoder to use by running GetFfmpegCodec
[modules/codec/ffmpeg/encoder.c:172]; GetFfmpegCodec gets the codec ID from
codecs_table[] (modules/codec/ffmpeg/ffmpeg.c:401), which in turn hardcodes
CODEC_ID_MPEG4 for the xvid fourcc.
Changing this to CODEC_ID_XVID would break systems where ffmpeg is compiled
without xvid support; also it would use CODEC_ID_XVID for decoding rather
than just encoding (and ffmpeg generally seems to give better results as a
decoder).
Unless I'm overlooking something, the only clean fix would be adding a
configure check for xvid support in ffmpeg (which would break for
crosscompiles because it can't be found out without AC_TRY_RUN) and splitting
i_codec in codecs_table[] into i_codec_encoder and i_codec_decoder...
Or better yet, get the ffmpeg guys to add an
avcodec_find_{en,de}coder_by_fourcc.
> Probably a real easy
> fix. If this makes your xvid module useable I guess we should consider
> including it as a light weight alternative to ffmpeg.
Doesn't work ATM even with the fourcc additions, but I tend to think I'm just
overlooking something small.
LLaP
bero
--
This is the vlc mailing-list, see http://www.videolan.org/vlc/
To unsubscribe, please read http://www.videolan.org/support/lists.html
More information about the vlc
mailing list