[FFmpeg-devel] [PATCH]Basic XSUB encoder

Björn Axelsson gecko
Mon Feb 2 22:00:45 CET 2009


On Sun, 1 Feb 2009, Baptiste Coudurier wrote:

> Hi,
>
> Bj?rn Axelsson wrote:
> > This is a cleanup of a patch submitted earlier by Steve Lhomme / DivX
> > Corp [1].
> >
> > With this command line I can encode an avi with subtitles which displays
> > somewhat correctly on a PS3 and in ffplay:
> > ./ffmpeg -i Starship_Troopers.vob -s 1280x536 -vtag DX50 -vcodec mpeg4 -an
> > -scodec xsub -y test.avi
> >
>  > [...]
> >
> > +
> > +static void xsub_encode_rle(uint8_t **pq,
> > +                            const uint8_t *bitmap, int linesize,
> > +                            int w, int h)
>
> FFmpeg has a rle encoder in rle.c, can it be used ?

I don't think so. The xsub rle format is quite different.

[...]

> > +    avctx->width = 720;
> > +    avctx->height = 576;
>
> Shouldn't it be video stream values ?

Possibly, though in some samples it differs from the video stream. The
decoders I have access to (PS3, ffplay) ignore this value so I'll just
leave the default 0 values in the next patch.

-- 
Bj?rn Axelsson



More information about the ffmpeg-devel mailing list