Enable/disable video filter in LibVLC

This forum is about all development around libVLC.
biga
Blank Cone
Blank Cone
Posts: 21
Joined: 11 May 2011 10:31

Enable/disable video filter in LibVLC

Postby biga » 07 Apr 2012 15:30

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

Made
New Cone
New Cone
Posts: 2
Joined: 24 Oct 2012 18:17

Re: Enable/disable video filter in LibVLC

Postby Made » 24 Oct 2012 18:33

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

Rémi Denis-Courmont
Developer
Developer
Posts: 15265
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: Enable/disable video filter in LibVLC

Postby Rémi Denis-Courmont » 24 Oct 2012 19:16

I think the code is broken in LibVLC >= 2.0. A patch would have to be sent to vlc-devel to fix the issue.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

Made
New Cone
New Cone
Posts: 2
Joined: 24 Oct 2012 18:17

Re: Enable/disable video filter in LibVLC

Postby Made » 25 Oct 2012 17:01

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?

Rémi Denis-Courmont
Developer
Developer
Posts: 15265
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: Enable/disable video filter in LibVLC

Postby Rémi Denis-Courmont » 25 Oct 2012 17:14

I don't know.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

Maelvon
New Cone
New Cone
Posts: 2
Joined: 25 Oct 2012 20:33

Re: Enable/disable video filter in LibVLC

Postby Maelvon » 25 Oct 2012 20:45

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.

Rémi Denis-Courmont
Developer
Developer
Posts: 15265
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: Enable/disable video filter in LibVLC

Postby Rémi Denis-Courmont » 26 Oct 2012 11:04

I never saw the patch you are talking about. I don't understand the question.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

Maelvon
New Cone
New Cone
Posts: 2
Joined: 25 Oct 2012 20:33

Re: Enable/disable video filter in LibVLC

Postby Maelvon » 26 Oct 2012 11:57

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.

Rémi Denis-Courmont
Developer
Developer
Posts: 15265
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: Enable/disable video filter in LibVLC

Postby Rémi Denis-Courmont » 26 Oct 2012 12:48

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.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded


Return to “Development around libVLC”

Who is online

Users browsing this forum: Bing [Bot] and 10 guests