[MPlayer-dev-eng] Custom subtitle output

Gast mphq at ext.no-route.org
Mon Sep 28 13:07:56 CEST 2009


Reimar Döffinger schrieb:
> On Mon, Sep 28, 2009 at 10:09:37AM +0200, Gast wrote:
>> Gast schrieb:
>>> Reimar Döffinger schrieb:

>>>> On Mon, Sep 28, 2009 at 06:36:03AM +0200, Gast wrote:

>>>>> I would like to ask if it is possible to show the subtitles
>>>>> on stdout instead drawing them on the OSD. I'd like to
>>>>> use an external liquid crystal display (LCD) to display
>>>>> my subtitles (of course using a file descriptor or direct
>>>>> access to serial port), but the current vo_* seems not
>>>>> to be the right place to do subtitle processing for me.

>>>> For text subtitles: look at mplayer.c:set_osd_subtitle.
>>>> For bitmap subtitles and pre-rendered text: any video filter
>>>> can intercept them, like vf_expand does (or vf_ass for the
>>>> ass subs).

>>> Thank you very much. I'll just get the latest snapshot of
>>> mplayer and try it out. Seems like there is no set_osd_subtitle()
>>> in the mplayer shipped with Ubuntu 8.04.

>> Got the latest snapshot of mplayer. It seems like set_osd_subtitle()
>> is not called for rendering the text if using vo_x11, vo_xv or vo_sdl.

> Ups. Yes, I forgot something. It will only work for embedded subs
> currently.

Hm, I've tryed it with embedded Subtitles. I've embedded the Subtitles
using:
mencoder -slang eng -of lavf -lavfopts format=mp4 -oac lavc -ovc lavc -lavcopts
aglobal=1:vglobal=1:acodec=libfaac:vcodec=mpeg4:abitrate=128:vbitrate=1200:keyint=250:mbd=1:vqmax=10:lmax=10 

-vf harddup -sub /tmp/test.sub test.mpg -o test_with_subs.mp4

Subtitles are showing up correctly, but there is no indication that
set_osd_subtitle() is used. I'd check out the source code if mplayer wouldn't
be such a big project. It's pretty hard to find out what's actually going on
without having any idea what's going on internally in mplayer and how the
structure is.




More information about the MPlayer-dev-eng mailing list