Thread Subject: Playing movies in GUI Part 4: Problems with activex

Subject: Playing movies in GUI Part 4: Problems with activex

From: Eric

Date: 9 Jun, 2011 16:53:05

Message: 1 of 7

Hey everybody!

So I'm still on my quest to be able to play videos is my GUI. Thanks to Steven_Lord, I found a player that is already built into a GUIDE GUI:

http://www.mathworks.com/matlabcentral/fileexchange/3670-activexcontrol-for-video-and-audio

Now presumably, I can use this GUI and just add my other buttons/features to it. My only problem now is that I am getting this error when I run it:

 ??? Error using ==> feval
Input PROGID does not represent an Activex control.
If this PROGID used to work before, please check vendor's
documentation for equivalent activex control progid.

Error in ==> actxcontrol>createControl at 240
        ctrl = feval(comstr, 'control', position, parent, '', filename, hwnd, licensekey, false,parent_string);

Error in ==> actxcontrol at 212
    hControl = createControl;

Error in ==> act_ive_gui>act_ive_gui_OpeningFcn at 126
MovieControl = actxcontrol('AMOVIE.ActiveMovieControl.2',pos);

Error in ==> gui_mainfcn at 221
    feval(gui_State.gui_OpeningFcn, gui_hFigure, [], guidata(gui_hFigure), varargin{:});

Error in ==> act_ive_gui at 99
    gui_mainfcn(gui_State, varargin{:});

Can anyone help me with this one? I really appreciate the support of this community.

Subject: Playing movies in GUI Part 4: Problems with activex

From: matt dash

Date: 9 Jun, 2011 18:50:22

Message: 2 of 7

"Eric " <ericjaycorbett@gmail.com> wrote in message <isqtph$3ob$1@newscl01ah.mathworks.com>...
> Hey everybody!
>
> So I'm still on my quest to be able to play videos is my GUI. Thanks to Steven_Lord, I found a player that is already built into a GUIDE GUI:
>
> http://www.mathworks.com/matlabcentral/fileexchange/3670-activexcontrol-for-video-and-audio
>
> Now presumably, I can use this GUI and just add my other buttons/features to it. My only problem now is that I am getting this error when I run it:
>
> ??? Error using ==> feval
> Input PROGID does not represent an Activex control.
> If this PROGID used to work before, please check vendor's
> documentation for equivalent activex control progid.
>
> Error in ==> actxcontrol>createControl at 240
> ctrl = feval(comstr, 'control', position, parent, '', filename, hwnd, licensekey, false,parent_string);
>
> Error in ==> actxcontrol at 212
> hControl = createControl;
>
> Error in ==> act_ive_gui>act_ive_gui_OpeningFcn at 126
> MovieControl = actxcontrol('AMOVIE.ActiveMovieControl.2',pos);
>
> Error in ==> gui_mainfcn at 221
> feval(gui_State.gui_OpeningFcn, gui_hFigure, [], guidata(gui_hFigure), varargin{:});
>
> Error in ==> act_ive_gui at 99
> gui_mainfcn(gui_State, varargin{:});
>
> Can anyone help me with this one? I really appreciate the support of this community.

You don't have the required activex control installed on your computer. Did you install it from the link on the FEX page? If so, did you restart matlab afterward? Be warned that there's a good chance the activex control won't work on 64-bit matlab, if that is relevant to you.

Subject: Playing movies in GUI Part 4: Problems with activex

From: Eric

Date: 9 Jun, 2011 18:56:04

Message: 3 of 7

"Eric " <ericjaycorbett@gmail.com> wrote in message <isqtph$3ob$1@newscl01ah.mathworks.com>...
> Hey everybody!
>
> So I'm still on my quest to be able to play videos is my GUI. Thanks to Steven_Lord, I found a player that is already built into a GUIDE GUI:
>
> http://www.mathworks.com/matlabcentral/fileexchange/3670-activexcontrol-for-video-and-audio
>
> Now presumably, I can use this GUI and just add my other buttons/features to it. My only problem now is that I am getting this error when I run it:
>
> ??? Error using ==> feval
> Input PROGID does not represent an Activex control.
> If this PROGID used to work before, please check vendor's
> documentation for equivalent activex control progid.
>
> Error in ==> actxcontrol>createControl at 240
> ctrl = feval(comstr, 'control', position, parent, '', filename, hwnd, licensekey, false,parent_string);
>
> Error in ==> actxcontrol at 212
> hControl = createControl;
>
> Error in ==> act_ive_gui>act_ive_gui_OpeningFcn at 126
> MovieControl = actxcontrol('AMOVIE.ActiveMovieControl.2',pos);
>
> Error in ==> gui_mainfcn at 221
> feval(gui_State.gui_OpeningFcn, gui_hFigure, [], guidata(gui_hFigure), varargin{:});
>
> Error in ==> act_ive_gui at 99
> gui_mainfcn(gui_State, varargin{:});
>
> Can anyone help me with this one? I really appreciate the support of this community.

Actually, I solved the problem myself (by updating windows and downloading the latest internet explorer) .

Only to discover another error (of course):

??? Attempt to reference field of non-structure array.

Error in ==> act_ive_gui>ope_n_fil_e_Callback at 168
mp = handles.MovieControl.MediaPlayer;

Error in ==> gui_mainfcn at 96
        feval(varargin{:});

Error in ==> act_ive_gui at 99
    gui_mainfcn(gui_State, varargin{:});

Error in ==> @(hObject,eventdata)act_ive_gui('ope_n_fil_e_Callback',hObject,eventdata,guidata(hObject))

 
??? Error while evaluating uicontrol Callback

So the Movie player GUI will launch, but whenever I try to play a video I get that error.

Can anyone assist?

Subject: Playing movies in GUI Part 4: Problems with activex

From: Eric

Date: 9 Jun, 2011 19:02:04

Message: 4 of 7

Actually I think Im confusing myself here. The player came with 2 files: a .m file and .fig file. When I try to run the .m file, nothing happens and I get the activex error. When I run the .fig file, the GUI launches but gives the unstructured array error when I attempt to play a video

I must be doing something wrong as far as thees files are concerned.

Subject: Playing movies in GUI Part 4: Problems with activex

From: matt dash

Date: 9 Jun, 2011 19:16:19

Message: 5 of 7

"Eric " <ericjaycorbett@gmail.com> wrote in message <isr5bc$qtk$1@newscl01ah.mathworks.com>...
> Actually I think Im confusing myself here. The player came with 2 files: a .m file and .fig file. When I try to run the .m file, nothing happens and I get the activex error. When I run the .fig file, the GUI launches but gives the unstructured array error when I attempt to play a video
>
> I must be doing something wrong as far as thees files are concerned.


You're supposed to run the m file, not the fig file. The fig file error appears to be because the m file was supposed to create the control and fill that variable (handles.MovieControl.MediaPlayer), so when you dont run the m file you dont get the activexcontrol error, but you get a new error later.

You might want to just try to solve this yourself using a newer activexcontrol. I noticed that after installing VLC player (and restarting matlab) i get an activexcontrol for it, and sure enough if I run just these lines...

f=figure
a=actxcontrol('VideoLAN.VLCPlugin.1',[20 20 300 300])
a.addTarget('C:\...\near_science_med.avi',[],0,2)
a.play

... it plays the video! I'm sure with some googling you can find a player appropriate for your application. Try checking actxcontrollist and look for something that sounds like it plays videos, you might already have one.

Subject: Playing movies in GUI Part 4: Problems with activex

From: Eric

Date: 10 Jun, 2011 14:15:04

Message: 6 of 7

"matt dash" wrote in message <isr663$27$1@newscl01ah.mathworks.com>...
> "Eric " <ericjaycorbett@gmail.com> wrote in message <isr5bc$qtk$1@newscl01ah.mathworks.com>...
> > Actually I think Im confusing myself here. The player came with 2 files: a .m file and .fig file. When I try to run the .m file, nothing happens and I get the activex error. When I run the .fig file, the GUI launches but gives the unstructured array error when I attempt to play a video
> >
> > I must be doing something wrong as far as thees files are concerned.
>
>
> You're supposed to run the m file, not the fig file. The fig file error appears to be because the m file was supposed to create the control and fill that variable (handles.MovieControl.MediaPlayer), so when you dont run the m file you dont get the activexcontrol error, but you get a new error later.
>
> You might want to just try to solve this yourself using a newer activexcontrol. I noticed that after installing VLC player (and restarting matlab) i get an activexcontrol for it, and sure enough if I run just these lines...
>
> f=figure
> a=actxcontrol('VideoLAN.VLCPlugin.1',[20 20 300 300])
> a.addTarget('C:\...\near_science_med.avi',[],0,2)
> a.play
>
> ... it plays the video! I'm sure with some googling you can find a player appropriate for your application. Try checking actxcontrollist and look for something that sounds like it plays videos, you might already have one.

Thank you for the lesson.

So let me see if I am understanding you correctly:
Download newer version of some media player(this will automatically upgrade my activex). which will make this player that I downloaded work?

And what is this "actxcontrolist"? And where can I find it?

Subject: Playing movies in GUI Part 4: Problems with activex

From: matt dash

Date: 10 Jun, 2011 15:44:04

Message: 7 of 7

"Eric " <ericjaycorbett@gmail.com> wrote in message <ist8t8$kfa$1@newscl01ah.mathworks.com>...
> "matt dash" wrote in message <isr663$27$1@newscl01ah.mathworks.com>...
> > "Eric " <ericjaycorbett@gmail.com> wrote in message <isr5bc$qtk$1@newscl01ah.mathworks.com>...
> > > Actually I think Im confusing myself here. The player came with 2 files: a .m file and .fig file. When I try to run the .m file, nothing happens and I get the activex error. When I run the .fig file, the GUI launches but gives the unstructured array error when I attempt to play a video
> > >
> > > I must be doing something wrong as far as thees files are concerned.
> >
> >
> > You're supposed to run the m file, not the fig file. The fig file error appears to be because the m file was supposed to create the control and fill that variable (handles.MovieControl.MediaPlayer), so when you dont run the m file you dont get the activexcontrol error, but you get a new error later.
> >
> > You might want to just try to solve this yourself using a newer activexcontrol. I noticed that after installing VLC player (and restarting matlab) i get an activexcontrol for it, and sure enough if I run just these lines...
> >
> > f=figure
> > a=actxcontrol('VideoLAN.VLCPlugin.1',[20 20 300 300])
> > a.addTarget('C:\...\near_science_med.avi',[],0,2)
> > a.play
> >
> > ... it plays the video! I'm sure with some googling you can find a player appropriate for your application. Try checking actxcontrollist and look for something that sounds like it plays videos, you might already have one.
>
> Thank you for the lesson.
>
> So let me see if I am understanding you correctly:
> Download newer version of some media player(this will automatically upgrade my activex). which will make this player that I downloaded work?
>
> And what is this "actxcontrolist"? And where can I find it?

actxcontrollist is a matlab function that lists all of your activexcontrols. The first columns is the name of the control, but the second column is the important one... it tells you what you type to create the control (in the example above, 'VideoLAN.VLCPlugin.1'). I would start by checking that list to see what you already have. In my list in addition to the VLC player i have one for windows media player called WMPlayer.OCX.7.

So if you see something there that looks like i plays videos you might not need to install anything, otherwise try searching for a video player that has an activexcontrol (like vlc player). Once you find it, make one using a=actxcontrol('...') where ... is that string in the second column of actxcontrollist.

Then you can use methodsview(a) to see everything that it can do. You'll presumably see things like "play" "pause" and something to load a file. For the VLC player this is addTarget. methodsview will also give you some hints as to what kind of syntax each method requires, but you might also need to do some googling for documentation, or some guessing. A lot of activexcontrols have little to no documentation available.

If your movies will play in windows media player, the WMPlayer.OCX.7 might be the best bet, since it is well documented and presumably pretty stable. Do they?

Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Tag Activity for This Thread
Tag Applied By Date/Time
guide B_Richardson 9 Jun, 2011 12:54:07
gui B_Richardson 9 Jun, 2011 12:54:07
activex B_Richardson 9 Jun, 2011 12:54:07
rssFeed for this Thread

Contact us at files@mathworks.com