Hi folks,
I am trying to get an mpeg2 movie to play using mplayer classic (free for distribution) from a click on a web page which opens when the cd is inserted into pc (autorun)
can't seem to get the command line options to run from the button click
i.e mplayerc.exe "movie.mpg". can't seem to pass the filename on the button click
(I appreciate that this is more of an HTML authoring question, but i'm hoping some folk on here may ahve done something similar. Plese remove if this is not OK)
Opening the web page to produce a menu is the best solution that I have so far of providing a menu, and using mplayer classic makes sure I can play back mpeg2 on all pcs.
thanks for any help
neil
+ Reply to Thread
Results 1 to 30 of 42
-
-
I am very much looking forward to what you folks discover and share!
-
I've got it working !
Here's what the html page looks like:
Use your normal method to autorun a html file. In that html file contain the following code:
Code:<HTML> <HEAD> <SCRIPT type="text/javascript" LANGUAGE="JavaScript"> function PlayIt(file) { var oShell = new ActiveXObject("Shell.Application"); oShell.ShellExecute("MPC.EXE", "/play /close " + file, "", "open", "1"); } </SCRIPT> </HEAD> <BODY> <FORM name="Form1"> <CENTER> <H1>Select Movie:</H1> <input style="width: 200; height: 25;" type="Button" name="Button1" value="Back To The Future" onClick="PlayIt('Movie1.mpg')" /> <input style="width: 200; height: 25;" type="Button" name="Button2" value="Back To The Future 2" onClick="PlayIt('Movie2.mpg')" /> <input style="width: 200; height: 25;"type="Button" name="Button3" value="Back To The Future 3" onClick="PlayIt('Movie3.mpg')" /> </CENTER> </BODY> </FORM> </HTML>
Substitute the "Back to the future" bits with your movie titles. Substitute Movie1.mpg, Movie2.mpg etc. with the filenames. Substitute MPC.EXE with the name of the Media Player EXE (or rename yours to MPC.EXE).
This has all files in the root of the CD so you will have to include relative paths if you have/want a directory structure.
Have fun !If in doubt, Google it. -
hi jimmalenko,
many thanks, this looks like exactly what I need
except I cannot get it to run
I have renamed mplayer classic to MPC.EXE, it is in the root directory , but I still get message saying that windows cannot find MPC.EXE ???
Also, quick one, should the movie file name have the single quotes around it like you have, i.e. ('Movie1.mpg') or should it just be the movie name in the brackets i.e. (Movie1.mpg).
I really appreciate your help on this, I know nothing about ActiveX.
I think I am close though to getting this working
the MPC.EXE arguments you have given are before the filename. Does this matter when with mpayer classic the command line is 'mplayerc.ese "filename" /switches
could you explain the line
oShell.ShellExecute("MPC.EXE", "/play /close " + file, "", "open", "1");
and how the arguments are made up and what each one meanes ?? Or just point me at a web page to look up how the shell.execeute command works ??
Thanks once again for all your input. It is really VERY appreciated.
cheers,
NEil -
Originally Posted by neilpercy
Originally Posted by neilpercy
Originally Posted by neilpercy
Originally Posted by neilpercy
I'll upload a sample ISO of the CD I got to work for you to download and burn to a RW if you like.If in doubt, Google it. -
hi jimmalenko ,
thanks once again
I have found web pages that illustrate your example
http://www.midrangeserver.com/mpo/mpo052302-story01.html
I understand the logic behind it , but can't get it to work
I am burning ISO to disk and mounting them with Daemon tools as if they were a cd, but it always asks for MPC.EXE
any chance you could upload your small ISO so I couls check it out. Would be very useful
Thanks a lot,
Neil -
If in doubt, Google it.
-
had a look,
still no good I'm afraid.
I have mounted image as virtual drive with deamon tools, 'test' web page starts up, can see the two buttons, but get same error - windows cannot find MPC.exe - when button preesed.
just wondering, do I need to make any adjustmets to windows Internet Explorer security permissions regarding ActiveXjust bguessing really.
It seems the ActiveX control is running, as it is asking windows to find MPC>EXE, but for some reason it is not looking in the root directory of the cd ???
I will try burning it to see if that makes any difference.
Thanks for all you help, most apprteciated.
Neil -
unfortunately stiil no-go
burnt to a DVD-RW (haven't tried a CD -RW) and not able to finf file MPC.EXE
will try a CD-RW and let you know.
curious to know what setttings might be affecting it though ??? -
no good on a CD-RW either ?????
thanks for all your input, but this method obviously relies on a specific setting being true, which will limit it's use I think.
Hope not. I have tried adjusting my IE security settings to allow unsigned ActiveX controls, but doesn't seen to make a difference.
will try re-booting and see.
cheers,
Neil -
Strange. Don't it piss you off when someone can get something working first off, when you spend days or weeks at it and can't get it to work for the life of you ?
Stick at it - I'm sure we can work something out. I had mine on a CD-RW.
I guess we just need to do some more researchIf in doubt, Google it. -
This can be a little deceiving, as often the player and/or codec are already mounted on the PC. The end result is deceiving yourself in thinking that it is running.
1. Can media player classic be run directly from a file without PC installation?
2. Can media player classic use the codec directly off the disk, ie the codec is not installed on the PC -
Didn't work for me either. Couldn't find MPC.exe, which is definently in the root directory. Strange the code looks good to me.
<SCRIPT type="text/javascript" LANGUAGE="JavaScript">
function PlayIt(file)
{
var oShell = new ActiveXObject("Shell.Application");
oShell.ShellExecute("MPC.EXE", "/play /close " + file, "", "open", "1");
}
</SCRIPT> -
Originally Posted by mikesbytes
I don't understand what you are trying to say here.
Originally Posted by mikesbytes
Originally Posted by mikesbytesIf in doubt, Google it. -
Hi jimmalenko, looks like we posted at the same time.
I'm quite interested in getting this working for neilpercy.
See my post above yours, didn't work on my machine, any suggestions?
I saw someone else was once trying to write a program that would check for the codec and install it if it wasn't there. The other way around this is to use a common format such as mpeg1. -
Originally Posted by mikesbytes
Originally Posted by mikesbytes
I came across a number of different websites that all had pretty good ideas, such as check for the presence of X and if it does not exist, install it, as you say. Read this for more info.
I too am intrigued by this and I'm kinda sheepish that my solution works for me and not for 2 out of 2 other people who have tried it. Welcome to the world of computers I guess !If in doubt, Google it. -
Ah, we are still parallel posting and after midnight AEST.
var commandtoRun = "C:\\Winnt\\Notepad.exe";
If I had called the volumne on the CD "MUMS_BIRTHDAY" could we use the code "MUMS_BIRTHDAY:\MPC.EXE" ? -
thanks for all the input guys, especially all the time jimmalenko has put into it.
I don't think that it is a codec issue, because that would produce an error warning relating to that.
It is somehow related to windows not follwing the path information or looking for a registered file (which I think is where mikesbytes is comimg from) although mplayer classic works as a standalone executable ????
I have played with some IE activex settings with no luck, although know I think that some of the web based java applets that I use are not quite working properly, so I am stilll looking.
cheers guys,
neil -
Originally Posted by mikesbytesIf in doubt, Google it.
-
will try that suggestion in minute. jimmalenko.
curious, just ran the MPC.exe file off the cd I burned from jimmalenkos ISO and it opens fine, but if I go to file>open, a file that I have opened before in another directory is listed using a different instance of MPC, so MPC must use the registry to store previous files at least.
not sure what this means ???? -
neilpercy, out of interest, try putting Code:
open=MPC.EXE /play /close <a movie>.mpg
in your autorun file and burn it to CD.
did that and it works fine. didn't have any spaces in mpg the filename. -
Media Player Classic has a fairly healthy entry in the Registry, as if it has been installed ???
Lots of setting, including recent file list.
If this is the case I may have to abandon MPC and use mplayer2, which is included in all versions of windows, in the sysytem folder I think.
Will have to change my file to Mpeg1, which is s a shame.
Any ideas how to use the %systemfolder% variable to acces this file directly, not using a full pathname. I would still like to call it from a web page though
I appreciate all the work put in, but if the application will not play universally then I will have to go with one that will.
I can use the full file path to mplayer2, but the %systemfolder% variable would be better.
cheers, neil -
HKEY_LOCAL_MACHINE\SOFTWARE\Gabest\Media Player Classic
stores the value for where the MPC.exe was last run, ie V:\MPC.EXE (virtual drive) or E:\MPC.EXE (CD drive)
Similar Threads
-
web page translator and email full page translator
By juststarting in forum ComputerReplies: 3Last Post: 1st Feb 2010, 09:23 -
DLC.html
By Hangrumps in forum Video ConversionReplies: 4Last Post: 15th Jul 2009, 15:00 -
System Running Slow when running dvdshrink
By mn072065 in forum ComputerReplies: 7Last Post: 24th Mar 2009, 19:59 -
html help
By steve42069 in forum ComputerReplies: 4Last Post: 8th Aug 2008, 10:38 -
HTML Help
By FEEL in forum ProgrammingReplies: 3Last Post: 20th Aug 2007, 08:58