[MPlayer-dev-eng] Slideshow
D Richard Felker III
dalias at aerifal.cx
Wed Dec 11 21:44:07 CET 2002
On Wed, Dec 11, 2002 at 02:34:49PM -0500, Daniel A. Nagy wrote:
> On Wed, Dec 11, 2002 at 02:37:28AM +0100, Herman Tamas wrote:
>
> > some time it should b a legitim part of mplayer. but it requires
> > more factorization/modularization of the source so 1 can implement
> > such thing a magnitude faster. i'll b happy if can write code such as
> >
> > begin eof? while
> > nextsub subpos@ >frameno seekmovie get-frame
> > decode-frame sub>osd frame2jpeg write-jpg
> > repeat
> >
> > & mplayer would understand it... (ofcoz not that strange naming
> > convention is what im starving 4 ;)
>
> Actually, the solution (the dirty hack, that is) I came up with first was
> not THAT different from the above outlined concept:
>
> First, I exported the subtitles in vobsub format (1), captured the frames at
> timepoints extracted from the .idx file using -vo, -ss and -frames with
> respective parameters (2), then hacked up TOOLS/subrip.c to rid it of the
> character recognition code (3), and to save the appropriate subtitle as an
> image+mask (4). Then I wrote a simple code that sticked the subtitles onto the
> frames (5).
>
> Now this is ugly for the following reasons:
>
> 1: What I really needed here were the timestamps. It'd have been nice to be
> able to export only those.
>
> 2: When exporting a single frame, it seemed impossible to add the subtitle.
> Would it have been possible to end the process at this stage?
>
> 3-4-5: This just stinks. All that information is available to mplayer when
> playing the movie, thus I was effectively replicating already existing
> mplayer functionality. Doing these steps, I actually understood, how mplayer
> did it, and lifted quite a bit of code.
>
> After doing this, I decided to implement the functionality myself (without
> asking how to do it), and hacked up the jpeg driver to export only given
> frames (while playing the whole movie). This way, the subtitles were in
> place. But it's still very ugly. Hence my question to the list.
Hrrm, did you try using vf_expand to render the subtitles?
Rich
More information about the MPlayer-dev-eng
mailing list