|
| |||||||||
| Tags: load |
![]() |
| | Thread Tools | Search this Thread |
|
#1
| |||
| |||
| Windows Media Player 11 on Vista fails to load media files
If you right-click a media file (e.g. .AVI) and select "open with" and choose media player, the media player application opens but the file is not loaded. Similarly if you programatically try to play a media file using any of several methods such as: cmd.exe /C "my_media_file.avi" or rundll32 url.dll,FileProtocolHandler <file> or rundll32 SHELL32.DLL,ShellExec_RunDLL <file> the same thing happens. Media Player opens and does not load or play the requested file. What is interesting is that if you do one of those last teo methods (rundll...) twice in a row without closing the Media Player instance that is launched on the first attempt, the second attempt appears to work! Is this a known bug with Vista + Media Player? My tests in Windows XP SP2 work fine. |
|
#2
| |||
| |||
| Re: Windows Media Player 11 on Vista fails to load media files
SWP wrote: > If you right-click a media file (e.g. .AVI) and select "open with" and choose > media player, the media player application opens but the file is not loaded. I have similar experience here, though with an interesting twist: The files will not open for me, if opened using the "open with" dialog. However, as I - for testing purposes - added notepad as a possible opening application, I get a context menu under "open with". Selecting the media player from there _will_ play the file. Starting the application chooser from the context menu and selecting the media player from there _will not_ play the file. > Similarly if you programatically try to play a media file using any of > several methods such as: > rundll32 url.dll,FileProtocolHandler <file> This is how I discovered your post. I was trying to start the standard handler of a file from a Java application using the above trick # String cmds[]={"rundll32","url.dll,FileProtocolHandler",file}; # Runtime.exec(cmds); I know - Java 6 would have the Desktop class for that, but I'd like to stick with 5 for now as a requirement. > rundll32 SHELL32.DLL,ShellExec_RunDLL <file> > the same thing happens. Yep. Tried that, too. It is interesting, that starting wmplayer with the file as parameter will yield similar, but slightly different behaviour. > Media Player opens and does not load or play the requested file. > What is interesting is that if you do one of those last teo methods > (rundll...) twice in a row without closing the Media Player instance that is > launched on the first attempt, the second attempt appears to work! I cannot confirm this. However I have seen that pressing "Play" will cause it to play the last played file again, so one might easily think it had worked, if one viewed the file with another method somewhen earlier. > Is this a known bug with Vista + Media Player? My tests in Windows XP SP2 > work fine. Same here. I vote it's a bug, unless all the tutorials telling me to use rundll32 url.dll,FileProtocolHandler <file> for starting the standard handler for a given file are wrong. CU, Andy |
|
#3
| |||
| |||
| Re: Windows Media Player 11 on Vista fails to load media files "Andreas Beck" wrote: > SWP wrote: > > rundll32 url.dll,FileProtocolHandler <file> > > This is how I discovered your post. > I was trying to start the standard handler of a file from a Java > application using the above trick Me too. > I know - Java 6 would have the Desktop class for that, but I'd like to > stick with 5 for now as a requirement. Doesn't help :-( The Desktop class fails as well, but in a different way. It screws up because it only "opens" it doesn't "play" and apparently it needs to find the right verb somewhere - the error message I got indicated it couldn't find an open action or something along those lines. Also my Nvidia control panel crashes on my Win XP box when I try to open the media file with the Desktop class. > > Media Player opens and does not load or play the requested file. > > What is interesting is that if you do one of those last teo methods > > (rundll...) twice in a row without closing the Media Player instance that is > > launched on the first attempt, the second attempt appears to work! > > I cannot confirm this. However I have seen that pressing "Play" will > cause it to play the last played file again, so one might easily think > it had worked, if one viewed the file with another method somewhen > earlier. That might be the case - I was going crazy while testing. Thanks for the confirmation anyway! |
|
#4
| |||
| |||
| Re: Windows Media Player 11 on Vista fails to load media files
SWP wrote: > "Andreas Beck" wrote: >> SWP wrote: >> > rundll32 url.dll,FileProtocolHandler <file> >> This is how I discovered your post. >> I was trying to start the standard handler of a file from a Java >> application using the above trick > Me too. In that case, you might be interested in my current workaround, which is ugly but works for me: Runtime rt=Runtime.getRuntime(); // Unix String unix_command[]={"see",filename}; try { rt.exec(unix_command); return; // no execption, all is well. } catch (IOException e) {} // Windows /* * *Sigh* - Vista ships with Media Player 11, which seems to be * broken WRT handling files given to it * via the url.dll,FileProtocolHandler interface. * So I first try to explicitly open the media player, if the suffix * is MPG, ASF or WMV. * I know this inconveniences users who have configured another * media player. Sorry. */ if (suffix.compareToIgnoreCase(".mpg")==0 || suffix.compareToIgnoreCase(".asf")==0 || suffix.compareToIgnoreCase(".wmv")==0 ) { String windows_mp_command[]={System.getenv("ProgramFiles")+ "\\Windows Media Player\\wmplayer.exe","/Play",filename}; try { rt.exec(windows_mp_command); return; // no execption, all is well. } catch (IOException e) {} } String windows_command[]={"rundll32","url.dll,FileProtocolHandler",filename}; try { rt.exec(windows_command); return; // no execption, all is well. } catch (IOException e) {} JOptionPane.showMessageDialog(null, "Cannot execute any known handler, sorry."); >> I know - Java 6 would have the Desktop class for that, but I'd like to >> stick with 5 for now as a requirement. > Doesn't help :-( The Desktop class fails as well, but in a different way. *yuck* Thanks. I was already considering giving it a try. > It screws up because it only "opens" it doesn't "play" and apparently it > needs to find the right verb somewhere - the error message I got indicated it > couldn't find an open action or something along those lines. *sigh* Very cross platform, all this. > Also my Nvidia control panel crashes on my Win XP box when I try to open > the media file with the Desktop class. Hmm - I'd like to know if my above cludge works on XP. I suspect there might be problems with different install paths. I hope the install path is not localized (apart from the part catched by %ProgramFiles% ...). > Thanks for the confirmation anyway! NP. I was glad to find others had the same problem and also done extensive tests. Reassured me that it wasn't just me being dumb. CU, Andy |
![]() |
|
| Thread Tools | Search this Thread |
| |
Similar Threads for: "Windows Media Player 11 on Vista fails to load media files" | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Files do not open in any media player except Windows media player | Blesseds | Media Player | 3 | 30-11-2010 07:40 PM |
| Cannot play avi files on windows media player/media centre anymore | swtjen09 | Media Player | 3 | 07-06-2009 09:06 PM |
| Windows Media Player cannot play files with optical media and other portable devices | alphalogan | Windows Software | 6 | 31-03-2009 03:27 PM |
| Media Player fails to load | Gregg Shepherd | Media Player | 2 | 29-01-2009 02:45 PM |
| vista media player media library doesn't index my mp3 files | Tom | Vista Help | 21 | 26-02-2007 08:43 AM |