Setting options for VLC ActiveX Plugin

All you've ever wanted to know about the ActiveX, Mozilla plugins, the web interface and various PHP extensions
jerry20
Blank Cone
Blank Cone
Posts: 31
Joined: 02 Oct 2013 16:30

Setting options for VLC ActiveX Plugin

Postby jerry20 » 02 Oct 2013 16:33

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

jerry20
Blank Cone
Blank Cone
Posts: 31
Joined: 02 Oct 2013 16:30

Re: Setting options for VLC ActiveX Plugin

Postby jerry20 » 08 Oct 2013 20:30

Are there any command line options working for the plugin?
Thanks

jerry20
Blank Cone
Blank Cone
Posts: 31
Joined: 02 Oct 2013 16:30

Re: Setting options for VLC ActiveX Plugin

Postby jerry20 » 11 Oct 2013 17:26

I would appreciate if someone gave me any hint to start searching for.
Or even mention that it's not possible.
Thanks

RSATom
Big Cone-huna
Big Cone-huna
Posts: 513
Joined: 24 Nov 2011 06:55
Operating System: Windows/Linux/OsX
Location: Russia, Tomsk

Re: Setting options for VLC ActiveX Plugin

Postby RSATom » 12 Oct 2013 04:51

to change brightness "adjust" module should be enabled, but it's impossible at vlc activex for now.

jerry20
Blank Cone
Blank Cone
Posts: 31
Joined: 02 Oct 2013 16:30

Re: Setting options for VLC ActiveX Plugin

Postby jerry20 » 12 Oct 2013 22:16

Thank you.
Is there anything that can be done about that?
Any other way?

RSATom
Big Cone-huna
Big Cone-huna
Posts: 513
Joined: 24 Nov 2011 06:55
Operating System: Windows/Linux/OsX
Location: Russia, Tomsk

Re: Setting options for VLC ActiveX Plugin

Postby RSATom » 14 Oct 2013 04:33

You can write some patch to web plugins, or use another libvlc wrapper lib

jerry20
Blank Cone
Blank Cone
Posts: 31
Joined: 02 Oct 2013 16:30

Re: Setting options for VLC ActiveX Plugin

Postby jerry20 » 14 Oct 2013 17:25

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

RSATom
Big Cone-huna
Big Cone-huna
Posts: 513
Joined: 24 Nov 2011 06:55
Operating System: Windows/Linux/OsX
Location: Russia, Tomsk

Re: Setting options for VLC ActiveX Plugin

Postby RSATom » 15 Oct 2013 04:58

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...

jerry20
Blank Cone
Blank Cone
Posts: 31
Joined: 02 Oct 2013 16:30

Re: Setting options for VLC ActiveX Plugin

Postby jerry20 » 15 Oct 2013 14:03

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

RSATom
Big Cone-huna
Big Cone-huna
Posts: 513
Joined: 24 Nov 2011 06:55
Operating System: Windows/Linux/OsX
Location: Russia, Tomsk

Re: Setting options for VLC ActiveX Plugin

Postby RSATom » 15 Oct 2013 14:56

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.

jerry20
Blank Cone
Blank Cone
Posts: 31
Joined: 02 Oct 2013 16:30

Re: Setting options for VLC ActiveX Plugin

Postby jerry20 » 15 Oct 2013 23:17

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

RSATom
Big Cone-huna
Big Cone-huna
Posts: 513
Joined: 24 Nov 2011 06:55
Operating System: Windows/Linux/OsX
Location: Russia, Tomsk

Re: Setting options for VLC ActiveX Plugin

Postby RSATom » 16 Oct 2013 04:09

Thanks, it seems it not so easy...

jerry20
Blank Cone
Blank Cone
Posts: 31
Joined: 02 Oct 2013 16:30

Re: Setting options for VLC ActiveX Plugin

Postby jerry20 » 26 Oct 2013 02:24

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

RSATom
Big Cone-huna
Big Cone-huna
Posts: 513
Joined: 24 Nov 2011 06:55
Operating System: Windows/Linux/OsX
Location: Russia, Tomsk

Re: Setting options for VLC ActiveX Plugin

Postby RSATom » 26 Oct 2013 05:39

try to looking for npapi-vlc\activex at vlc build tree

jerry20
Blank Cone
Blank Cone
Posts: 31
Joined: 02 Oct 2013 16:30

Re: Setting options for VLC ActiveX Plugin

Postby jerry20 » 26 Oct 2013 17:30

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?

jerry20
Blank Cone
Blank Cone
Posts: 31
Joined: 02 Oct 2013 16:30

Re: Setting options for VLC ActiveX Plugin

Postby jerry20 » 26 Oct 2013 18:01

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?

RSATom
Big Cone-huna
Big Cone-huna
Posts: 513
Joined: 24 Nov 2011 06:55
Operating System: Windows/Linux/OsX
Location: Russia, Tomsk

Re: Setting options for VLC ActiveX Plugin

Postby RSATom » 27 Oct 2013 04:04

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

jerry20
Blank Cone
Blank Cone
Posts: 31
Joined: 02 Oct 2013 16:30

Re: Setting options for VLC ActiveX Plugin

Postby jerry20 » 27 Oct 2013 22:35

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.

RSATom
Big Cone-huna
Big Cone-huna
Posts: 513
Joined: 24 Nov 2011 06:55
Operating System: Windows/Linux/OsX
Location: Russia, Tomsk

Re: Setting options for VLC ActiveX Plugin

Postby RSATom » 28 Oct 2013 04:02

I'm curious, how you did working activex with C#? I've tried the same, but with no luck.

jerry20
Blank Cone
Blank Cone
Posts: 31
Joined: 02 Oct 2013 16:30

Re: Setting options for VLC ActiveX Plugin

Postby jerry20 » 28 Oct 2013 10:29

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.

RSATom
Big Cone-huna
Big Cone-huna
Posts: 513
Joined: 24 Nov 2011 06:55
Operating System: Windows/Linux/OsX
Location: Russia, Tomsk

Re: Setting options for VLC ActiveX Plugin

Postby RSATom » 28 Oct 2013 11:00

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.
Last edited by RSATom on 28 Oct 2013 13:15, edited 1 time in total.

jerry20
Blank Cone
Blank Cone
Posts: 31
Joined: 02 Oct 2013 16:30

Re: Setting options for VLC ActiveX Plugin

Postby jerry20 » 28 Oct 2013 11:05

You're welcome.
But which exception did you get? and in which step?

jerry20
Blank Cone
Blank Cone
Posts: 31
Joined: 02 Oct 2013 16:30

Re: Setting options for VLC ActiveX Plugin

Postby jerry20 » 28 Oct 2013 11:40

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.

RSATom
Big Cone-huna
Big Cone-huna
Posts: 513
Joined: 24 Nov 2011 06:55
Operating System: Windows/Linux/OsX
Location: Russia, Tomsk

Re: Setting options for VLC ActiveX Plugin

Postby RSATom » 28 Oct 2013 13:40

I got following when place control on form:

Image

jerry20
Blank Cone
Blank Cone
Posts: 31
Joined: 02 Oct 2013 16:30

Re: Setting options for VLC ActiveX Plugin

Postby jerry20 » 28 Oct 2013 15:28

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.


Return to “Web and scripting”

Who is online

Users browsing this forum: No registered users and 9 guests