[MEncoder-users] The subtitles left ghost shadow

James Hastings-Trew jimht at shaw.ca
Wed Feb 4 01:17:11 CET 2009


Dong Ge wrote:
> Hi! All,
> I use the below script to encode a video for my palm treo 650 (it have
> a 320×320 pixels screen). Everything is OK, except the subtitles'
> ghost shadow problem.
>
> The cellphone's screen is very small. If let subtitles overlap the
> movie, for keeping the text clear to easy reading, the text must be
> enough big and the movie will be almost unvisable at sometime.
> Fortunately, most movie's aspect ratio is not one, yes, it's
> rectangle. If I zoom out the movie for my palm and maintain the
> orginal movie aspect ratio (most rectangle), many area of the small
> screen will be waste and the result movie will be show with two black
> band.
>
> For utilizing the black band, I expand the result movie downword and
> get a empty area with 80 pixels height. When I overlap the subtitles
> on the expanded band, the first text can be showed normally. But when
> the second text appear, the problem is coming: the first text do not
> vanished like normally. When the third text and subsequent text
> appear, all the previous subtitles be showed still. Finally, the only
> thing I can see is text's blur ghost shadow.
>
> But when I overlap the subtitles and movie, not expanded band,
> everythins is OK, the text's ghost shadow is vanished.
>
> Why?
>
> mencoder.exe -ovc lavc -lavcopts vcodec=mpeg4:mbd=1:vbitrate=250 -oac
> mp3lame -o "D:\movie\output.palm.avi" "D:\movie\input.avi" -subfont
> "fonts\STZHONGS.TTF" -sub "D:\movie\newsub.srt" -subwidth 100 -subcp
> cp936 -subfont-text-scale 4 -subalign 2 -subpos 100 -vf
> scale=320:134,expand=:-120::0:: lame vol=10
>
> Tons of thanks in advance!
>   
The trick is to add another scale filter after the expand filter. That 
will make the expanded area "real" and the subtitles will come and go 
normally on the expanded area.

-vf scale=320:134,expand=0:-186:0:0,scale=320:320,harddup

That should push the 320x134 movie to the top of the 320x320 area with room under for your subtitles.







More information about the MEncoder-users mailing list