[MPlayer-dev-eng] [PATCH] -vobsub support for mencoder
Diego Biurrun
diego at biurrun.de
Thu Feb 11 23:34:08 CET 2010
On Thu, Feb 11, 2010 at 09:11:59PM +0100, Grigori Goronzy wrote:
> On 02/11/2010 03:26 AM, compn wrote:
> > On Wed, 10 Feb 2010 19:35:29 -0500, Eric Appleman wrote:
> >> Speaking of implementing vobsub in mencoder, was ass ever implemented in
> >> the svn?
>
> Due to popular demand, here is a cleaned up version of the ASS/SSA for
> mencoder patch. I removed the -keep-pts feature (not very useful because
> it's broken) and reindented vf_fixpts' source code.
>
> Subtitle timing is still off by a single frame sometimes as the
> timestamps calculated by fixpts are not completely accurate.
>
> --- a/DOCS/man/en/mplayer.1
> +++ b/DOCS/man/en/mplayer.1
> @@ -7494,6 +7494,48 @@ Larger radius makes for smoother gradients, but also prevents the filter
> .
> +.TP
> +.B fixpts[=options]
> +Fixes the presentation timestamps (PTS) of the frames.
Here and below: I think pts is always spelled with lowercase.
> --- /dev/null
> +++ b/libmpcodecs/vf_fixpts.c
> @@ -0,0 +1,137 @@
> +/*
> + Copyright (C) 2007 Nicolas George <nicolas.george at normalesup.org>
> +
> + This program is free software; you can redistribute it and/or modify
> + it under the terms of the GNU General Public License as published by
> + the Free Software Foundation; either version 2 of the License, or
> + (at your option) any later version.
> +
> + This program is distributed in the hope that it will be useful,
> + but WITHOUT ANY WARRANTY; without even the implied warranty of
> + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
> + GNU General Public License for more details.
> +
> + You should have received a copy of the GNU General Public License
> + along with this program; if not, write to the Free Software
> + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Please use our standard license header.
> +static int put_image(vf_instance_t *vf, mp_image_t *src, double pts)
> +{
> + struct vf_priv_s *p = vf->priv;
> +
> + if (p->print) {
> + if (pts == MP_NOPTS_VALUE)
> + printf("PTS: undef\n");
> + else
> + printf("PTS: %f\n", pts);
No printf please, use mp_msg.
> + } else if (pts != MP_NOPTS_VALUE && p->autostep > 0) {
> + p->step = pts - p->current;
> + p->current = pts;
> + p->autostep--;
> + p->have_step = 1;
extra good karma for vertical alignment
> + while (*args != 0) {
while (*args)
> + vf->put_image = put_image;
> + vf->uninit = uninit;
> + vf->priv = p = malloc(sizeof(struct vf_priv_s));
more karma opportunities :)
Diego
More information about the MPlayer-dev-eng
mailing list