[MPlayer-dev-eng] How does the OSD(on screen display) layer of MPlayer work?

compn tempn at twmi.rr.com
Wed Sep 5 23:57:22 CEST 2012


On Wed, 5 Sep 2012 22:46:42 +0200, Reimar Döffinger wrote:
>On 5 Sep 2012, at 03:48, "JW" <jw8957 at qq.com> wrote:
>> Recently, I hava some trouble with reading the sourcecode of MPlayer.
>> I want to add personal information to the OSD layer,just like the subtitles,so I shoud have known how the subtitles show up on the OSD layer. 
>
>Use the osd_show_text slave mode command. If that is not good enough, work your way through the code from there.
>I don't think the subtitle code is going to do more than confuse you if you actually want only the OSD part.

if you just want to put your name on the video using subtitle you can
by easily creating a .srt file with the info.

create file test.srt
put this in it:
1
00:00:01,001 --> 24:00:16,530
Your Name Here

now play with mplayer:
mplayer yourfile.avi -sub test.srt

now if you want to move the text you can use the ssa/ass subtitle
styles with the mplayer -ass subtitle option.

there is also a cctv patch to put time + date on videos here:
http://onebithq.com/root/mplayer/cctv
maybe it helps you understand osd code.

-compn


More information about the MPlayer-dev-eng mailing list