[MPlayer-dev-eng] [PATCH] vf_delogo: variable rectangle

Reimar Döffinger Reimar.Doeffinger at gmx.de
Thu Feb 3 21:10:11 CET 2011


On Thu, Feb 03, 2011 at 10:29:15AM +0100, Nicolas George wrote:
> Le quartidi 14 pluviôse, an CCXIX, Reimar Döffinger a écrit :
> > Adding a dependency on the subreader isn't that great
> 
> Inside mplayer, the subreader is included inconditionnally. I suppose you
> are thinking about the effort to make mpcodecs a stand-alone library?

No I am thinking more about making it not harder to use from the
libavfilter than it already is.

> >							and the pts
> > you have in the video filter is not at all realiable.
> 
> Are you sure about that? I think I read exactly the opposite. In particular,
> I believe that ASS chose to use it because it was deemed _more_ reliable
> than the global PTS, especially if there are framerate-modifying filters.

Just that there are even less realiable ways doesn't meant it is reliable.
To my knowledge the time stamps used here do reset and wrap-around, and the
subtitle code does not really work well for that.
Which is why I suggested frame numbers, that is easy to make switch
the location at exactly the desired time, however it does not work
together with seeking.


> > I consider it likely that a custom format using frame numbers
> > would work better in several aspects and probably even need less
> > code.
> 
> I really do not like the idea of a custom format: not only does it make new
> code, and therefore new bugs,

The reason for the suggestion is that it should be less new code than
(mis-)using the subreader.
Though there's even the question if there's a need to use a file or if
it couldn't just be passed as filter argument.

> but also it prevents the users from using
> existing tools to manipulate the script. There are a lot of editors for text
> subtitles, there would not be for a custom format.

For most formats those tools are unlikely to match with MPlayer in a frame-exact way.

> If we want to avoid depending from the subreader in the video filters, I can
> see another, more generic solution:
> 
> - make vf_delogo accept a control message to change the rectangle;
> 
> - add the corresponding slave command;

If anything it should be a generic command to change the filter arguments,
as implement for audio filters.

> - create a system for time-based scripted slave commands.
> 
> This is more work, but I think it may be worth it. What do you think about
> it?

It also won't work with mencoder, and I have some doubts about the
time-based stuff, MPlayer does not have a time-base that will make
everyone happy.


More information about the MPlayer-dev-eng mailing list