View Full Version : Playing Media
Philo
06-24-2004, 02:47 AM
Hi guys Ive got a quick question for you.
I need some advice on distributing video and audio files.
I set up a CD to demo to my clients with a page which had a video object and a list box of all available movies. When I tried to demo it an error message appeared and the list box did not get populated.
Their system was running windows 2000 so Im assuming that it was due to WMP not being present although I couldn't check at the time. (It works fine on my Win 98 pc at home and windows NT and XP machines in work).
I know that I can use project depandancies to check for WMP but I want to use the method most likely to work rather than just telling people to upgrade their software
Would using the free WMP pluggin be more robust? I was hoping that by using that, all the nesecary stuff to play the movie would be included on the disk rather than relying on them having something installed on their PC but Im not entirely sure if this is the case.
Cheers
Phil
eric_darling
06-24-2004, 01:17 PM
Philo,
What format are your video and audio files?
SUF6NEWBIE
06-24-2004, 08:58 PM
just a thought.. there is a winmedia type 'components'
installer available at microsoft.com ..this executable
is from memory around 1.9 meg file size. You could consider
including the executable with your publication..
Official package name: 'Windows Media Component Setup Application'
Official File Name: 'WMFADist.exe'
sorry no longer have the dload link..search Msofts dload site should
pick it up...to the best of my knowledge, there are NO licensing restrictions and can be freely distributed..
the docs should state wot Oss' are supported
although installation is needed..a possible solution
Philo
06-25-2004, 02:26 AM
eric_darling -Im not sure of the exact format of the files the extension is .mpg I cant check at the moment as all the files are on my home PC
SUF6NEWBIE - Thanks for the tip I will check it out.
I realy need to know the most accessible way of including media for when designing future projects.
Thanks
Phil
eric_darling
06-25-2004, 08:29 AM
Philo,
Well, it depends, really. If your video is .mpg, that means MPEG-1. You should always play MPEG-1 with the built-in video object in AMS 5. If you are using an ASF or WMV, you will probably want to use the Media Player Object plug-in (freely available from Indigo Rose for licensed users of the AMS 5 Pro software).
I like using the built-in object whenever possible since that will pretty much work no matter who is trying to run a CD I produce. Peace of mind is worth a lot.
Philo
06-25-2004, 09:36 AM
Cheers for the advice,
I only really thought about it because of the problems I encountered. Sod's law the system they had was the one which had problems when all of my test machines were fine. ;)
On a slightly different track whats the best way for testing for versions?
I know the dependancies let you specify a minimum version but how can you do the same in code? Is it a case of stripping down the string varaible produced by AMS dependancies and converting it to a number or is there a better way?
I'd like to jump to pages based on which version the user has on their machine, e.g WMP versions 6 - 8 goto page 2 version 9 goto page 3
Thanks again
Phil
SUF6NEWBIE
06-25-2004, 09:54 AM
pulled from my current project...
--CODE:
mplayerloc = Registry.GetValue(HKEY_LOCAL_MACHINE, "Software\\Microsoft\\MediaPlayer", "Installation Directory", true);
mpexist = File.DoesExist(mplayerloc.."\\wmplayer.exe");
if mpexist then
mpver_info = File.GetVersionInfo(mplayerloc.."\\wmplayer.exe");
mpver = mpver_info.FileVersion;
mpsm = String.Left(mpver, 1);
else
mpver_info = File.GetVersionInfo(mplayerloc.."\\mplayer2.exe");
mpver = mpver_info.FileVersion;
mpsm = String.Left(mpver, 1);
end
if (mpver_info == nil) then
mpver = "(is not installed)";
mpsm = " ";
end
hope helps..reads current versions..modify at will..
Philo
06-25-2004, 10:12 AM
Thank you
I will have a play about with it over the weekend. Hadn't even thought of doing it that way.
how did you know to look for wmplayer.exe and mplayer2.exe? I assume they are different names for different versions?
SUF6NEWBIE
06-25-2004, 10:20 AM
no problems...experience..the mp2...exe is a default that is installed
on all Windows Oss..basically the idea is if mplayer.exe does not
exist..then the default is installed..mp2...exe is also a compatibility
file on NT5.1 and later.
have a look at the code..the string left returns the main Mplayer version
number eg: if mplayer 6.0.0.1 blah blah then the return is 6
so on and so forth...fully tested works for any version mediaplayer
some of the values are for me to display to user on a page the main
version number then the full file version info...
so for you..if left string result == 6 or 8 or 9 then
pagejump...
you'll do fine..
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.