Page 1 of 2

Setting options for VLC ActiveX Plugin

Posted: 02 Oct 2013 16:33
by jerry20
Hi

I was able to use the vlc activex plugin (version 1 and 2) in a c#.net application to display videos. It runs nicely, but I can't set any options.

Here's the code:

string options = "--brightness=2"; // I also tried ":brightness"
axVLCPlugin1.addTarget("file:///"+ filePath1, options, AXVLC.VLCPlaylistMode.VLCPlayListReplaceAndGo, 0);
axVLCPlugin1.play();

This is for version 1. Version 2 gives the same results. The "options" do not have any effect on the displayed video.

The documentation says that most command line options will work, but I can't get any to work.

Thanks

Re: Setting options for VLC ActiveX Plugin

Posted: 08 Oct 2013 20:30
by jerry20
Are there any command line options working for the plugin?
Thanks

Re: Setting options for VLC ActiveX Plugin

Posted: 11 Oct 2013 17:26
by jerry20
I would appreciate if someone gave me any hint to start searching for.
Or even mention that it's not possible.
Thanks

Re: Setting options for VLC ActiveX Plugin

Posted: 12 Oct 2013 04:51
by RSATom
to change brightness "adjust" module should be enabled, but it's impossible at vlc activex for now.

Re: Setting options for VLC ActiveX Plugin

Posted: 12 Oct 2013 22:16
by jerry20
Thank you.
Is there anything that can be done about that?
Any other way?

Re: Setting options for VLC ActiveX Plugin

Posted: 14 Oct 2013 04:33
by RSATom
You can write some patch to web plugins, or use another libvlc wrapper lib

Re: Setting options for VLC ActiveX Plugin

Posted: 14 Oct 2013 17:25
by jerry20
Thank you very much for your reply.

I am newbie in this subject.
Would you please give me suggestions to learn more about writing a patch, or about a good libvlc wrapper for use with c#.net?
Thanks

Re: Setting options for VLC ActiveX Plugin

Posted: 15 Oct 2013 04:58
by RSATom
if you don't know c/c++ - making patch can be not simple for you.
as for wrapper - I can't do any suggestions - try to googling...

Re: Setting options for VLC ActiveX Plugin

Posted: 15 Oct 2013 14:03
by jerry20
Thanks for your reply.

I know c and c++. I meant I am newbie at dealing with the vlc activex.
Would you please give me a hint about how to start patching it?
Thanks

Re: Setting options for VLC ActiveX Plugin

Posted: 15 Oct 2013 14:56
by RSATom
sources:
http://git.videolan.org/?p=npapi-vlc.git;a=summary

you should add "--video-filter=adjust" to that array:
http://git.videolan.org/?p=npapi-vlc.gi ... =HEAD#l464

build instructions:
https://wiki.videolan.org/Win32Compile/

Btw, I will be very appreciate if you try to use FBVLC with C#. Originally it's designed for web browsers, but maybe it will work as regular ActiveX too... It's have almost the same API as original web plugins (and has fixed support of adjust/logo/marquee), so migrate should be very easy. But I can't promise it will work in such way.

Re: Setting options for VLC ActiveX Plugin

Posted: 15 Oct 2013 23:17
by jerry20
Thank you very much for your reply.

I added FBVLC plugin to the toolbox in visual studio, but when I tried to add it to a c# windows form I got this error:
http://i.imgur.com/PRatd1N.jpg
I also tried different versions of FBVLC but I got the same error.
I googled the error but couldn't find anything useful.

Thanks

Re: Setting options for VLC ActiveX Plugin

Posted: 16 Oct 2013 04:09
by RSATom
Thanks, it seems it not so easy...

Re: Setting options for VLC ActiveX Plugin

Posted: 26 Oct 2013 02:24
by jerry20
After so many trials, I downloaded Ubuntu and installed it in virtualbox.
I managed to complete the steps explained here: https://wiki.videolan.org/Win32Compile/

But I couldn't find "plugin.cpp". Would you please tell me how to do this step:
you should add "--video-filter=adjust" to that array:
http://git.videolan.org/?p=npapi-vlc.gi ... =HEAD#l464
and where do I find the resulting file after make?

Thanks

Re: Setting options for VLC ActiveX Plugin

Posted: 26 Oct 2013 05:39
by RSATom
try to looking for npapi-vlc\activex at vlc build tree

Re: Setting options for VLC ActiveX Plugin

Posted: 26 Oct 2013 17:30
by jerry20
I cloned the git then followed instructions in readme to configure and make.
Then I found a folder VS2008 and built it with visual studio, got the axvlc.dll, placed it in vlc folder (and renamed the older one) then used "-brightness=2" as options.
But still nothing, no effect on brightness :(

I edited plugin.cpp as follows before building in visual studio:
static const char * const ppsz_argv[] = {
"-vv",
"--no-stats",
"--intf=dummy",
"--no-video-title-show",
"--video-filter=adjust"
};
Am I doing something wrong?

Re: Setting options for VLC ActiveX Plugin

Posted: 26 Oct 2013 18:01
by jerry20
I tried adding "--brightness=2" to the array (ppsz_argv[]) and built it, and it worked with max brightness.
But I can't use this option from the function in c#:
axVLCPlugin2.playlist.add(uri, "", "--brightness=2");

What could be wrong?

Re: Setting options for VLC ActiveX Plugin

Posted: 27 Oct 2013 04:04
by RSATom
you can try one of following:
1) to use ":brightness=2"

2) at the http://git.videolan.org/?p=npapi-vlc.gi ... =HEAD#l105 replace
libvlc_media_option_unique
with
libvlc_media_option_unique | libvlc_media_option_trusted
But keep in mind, this will have security issues.

3) add to activex some function which will call
libvlc_video_set_adjust_float( , libvlc_adjust_Brightness, );

But I don't sure 1), 2) will work either. 3) will work, but it will be complicated solution. I use it in FBVLC:
https://code.google.com/p/fbvlc/source/ ... lc_video.h
https://code.google.com/p/fbvlc/source/ ... _video.cpp

Re: Setting options for VLC ActiveX Plugin

Posted: 27 Oct 2013 22:35
by jerry20
Thanks for your reply.
I tried 1) and 2) but they didn't work.
I'll try to get 3) to work.
I implemented put_brightness(float ...) like put_crop using libvlc_video_set_adjust_float. But I'm still having some problems. I think the axinterop needs to be recreated, but I get errors doing so, probably due to problems in compiling the axvlc.dll.

Re: Setting options for VLC ActiveX Plugin

Posted: 28 Oct 2013 04:02
by RSATom
I'm curious, how you did working activex with C#? I've tried the same, but with no luck.

Re: Setting options for VLC ActiveX Plugin

Posted: 28 Oct 2013 10:29
by jerry20
I use Visual Studio 2010. VLC need to be installed on the machine (and activex enabled during setup).
Here are the steps:
1. In Visual studio create Visual c#.net Windows Forms Application project.
2. In the Toolbox, right click and select "Choose Items"
3. Select "COM Components" Tab
4. Scroll down to "VLC ActiveX Plugin and IE Web Plugin v2" and check the checkbox infront of it and click OK. (http://i.imgur.com/PVDaA3k.jpg)
Then you will have "VLC ActiveX Plugin and IE Web Plugin v2" in the Toolbox under "General", with the VLC icon.
5. Drag and drop this control to the winform. This will automatically add AxAXVLC and AXVLC references to the project. These are the Interop dll's that will make using the activex possible (AxInterop.AXVLC.dll & Interop.AXVLC.dll). They are generated automatically.
6. The new control will have the name "axVLCPlugin21"
You can use this to run video:
axVLCPlugin21.playlist.add(uri, "", null); // instead of null, should be options string array
axVLCPlugin21.playlist.play();
7. If you distribute the project, the two interop dll's need to be with the exe file.

Re: Setting options for VLC ActiveX Plugin

Posted: 28 Oct 2013 11:00
by RSATom
I use Visual Studio 2010. VLC need to be installed on the machine (and activex enabled during setup).
hm... I did the same steps, but with Visual Studio 2008, and got exception... It seems I should try VS 2010/12/13...
Anyway, thanks for info - it's very helpfull.

Re: Setting options for VLC ActiveX Plugin

Posted: 28 Oct 2013 11:05
by jerry20
You're welcome.
But which exception did you get? and in which step?

Re: Setting options for VLC ActiveX Plugin

Posted: 28 Oct 2013 11:40
by jerry20
Here's a sample project for testing:
http://www.mediafire.com/download/mbsd4 ... C_Test.rar

Using VS 2010, .Net 4, Vlc 2.1 32 bits.
I don't know if it works on 2008 or not.

Re: Setting options for VLC ActiveX Plugin

Posted: 28 Oct 2013 13:40
by RSATom
I got following when place control on form:

Image

Re: Setting options for VLC ActiveX Plugin

Posted: 28 Oct 2013 15:28
by jerry20
I don't know. This is strange.
At this point the file axvlc.dll is accessed and used to create the interop dll's.
Maybe if you try to reinstall VLC and then add it again to the toolbox it would work.
Otherwise, it may require VS 2010.