Home arrow static arrow Java Programming [Archive] - Open media files
Warning: Creating default object from empty value in /www/htdocs/w008deb8/wiki/components/com_staticxt/staticxt.php on line 51
Java Programming [Archive] - Open media files
This topic has 4 replies on 1 page.

Posts:4
Registered: 8/3/04
Open media files  
Aug 3, 2004 3:31 AM



 
Hello, i want to open a media files like an .mpeg or .avi in a java Application using the programs
available on the system like Quick Time or Winamp...Is it Possible and how ??

Thx in advance !!!

Simone
 

Posts:14,142
Registered: 99-04-02
Re: Open media files  
Aug 3, 2004 7:07 AM (reply 1 of 4)



 
Well, sure thing. If you just want to open Winamp or some other app, you can use Runtime.exec() to execute the app and pass it the file you want to play.

If you want to play things within your application, so you can control the playback, instead of launching separate apps... you could use Java Media Framework (JMF), or you could use QuickTime For Java. I believe that QT still includes the libraries and installs this when you install QT on a system. Search the web for QuickTime for Java, I'm sure you'll find some info.
 

Posts:4
Registered: 8/3/04
Re: Open media files  
Aug 3, 2004 9:16 AM (reply 2 of 4)



 
Thanks for the advice !

But i find some problems..

Running the exec() command in a java application, i try to pass to quick time the URL as a parameter to quicktimeplayer.exe. It works if i try with a mp3 files on my hard disk (for example c:\music\Mysong1.mp3) but if i try to pass the file parameter just like http://www.mp3site.com/AnotherSong1.mp3 it doesn't work..

How can i do ?

Thanks in advance !!!!!

Simone
 

Posts:14,142
Registered: 99-04-02
Re: Open media files  
Aug 3, 2004 11:07 AM (reply 3 of 4)



 
well, I don't know really... it would depend on the arguments that QT expects... what those are, I don't know...

I expect that there's probably some flag to put first to indicate that it's a URL, something like:

qt.exe -url http://...

I guess you could try running the QT player from a DOS window with /? or -help or -? or something and see if it gives you a list of accepted arguments.
 

Posts:4
Registered: 8/3/04
Re: Open media files  
Aug 4, 2004 1:45 AM (reply 4 of 4)



 
I have found the QT for java but Quick Time does not support many important format just like .rm and ram !!

Real Player support a huge number of media formats, does exist a Real Player for Java, similar to the Quick Time one ??

Thanks !!

Simone
 
This topic has 4 replies on 1 page.