Page 1 of 1

Enable/disable video filter in LibVLC

Posted: 07 Apr 2012 15:30
by biga
Hi!

I am trying to enable/disable a video filter with LibVLC during playback. I found a patch on VLC mailing list: http://mailman.videolan.org/pipermail/v ... 83767.html, that extends the API with a libvlc_video_set_filter function. I succesfully applied the patch, and now I can call the function in libVLC, but I have some trouble with it:

If I start vlc by this way: 'sout=#transcode{venc=x264{preset=ultrafast,tune=zerolatency,p=1},fps=15,sfilter=marq{marquee="Remote control"}}:standard{access=http{mime=video/x-flv},mux=ffmpeg{mux=flv},dst=0.0.0.0:2000/stream.flv}}' then after calling the function nothing happens, video filter isn't applied!

When I use only 'vout=dummy' and no transcoding then the function is working.
The input source in both cases: /dev/video0
As I see in the code, the function is calling vout_EnableFilter to turn on a filter. Why isn't it working when transcoding is also used?

Thanks for your answers.

biga

Re: Enable/disable video filter in LibVLC

Posted: 24 Oct 2012 18:33
by Made
Hi,

I have exactly the same problem. I use the libvlc_set_video_filter function but nothing happens. The filter is not applied.

Here is my code:

Code: Select all

libvlc_instance_t * inst; libvlc_media_player_t *mp; libvlc_media_t *media; inst = libvlc_new(0, NULL); media = libvlc_media_new_path (inst, "Wildlife.wmv"); mp = libvlc_media_player_new(inst); libvlc_media_player_set_media(mp, media); libvlc_set_video_filter(mp, "magnify", true); libvlc_media_player_play(mp);
Did someone find a solution for this problem?

Thank you for your answers.

Made

Re: Enable/disable video filter in LibVLC

Posted: 24 Oct 2012 19:16
by Rémi Denis-Courmont
I think the code is broken in LibVLC >= 2.0. A patch would have to be sent to vlc-devel to fix the issue.

Re: Enable/disable video filter in LibVLC

Posted: 25 Oct 2012 17:01
by Made
Thank you.
Do you know which part of the code is broken and do you think there is a lot of work to make the patch works in LibVLC >=2.0?
Doest it seems reasonable to do it in a short time?

Re: Enable/disable video filter in LibVLC

Posted: 25 Oct 2012 17:14
by Rémi Denis-Courmont
I don't know.

Re: Enable/disable video filter in LibVLC

Posted: 25 Oct 2012 20:45
by Maelvon
But if the code is broken in libvlc >= 2.0, for which version of Videolan this patch is made?
In the vlc-1.1 Git branch, the patch cannot be applied, libvlc.sym is not in "lib" but in "src". So it seems this patch is for the vlc-2.0, I suppose.

Re: Enable/disable video filter in LibVLC

Posted: 26 Oct 2012 11:04
by Rémi Denis-Courmont
I never saw the patch you are talking about. I don't understand the question.

Re: Enable/disable video filter in LibVLC

Posted: 26 Oct 2012 11:57
by Maelvon
Hi Rémi,

Thanks for the help.

You're saying that the code is broken for :

Code: Select all

libvlc_media_add_option(m,":video-filter=invert");
with LibVLC >= 2.0. It seems to work with 1.1.9.

I'm talking of the Patch (add a way to enable/disable video effects via libvlc) :

http://trac.videolan.org/vlc/ticket/5603

Which is a Patch to enable/disable videos effects via libvlc, but I've not found a way to make it working!

Perhaps the Patch (ticket/5603) is working in fact, but I don't find the right Git branch to apply it and test it.

Re: Enable/disable video filter in LibVLC

Posted: 26 Oct 2012 12:48
by Rémi Denis-Courmont
VIdeo options cannot be set per input item, since the video output pipeline is scoped to the whole media player instance, rather than one single input item. That is not a bug.

What's a bug is that the existing logo, marquee, etc. LibVLC API reportedly do not work anymore.