GPU acceleration for ActiveX in .NET Desktop App

All you've ever wanted to know about the ActiveX, Mozilla plugins, the web interface and various PHP extensions
delusion
New Cone
New Cone
Posts: 2
Joined: 10 Aug 2010 13:03

GPU acceleration for ActiveX in .NET Desktop App

Postby delusion » 10 Aug 2010 14:02

I have successfully integrated the "VLC ActiveX plugin v1" in my project and it plays the test video :) . Unfortunately gpu acceleration is not used although i activated it in the VLC player options. When i play the test video with the VLC player the gpu acceleration is used (win7, gpu: ati4890).

I've searched the forums for some possibilities of setting options:
- via command line options, but there seems to be no option for enabling "gpu acceleration"
- via changing the vlc defaults in the vlcrc file , but i couldn't find any option related to "gpu acceleration" (if there is any)
- via the get/setVariable, but there also seems to be no "gpu acceleration"

Did i miss something?
Or am i trying something that cannot be done with the VLC ActiveX Element v1 but with VLC ActiveX Element v2?
Or can it only be done with libVLC?


Since i need to play HD videos which would consume almost all cpu power but still need cpu power for other things i need to use the gpu acceleration :(

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: GPU acceleration for ActiveX in .NET Desktop App

Postby Jean-Baptiste Kempf » 10 Aug 2010 15:16

--ffmpeg-hw
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

delusion
New Cone
New Cone
Posts: 2
Joined: 10 Aug 2010 13:03

Re: GPU acceleration for ActiveX in .NET Desktop App

Postby delusion » 11 Aug 2010 17:53

Thanks for your help :) !
I tried to utilize this command and it works, but only from the commandline :(

e.g. vlc.exe Video.m2ts --ffmpeg-hw

plays the video file with hardware acceleration ignoring the value that was set in the VLC main application.
But if i try to use it in my application nothing happens.
It doesn't matter if i use "VLC ActiveX plugin v1" or "VLC ActiveX plugin v2"

Code: Select all

string[] options = new string[1]; options[0] = "--ffmpeg-hw"; string fileName = "Video.m2ts" string metaName = "Simuilationsfahrt"; axVLCPlugin21.playlist.add(fileName, metaName, options); axVLCPlugin21.playlist.play();
Using ":ffmpeg-hw" instead of "--ffmpeg-hw" leads to the same result.
Even using a logger doesn't work (but also works from the command line), so i can't find the cause of the error.

Code: Select all

string[] options = new string[4]; options[0] = "--extraintf=logger"; options[1] = "--log-verbose==3"; options[2] = "--logtype=text"; options[3] = "--logfile=\"C:\\Users\\Admin\\Desktop\\file_log.txt\""; string fileName = "Video.m2ts" string metaName = "Simuilationsfahrt"; axVLCPlugin21.playlist.add(fileName, metaName, options); axVLCPlugin21.playlist.play();
However from doing a search on the forums it seems as if some command line options are disabled for the ActiveX plugin for security reasons. I don't know why the default setting for hardware acceleration would be disabled for the ActiveX Plugin even when it was manually enabled in VLC. If it is not possible manually enable it for the ActiveX plugin it would result in no hardware acceleration at all for the ActiveX plugin :?

Going back to an older version which does not disable commandline options is not an alternative since gpu acceleration is only supportet in the latest releases. Some options are working. If i replace "--ffmpeg-hw" by ":novideo" it shows no video.

Is there an error in my approach or is there any workaround to pass options to the plugin?
Has anyone managed to get the hardware acceleration working for the activeX plugin?
Can it be done with the libvlc .net wrapper?

ojrn
New Cone
New Cone
Posts: 3
Joined: 28 Aug 2010 10:10

Re: GPU acceleration for ActiveX in .NET Desktop App

Postby ojrn » 28 Aug 2010 10:15

I also have the same VLC ActiveX problem when using the ffmpeg-hw option -- the option does not appear to have any effect at all. Tried on combinations of Windows Vista and 7, x86 and x64. Development environment is .Net 2.0.

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: GPU acceleration for ActiveX in .NET Desktop App

Postby Jean-Baptiste Kempf » 04 Sep 2010 16:45

Ok, this is very likely. File a bug.
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

ojrn
New Cone
New Cone
Posts: 3
Joined: 28 Aug 2010 10:10

Re: GPU acceleration for ActiveX in .NET Desktop App

Postby ojrn » 16 Oct 2010 17:03

@j-b, thanks for helping.

There are over a thousand open tickets in the VLC bug trac, and most of which are never responded to :? . This is a severe bug for all developers integrating the VLC player. Is there another channel we can use to notify the devs?

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: GPU acceleration for ActiveX in .NET Desktop App

Postby Jean-Baptiste Kempf » 17 Oct 2010 18:03

Well, after thoughts, we don't want website people to control hardware of the people.

ActiveX is mostly used for websites, so you cannot.
We'll wait that this option becomes the default.
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

balasubramanya
Blank Cone
Blank Cone
Posts: 61
Joined: 11 Feb 2013 07:33

Re: GPU acceleration for ActiveX in .NET Desktop App

Postby balasubramanya » 27 Feb 2013 11:14

Is the GPU accleration for activex is enabled in VLC v2.0.0+ builds?

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: GPU acceleration for ActiveX in .NET Desktop App

Postby Jean-Baptiste Kempf » 27 Feb 2013 23:36

No
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

balasubramanya
Blank Cone
Blank Cone
Posts: 61
Joined: 11 Feb 2013 07:33

Re: GPU acceleration for ActiveX in .NET Desktop App

Postby balasubramanya » 28 Feb 2013 05:46

Thanks JB. I am currently using vlc 2.0.2 for a web based application and I have the control over the application which uses vlc web plugin. I would like to enable the GPU acceleration for my application. Since I am compiling vlc on my own, is it possible for me to enable the gpu decoding feature for the web plugin during vlc compilation? If yes please provide me pointer to do so. I also would like to know about the 2.0.2 vlc web plugin that is it designed to use the multi-core cpu architecture in efficient way during web playback or do I need to modify/enable some feature during compilation?

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: GPU acceleration for ActiveX in .NET Desktop App

Postby Jean-Baptiste Kempf » 28 Feb 2013 07:25

You just need to recompile the axvlc.dll part and you can add this, of course (--avcodec-hw)
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

balasubramanya
Blank Cone
Blank Cone
Posts: 61
Joined: 11 Feb 2013 07:33

Re: GPU acceleration for ActiveX in .NET Desktop App

Postby balasubramanya » 01 Mar 2013 08:27

Thanks JB. Could you please provide or point me specific steps to do these changes?

balasubramanya
Blank Cone
Blank Cone
Posts: 61
Joined: 11 Feb 2013 07:33

Re: GPU acceleration for ActiveX in .NET Desktop App

Postby balasubramanya » 04 Mar 2013 06:59

Do I need to add

Code: Select all

ppsz_argv[ppsz_argc++] = "--ffmpeg-hw";
in VLCPlugin::initVLC() in activex/plugin.cpp to enable GPU decoding in web plugin?
I tried this option but it didn't worked for me. I am using vlc 2.0.2 version.
Please clarify if this was the place where I need to add the code to enable GPU decoding in web plugin.

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: GPU acceleration for ActiveX in .NET Desktop App

Postby Jean-Baptiste Kempf » 10 Mar 2013 00:58

avcodec-hw, but yes.
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

balasubramanya
Blank Cone
Blank Cone
Posts: 61
Joined: 11 Feb 2013 07:33

Re: GPU acceleration for ActiveX in .NET Desktop App

Postby balasubramanya » 11 Mar 2013 11:15

I got the gpu decoding working in IE-8. But firefox and chrome the playback was not using gpu. If I set the value to "ffmpeg-hw" to 1 by default in avcodec.c the gpu decoding is working for chrome and firefox.

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: GPU acceleration for ActiveX in .NET Desktop App

Postby Jean-Baptiste Kempf » 11 Mar 2013 14:11

Cool.
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.


Return to “Web and scripting”

Who is online

Users browsing this forum: No registered users and 14 guests