VideoHelp Forum




+ Reply to Thread
Page 1 of 2
1 2 LastLast
Results 1 to 30 of 42
  1. 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
    Quote Quote  
  2. OK

    I've managed to create a batch file that will launch mplayer classic and play any file no problems, but this will not play the file when launched from the web page, just flashes up the dos box and disappears ??


    will search out 'html' pages and report back
    Quote Quote  
  3. Member
    Join Date
    Nov 2001
    Location
    Sequim, WA
    Search PM
    I am very much looking forward to what you folks discover and share!
    Quote Quote  
  4. VH Veteran jimmalenko's Avatar
    Join Date
    Aug 2003
    Location
    Down under
    Search PM
    I don't know whether this helps, but I have found that it is fairly tricky to get much advanced functionality from HTML. Would it trouble you to do it in ASP ? You get access to VBScript and JavaScript then also.
    If in doubt, Google it.
    Quote Quote  
  5. VH Veteran jimmalenko's Avatar
    Join Date
    Aug 2003
    Location
    Down under
    Search PM
    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>
    Download the html page here if you like

    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.
    Quote Quote  
  6. 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
    Quote Quote  
  7. VH Veteran jimmalenko's Avatar
    Join Date
    Aug 2003
    Location
    Down under
    Search PM
    Originally Posted by neilpercy
    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 ???
    My recommendation would be to make up two different sample clips of about 10 seconds length and call them Movie1.mpg and Movie2.mpg. Burn your autorun.inf file, boot loader, html file, MPC.EXE, Movie1.mpg and Movie2.mpg all to the root of a RW. Edit test.txt to suit and save as a html document.

    Originally Posted by neilpercy
    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).
    Yes. Must be single quotes to indicate a string.

    Originally Posted by neilpercy
    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
    I actually found information that states that it is 'mplayerc.exe /switches "filename" and it certainly worked for me.

    Originally Posted by neilpercy
    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 ??
    I found that info on the web - I'm sorry but I can't recall where. MPC.EXE is obviously the exe, "/play /close " + file gives the exe its arguments, and I don't know what the others do, but they work. It might be helpful to do a web search on the ShellExecute method.

    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.
    Quote Quote  
  8. 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
    Quote Quote  
  9. VH Veteran jimmalenko's Avatar
    Join Date
    Aug 2003
    Location
    Down under
    Search PM
    Will do. Creating now...
    If in doubt, Google it.
    Quote Quote  
  10. cheers jimmalenko,


    will have a look now
    Quote Quote  
  11. 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 ActiveX just 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
    Quote Quote  
  12. VH Veteran jimmalenko's Avatar
    Join Date
    Aug 2003
    Location
    Down under
    Search PM
    I can guarantee you that I burnt this ISO to a RW and it worked perfectly. It must be either your settings or maybe mounting as a virtual drive that is causing the problem.
    If in doubt, Google it.
    Quote Quote  
  13. 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 ???
    Quote Quote  
  14. 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
    Quote Quote  
  15. VH Veteran jimmalenko's Avatar
    Join Date
    Aug 2003
    Location
    Down under
    Search PM
    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 research
    If in doubt, Google it.
    Quote Quote  
  16. Member mikesbytes's Avatar
    Join Date
    Jun 2003
    Location
    Sydney, Australia
    Search Comp PM
    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
    Quote Quote  
  17. Member mikesbytes's Avatar
    Join Date
    Jun 2003
    Location
    Sydney, Australia
    Search Comp PM
    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>
    Can you force the directory, eg [volumne name]:\MPC.EXE" ?
    Quote Quote  
  18. VH Veteran jimmalenko's Avatar
    Join Date
    Aug 2003
    Location
    Down under
    Search PM
    Originally Posted by mikesbytes
    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.
    WTF ???

    I don't understand what you are trying to say here.

    Originally Posted by mikesbytes
    1. Can media player classic be run directly from a file without PC installation?
    Yes it can. Download it and you will see for yourself. Either that or download the ISO I put up a few posts ago and burn that. Then you will see.

    Originally Posted by mikesbytes
    2. Can media player classic use the codec directly off the disk, ie the codec is not installed on the PC
    No, I don't think so. As I understand it (and have read), Media Player Classic still requires the codec to be installed on the PC in question, even though we are running the EXE from a CD or DVD. I don't think you can put the codec on the disc and then get it to use that.
    If in doubt, Google it.
    Quote Quote  
  19. VH Veteran jimmalenko's Avatar
    Join Date
    Aug 2003
    Location
    Down under
    Search PM
    Originally Posted by mikesbytes
    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.
    The code is good for me

    Originally Posted by mikesbytes
    Can you force the directory, eg "volume name":\MPC.EXE" ?
    I believe so. Read this.
    If in doubt, Google it.
    Quote Quote  
  20. Member mikesbytes's Avatar
    Join Date
    Jun 2003
    Location
    Sydney, Australia
    Search Comp PM
    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.
    Quote Quote  
  21. VH Veteran jimmalenko's Avatar
    Join Date
    Aug 2003
    Location
    Down under
    Search PM
    Originally Posted by mikesbytes
    Hi jimmalenko, looks like we posted at the same time.
    A few crossed wires here or there

    Originally Posted by mikesbytes
    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.
    I don't know. After reading neilpercy's post last night, it took me about three hours to arrive at that final ISO I uploaded tonight. Bloody dial-up !

    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.
    Quote Quote  
  22. Member mikesbytes's Avatar
    Join Date
    Jun 2003
    Location
    Sydney, Australia
    Search Comp PM
    Ah, we are still parallel posting and after midnight AEST.

    var commandtoRun = "C:\\Winnt\\Notepad.exe";
    This example code is forcing Notepad to run, but it assume it is on the "C" drive. Problem with CD is you don't necessarly know what label has been assigned.

    If I had called the volumne on the CD "MUMS_BIRTHDAY" could we use the code "MUMS_BIRTHDAY:\MPC.EXE" ?
    Quote Quote  
  23. 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
    Quote Quote  
  24. VH Veteran jimmalenko's Avatar
    Join Date
    Aug 2003
    Location
    Down under
    Search PM
    Originally Posted by mikesbytes
    If I had called the volumne on the CD "MUMS_BIRTHDAY" could we use the code "MUMS_BIRTHDAY:\MPC.EXE" ?
    I don't know to be honest - I'm not exactly sure how you reference the volume label of a CD. We shouldn't have to go to those extremes though, because simply referencing the file as "MPC.EXE" means it will look in the same directory as the html page, as it should. Maybe you could try "./MPC.EXE", meaning "current directory".
    If in doubt, Google it.
    Quote Quote  
  25. VH Veteran jimmalenko's Avatar
    Join Date
    Aug 2003
    Location
    Down under
    Search PM
    neilpercy, out of interest, try putting
    Code:
    open=MPC.EXE /play /close <a movie>.mpg
    in your autorun file and burn it to CD.

    Is there any chance your movie filenames have spaces in them ?
    If in doubt, Google it.
    Quote Quote  
  26. 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 ????
    Quote Quote  
  27. 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.
    Quote Quote  
  28. 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
    Quote Quote  
  29. 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)
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!