Pure Java MPEG or WMV playback

L

luke

I have a client who may need to play either MPEG-1 or Windows Media
videos in a client app or applet (the delivery method is still to be
decided). Since the client platform may be either a Winblows PC or
possibly a Mac, we're pretty much tied to a pure Java solution.

Unfortunately, the pure Java version of JMF does not support MPEG in
any form, unless I can find a plugin codec somewhere to add that
support. Hence my question...

Is anybody aware of any pure Java MPEG-1 or WMV codecs for JMF, or
failing that, a pure-Java MPEG-1 or WMV player component independent of
JMF? I've done quite a bit of looking, but none of my leads has borne
fruit.

Many thanks for any and all input.
Luke
 
D

Daniel Pitts

I have a client who may need to play either MPEG-1 or Windows Media
videos in a client app or applet (the delivery method is still to be
decided). Since the client platform may be either a Winblows PC or
possibly a Mac, we're pretty much tied to a pure Java solution.

Unfortunately, the pure Java version of JMF does not support MPEG in
any form, unless I can find a plugin codec somewhere to add that
support. Hence my question...

Is anybody aware of any pure Java MPEG-1 or WMV codecs for JMF, or
failing that, a pure-Java MPEG-1 or WMV player component independent of
JMF? I've done quite a bit of looking, but none of my leads has borne
fruit.

Many thanks for any and all input.
Luke

I doubt you'll find any. Why not just use the JMF for the target
platform? Yes, its an extra bit to install, but they tend to be
smaller than the pure java version anyway, and will give better
performance.
 
A

Andrew Thompson

Daniel said:
....
...Why not just use the JMF for the target
platform?

The JMF comes in two versions, *neither* of which
provides MPEG support to *Mac's*. (The JMF
'Performance Pack' provides MPEG decode for
Win/*nix - but is not available for Mac. OS).

Andrew T.
 
L

luke

Andrew said:
The JMF comes in two versions, *neither* of which
provides MPEG support to *Mac's*. (The JMF
'Performance Pack' provides MPEG decode for
Win/*nix - but is not available for Mac. OS).

Precisely. Actually, it would also be acceptable to do this in
QuickTime format, but that's the only other format we have available.
And it does definitely need to be pure Java, because of the platforms
we need to support. I'd really like to be able to support Linux and
FreeBSD as well.

No ideas? Bueller? <g>

Luke
 
A

Andrew Thompson

...Actually, it would also be acceptable to do this in
QuickTime format, but that's the only other format we have available.

What?!? I presumed MOV was ruled out, since
you were apparently familiar with the intricacies
of the MPEG situation, but MOV's are supported
on the 'core Java' version of JMF - Mac's should
be able to be played using JMF - just fine.

In fact, here is a test..
<http://www.javasaver.com/testjs/jmf/#test>

According to Daniel Dyer, it worked just fine on a
Mac. (chase the links back to the threads for
more details).

I would appreciate any test results you can
give me, as well.

Andrew T.
 
L

luke

Andrew said:
(e-mail address removed) wrote:
What?!? I presumed MOV was ruled out, since
you were apparently familiar with the intricacies
of the MPEG situation, but MOV's are supported
on the 'core Java' version of JMF - Mac's should
be able to be played using JMF - just fine.

In fact, here is a test..
<http://www.javasaver.com/testjs/jmf/#test>

According to Daniel Dyer, it worked just fine on a
Mac. (chase the links back to the threads for
more details).

I would appreciate any test results you can
give me, as well.

Hmm, yes that type of MOV file seems to work, but not the type
generated by the server-side app I'm using. When I try load the MOV
files I have here, I get the following...

Unable to handle format: MP4V, 352x288, FrameRate=25.0, Length=42853
Unable to handle format: mp4a, 44100.0 Hz, 16-bit, Stereo, BigEndian,
Signed,
FrameSize=32 bits
Failed to realize: com.sun.media.PlaybackEngine@a83b8a
Error: Unable to realize com.sun.media.PlaybackEngine@a83b8a
Failed to realize: input media not supported: mp4v video, mp4a audio

Just my luck, I guess. Some kind of codec issue, perhaps. Actually,
that "MP4V" suggest to me that this is some kind of Quicktime embedded
MPEG4 format, which is an odd choice, given the copyright situation
with MPEG4.

Cheers,
Luke
 
D

Daniel Pitts

Hmm, yes that type of MOV file seems to work, but not the type
generated by the server-side app I'm using. When I try load the MOV
files I have here, I get the following...

Unable to handle format: MP4V, 352x288, FrameRate=25.0, Length=42853
Unable to handle format: mp4a, 44100.0 Hz, 16-bit, Stereo, BigEndian,
Signed,
FrameSize=32 bits
Failed to realize: com.sun.media.PlaybackEngine@a83b8a
Error: Unable to realize com.sun.media.PlaybackEngine@a83b8a
Failed to realize: input media not supported: mp4v video, mp4a audio

Just my luck, I guess. Some kind of codec issue, perhaps. Actually,
that "MP4V" suggest to me that this is some kind of Quicktime embedded
MPEG4 format, which is an odd choice, given the copyright situation
with MPEG4.

Cheers,
Luke

If your server-side is generating the MOV, why not use QuickTime?
Unless you need to do something specific on the client side.
 
L

luke

Daniel said:
If your server-side is generating the MOV, why not use QuickTime?
Unless you need to do something specific on the client side.

I do need to make this a part of a seamless whole, and calling up
QuickTime really doesn't cut it. In any case, it's entirely likely that
there will be Winblows users who don't have QuickTime and who don't
want to load it.

Imagine if YouTube used QuickTime to display media. I don't think
they'd be the size they are at present. Not that this is another
YouTube I'm working on, but the same sort of rules apply (except that
it's not for browser delivery, hence no simple out).

Luke
 
A

Andrew Thompson

I do need to make this a part of a seamless whole, and calling up
QuickTime really doesn't cut it.

You do not need to 'exec' QT. Apple provides a QT API.
<http://developer.apple.com/sdk/>

Of course, that may mean a bigger download of the application,
but using JWS and lazy downloads, you can ensure only those
that need the QT support get the Jar's (and only once they
need them).

If it has been designed well, you might only need
to deliver small parts of it, to support the target media.

OTOH - don't forget to check the current API supports the
particular format(s) you can produce.
...In any case, it's entirely likely that
there will be Winblows users who don't have QuickTime and who don't
want to load it.

(Whispers - the user might never know. Especially if
you fail to follow QT's example of claiming all sorts
of file types for which it apparently supports very few
of the available formats.)
Imagine if YouTube used QuickTime to display media. I don't think
they'd be the size they are at present.

I've never heard of 'YouTube' - how big is it?

Andrew T.
 
D

Daniel Pitts

I do need to make this a part of a seamless whole, and calling up
QuickTime really doesn't cut it. In any case, it's entirely likely that
there will be Winblows users who don't have QuickTime and who don't
want to load it.

Imagine if YouTube used QuickTime to display media. I don't think
they'd be the size they are at present. Not that this is another
YouTube I'm working on, but the same sort of rules apply (except that
it's not for browser delivery, hence no simple out).

Luke

Perhaps you should look into using a Flash client instead of a Java one.
 
L

luke

Andrew said:
You do not need to 'exec' QT. Apple provides a QT API.
<http://developer.apple.com/sdk/>

Of course, that may mean a bigger download of the application,
but using JWS and lazy downloads, you can ensure only those
that need the QT support get the Jar's (and only once they
need them).

If it has been designed well, you might only need
to deliver small parts of it, to support the target media.

OTOH - don't forget to check the current API supports the
particular format(s) you can produce.

Ah. Thanks for that. I had a bit of a look at the QT API, but I found
the website rather skimpy on some details. Are you certain that it runs
without the Quicktime viewer?
(Whispers - the user might never know. Especially if
you fail to follow QT's example of claiming all sorts
of file types for which it apparently supports very few
of the available formats.)

Heaven forfend! I just want to support one format, as long as it's one
of the formats that our back-end can create.
I've never heard of 'YouTube' - how big is it?

YouTube is a website. There's no download involved, but it is "huge"
when it comes to poularity.

Thanks for the advice.

Luke
 
L

luke

Daniel said:
Perhaps you should look into using a Flash client instead of a Java one.

SSSSHHHHHH!!! <g>

Actually, that's just what my employers plan to do, and, to that
effect, I staryed learning Flash last month. After one week, I'd
officially lost the will to live. So I'm hoping to scuttle that Idea
and shift the focus to Java.

Seriously, Flash/ActionScript is outrageous crap as a programming
environment. Fine for animators and graphic, I daresay, but for
programmers? I'd rather go back to coding assembly language with a line
editor.

Luke
 
L

luke

Ah. Thanks for that. I had a bit of a look at the QT API, but I found
the website rather skimpy on some details. Are you certain that it runs
without the Quicktime viewer?

Eek! I just checked again and noticed that it's called the "QuickTime
for Java Windows SDK". No use to me, because I want to support MacOS as
well, as a minimum.

Luke
 
A

Andrew Thompson

....
Eek! I just checked again and noticed that it's called the "QuickTime
for Java Windows SDK". No use to me, because I want to support MacOS as
well, as a minimum.

Aaarggh! I feel dirty. How dare they offer up a Windows
specific, Java based API?!

(That's me out of ideas, sorry)

Andrew T.
 
J

John Ersatznom

SSSSHHHHHH!!! <g>

Actually, that's just what my employers plan to do, and, to that
effect, I staryed learning Flash last month. After one week, I'd
officially lost the will to live. So I'm hoping to scuttle that Idea
and shift the focus to Java.

Seriously, Flash/ActionScript is outrageous crap as a programming
environment. Fine for animators and graphic, I daresay, but for
programmers? I'd rather go back to coding assembly language with a line
editor.

Isn't Flash also much more dangerous vis-a-vis vendor lockin and
"licensing" issues? I don't recall the tools being free (as in beer OR
speech) or anyone else being able to offer compatible ones besides
Macromedia. Using Flash instead of Java probably carries the same grave
risks as using Microsoft Visual C++ instead of Java, except that at
least in the latter case you have a credible chance at eventually
porting it to just-plain-ANSI C++...
 
L

luke

John said:
Isn't Flash also much more dangerous vis-a-vis vendor lockin and
"licensing" issues? I don't recall the tools being free (as in beer OR
speech) or anyone else being able to offer compatible ones besides
Macromedia. Using Flash instead of Java probably carries the same grave
risks as using Microsoft Visual C++ instead of Java, except that at
least in the latter case you have a credible chance at eventually
porting it to just-plain-ANSI C++...

True enough. And the quality of those expensive tools (again, as
programming tools) is astonishingly poor when set against the price. To
the point that the people here are using an open-source code editor
(called Sepy) along with the Flash designer just to get little things
like syntax highlighting and code completion. Phooey!

I think that is the biggest issue. Poor quality tools, and a nasty,
difficult language, all of which slows development. Moreover, there is
an enormous skills shortage in Flash programming, and I'm not
surprised. I sure as hell don't feel inclined to fill the gap. ;^)

Thanks to all for the suggestions. I'll keep looking.

Luke
 
A

Andrew Thompson

John Ersatznom wrote:
.....
Isn't Flash also much more dangerous vis-a-vis vendor lockin and
"licensing" issues?

I don't know, but I'm glad you reminded me, cause it
made me think of something I meant to mention.
I would install the (quirky and problematic) QuickTime
on my PC, but never Flash. There are two many security
concerns with it, for too little value.

(Just a point that some users will not only need to install
Flash, if it is an application depencency, but some will
reject the application - before they'll install Flash. I do not
understand why it was brought up as though it were some
sort of 'generic' thing that everybody has.)

Andrew T.
 
L

luke

Andrew said:
Aaarggh! I feel dirty. How dare they offer up a Windows
specific, Java based API?!

(That's me out of ideas, sorry)

Well, it was certainly hard to find, but I finally stumbled across an
all-java MPEG-1 codec for JMF. Oddly enough, it turned up in a
Wikipedia article on JMF. All hail Wikipedia, I guess. ;^)

You can find it here, if you're interested...

http://jffmpeg.sourceforge.net/

And I searched Sourceforge too!

Cheers,
Luke
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,982
Messages
2,570,185
Members
46,736
Latest member
AdolphBig6

Latest Threads

Top