[vlc-devel] Ephemeral timeout not working on subpictures

Frederic YHUEL fyhuel at viotech.net
Tue Apr 10 10:43:45 CEST 2012

On Tue, Apr 10, 2012 at 12:57 AM, Peter Tap <ptrtap at yahoo.com> wrote:
> Hello,
> I am trying to implement a watermarking scheme that is not visible to human
> eye. The idea is to display a small subpicture at random location for each
> frame. There are 24 frames per second. Human eye should not catch the
> subpicture if it is displayed only for 1/24th part of a second.
> My computed timeout for each subpicture is CEIL((1 * 1000 * 1000), 24)
> nanoseconds.
> In my video filter, here is the relevant code for subpicture settings:
>     p_spu->i_start = date;
>     p_spu->i_stop  = date + p_sys->i_timeout; // timeout from above
> calculations
>     p_spu->b_ephemer = true; // the subpicture is ephemeral
>     p_spu->b_fade = false; // no fading. Just disappear
> However, when I run vlc, I still see the subpicture appearing momentarily.
> Thinking that my calculation is wrong, I modified the stop time to current
> time + 1 nanosecond.
>     p_spu->i_stop  = date + 1;
> However, that doesn't seem to make any difference. I still see the image
> momentarily on the screen.

Is it possible that you use a really crappy prng? Did you check that
the location actually change each time?

And btw, such a watermarking scheme doesn't seem really robust... I'm
not a specialist, but an attacker could easily remove the watermark,


More information about the vlc-devel mailing list