Hi Everybody
I am trying to play a MPEG4 Video in JMF over a HTTP server. I tried to write an applet to play this mpeg4 video over HTTP using javax.media package.

So, can anyone tell me any solution for this problem?
regards
Jyotirmoy

Hi
My problem is that when i tried to play a mpeg in JMF player using HTTP,it shows an error that it could not create player for mp4.

But whwn I am playing .mp4 for local PC,it runs fine.

So,can you tell me any solution for that?
Jyotirmoy

You just repeated what you had posted earlier but that does not describe anything about the problem. Make some effort to describe your problem please.

First I install JMF 2.1.1e. After that I install Fobs4JMF and made necessary changes to JMF Registry's Plugin tab. Now I can play a mpeg4 movie by selectng a file from option File->Open File.

But my problem is that when I select a file from option File->Open URL.. (http://localhost/surf.mp4) , player shows an error that it could not create a player for mp4.

My aim is to write an applet which will play a mpeg4 movie (.mp4) over a http server (I am using Apache server).

I belive this description will help you to understand the problem.

So, Can you tell me what is the reason for this error? Am I making some error and what is the solution?

Regards,
Jyotirmoy

Security restrictions won't allow the applet to read from other sites, so that could be causing the problem, even though you are using localhost. The movie and applet will need to be on the same server, which you should then be using open file instead anyway.

My movie and applet reside on the same http server.

I am not very sure whether my problem is yet clear to you.
Let me try to explain once again.

My ultimate goal is to write an applet that can play a MPEG-4 movie.
The movie will reside on the same http server where the applet resides(For initial development, the HTTP server is on my local machine).

I planned to use JMF for that. But JMF has no in-built support for MPEG-4. It has built-in support for MPEG-1 only and I can play any
MPEG-1 file in my JMF studio using file protocol, as well as http protocol. To add MPEG-4 support to JMF, I tried the following free/open-source JMF plugins
1. MPEG-4 plugin for JMF by IBM(http://www.alphaworks.ibm.com/tech/mpeg-4)
2. open-source FOBS4JMF(http://fobs.sourceforge.net/index.html)
3. JMF plugin SJMF(http://www.salyens.com/)

After adding any of these plugins, the JMF studio on my machine can now play any MPEG-4 movie residing in my machine using file protocol. But it can't play the same movie using http protocol. This inability to play movie over HTTP is documented for some JMF plugins also.

Now I want to know whether there is any JMF plugin that supports it.
Or is there any other way out?

I still don't get why you're using HTTP instead of reading it as a file. If both applet and mpeg4 are on the same machine, you just read it as a file.

The http server is in my local machine. So I can open it using file protocol. But remote clients won't be able to open it using file protocol. They have no option other than HTTP.

But the clients aren't the ones opening the file, the applet is. And as far as the applet is concern, those are just local files. How the user connects to the player should make no difference on how the applet loads the file.

Hi,

I was just browsing around when I saw this. Sorry jyotirmoy, I don't have an answer for you. All I can say from my own experience is that your problem might not be file vs HTTP, but one of a Java Application vs an Applet. An Applet doesn't have the same permissions that an application does, and near as I can tell sometimes hunts for classes in different places than your classpath. I don't know much about JMF, but it sounds like either a class is unavailable to the applet or a registration file is misset.

Anyway, what prompted me to post is a correction to Phaelax's statement.. an Applet runs on the user's machine, not the server. Therefore, the Applet sees things much as the client does, and must connect via a network protocol like HTTP. If the applet tries to reference c:\my_file.avi, it won't get my_file.avi from the server, it will try to get it from the client's hard drive (and promptly suffer a security violation exception for trying to do something illegal).

Or so I understand it.

Hi
My problem is that when i tried to play a mpeg in JMF player using HTTP,it shows an error that it could not create player for mp4.

But whwn I am playing .mp4 for local PC,it runs fine.

So,can you tell me any solution for that?
Jyotirmoy

I have the same problem with you. even I open the url file via application.

The application can play MPEG4 file which in local hard drive, but can't play the url MPEG4 file.

...but did anyone find a solution to this problem in the meantime?

I have the same problem with you. even I open the url file via application.

The application can play MPEG4 file which in local hard drive, but can't play the url MPEG4 file.

This article has been dead for over six months. Start a new discussion instead.