[MEncoder-users] subtitles expand problem

jsuzuki at free.fr jsuzuki at free.fr
Wed Jan 5 14:00:08 CET 2005


Quoting Phil Oleynik <Phil.Oleynik at mail.ioffe.ru>:

> jsuzuki at free.fr wrote:
>
> >Sorry, I sent the following messages to the mplayer list, but here is more
> >appropriate:
> >
> >---
> >>From a DVD to a divx using the latest mencoder, I achieved placing the
> subtitles
> >in a black region below the picture using the -vf expand and -subalign 2
> >options.
> >The only problem is that subtitles "stick": that is the previous subtitle is
> not
> >erased when the new one comes up, which is especiallay annoying when a 2
> line
> >subtitle is followed by a 1 line one.
> >Is there an option I forgot?
> >Thank you very much for your help,
> >---
> >* JustFillBug replied:
> >Yes, I had the same problem. Apparently with -vf expand=xxx:xxx::0
> >instead of expand=xxx:xxx:::1 fixed the problem. The setting seems
> >against the manpage but what do I know?
> >---
> >* to which I replied:
> >I found a way to make it work using the undocumented -nooverlapsub and
> >expand=xxx:xxx::0 but without cropping or scaling the movie.
> >If cropping qnd scaling is involved, it fails in both cases. My relevant
> options
> >are:
> >
> >-vf crop=704:544:8:16,scale,expand=0:-50:0:0:1 -zoom -xy 640 -nooverlapsub
> >-spualign 2
> >
> >Anything I can do to help debug the problem (I'd really enjoy that feature)?
> >
> >John
> >
> >PS: I am looking at the code in vf_expand.c, as I suppose it is where the
> >problem lies...
> >
> Hello!

Hello!

> First, I should notice that "-xy ###" usually works only with overlay
> while playing.
> For software resize (if you are do not live-encoding aware) use this option.
> -vf scale[=w:h[:interlaced[:chr_drop[:param[:param2[:presize]]]]]]
> See docs for how it works, there is about a kilobyte of text, I cannot
> put it here...
> You were advised to use scale, as I see, without params - it works when
> playing, but I doubt it works on recoding.

It encodes just fine, including subtitles, but without expanding. The problem
arises only when I add that black stripe and attempt to encode the subtitles in
it.

> "expand=0:-50:0:0:1" - it will add black stripe down, and that area may be
> not cleared! Try to compress without black stripe. Maybe, it will look good.
> Do not forget about sub-bg-alpha option.
>
> But my own advise - DO NOT hardsub movie, use matroska container
> (http://www.bunkus.org/videotools/mkvtoolnix/)if you REALLY need UTF-8
> subtitles.

That is not an option for me, since the target device is a DIVX/DVD stand-alone
player which does not support matroska and text subtitles.

> Subs take a pretty large amount of bitrate, you will lose in size greatly.
> If you wish to add 7-bit subs, you may use OGM container
> (http://www.bunkus.org/videotools/ogmtools/)
> Again, if resulting video is not for VHS recording - do not hardsub.
>
> If nothing works - try at first reencode to chosen size, e.g. bitrate 3000,
> and then encode with titles rendering

I think that feature should work (it almost does), at least according to the
manual... I'll try looking in vf_expand.c, but if somebody could help, I would
appreciate it.


Thanks!


John




More information about the MEncoder-users mailing list