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

jw8957 jw8957 at qq.com
Thu Sep 6 13:16:03 CEST 2012


Thanks you.
Your idea is clever , and the website is brilliant  too.
My aim is to decode from a TS stream and extract the information the stream took ,then display them on the screen . So not only the strings, but also some flags, such triangles and rectangles may be displayed. And the way of creating the .srt file is not suitable.





jw8957

From: compn
Date: 2012-09-06 05:57
To: mplayer-dev-eng
Subject: Re: [MPlayer-dev-eng] How does the OSD(on screen display) layer of MPlayer work?
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