Playing MPEG4 files on Linux with JMF
Hi all,
Is it possible to get MPEG4 files to play through the JMF on Linux?? I've been stumped at this for quite a while now and is hoping for some help...
The area's i found and look at are
http://www.onjava.com/pub/a/onjava/2002/12/23/jmf.html - this provides a brige between QT for Java and the JMF but these's no version for Linux, only windows and mac...
the ibm is an evaluation copy only and displays a nasty ibm in the corner so is no good..
Please help, i'm stumped...
hi there,
I got the IBM logo from reading the documentation that you can download with the codec, it says:
Q: How can I disable the IBM logo that appears on the video?
A: The logo appears on this evaluation version. The licensed version will not have any logo shown.
From that i was scared away and just didn't install the codec, well after reading you notes, i've installed the codec and placed it in the JMFRegistry. Just one problem, how do you get/tell java to use it, as my program still won't run an mpeg4 movie.
Here's what my JMFRegistry (in plug-ins/codec) says once i've installed codec:
Input Formats---->
0. javax.media.format.VideoFormat
H263
1. javax.media.format.VideoFormat
H263/RTP
2. javax.media.format.VideoFormat
MP4I
3. javax.media.format.VideoFormat
MP4I/RTP
4. javax.media.format.VideoFormat
DIVX
5. javax.media.format.VideoFormat
DX50
6. javax.media.format.VideoFormat
DM4V
7. javax.media.format.VideoFormat
MP4V-ES/RTP
Output Formats--->
0. javax.media.format.YUVFormat
YUV Video Format: Size = null MaxDataLength = -1 DataType = class [B yuvType = -1 StrideY = -1 StrideUV = -1 OffsetY = -1 OffsetU = -1 OffsetV = -1
1. javax.media.format.RGBFormat
RGB, -1-bit, Masks=-1:-1:-1, PixelStride=-1, LineStride=-1
Similar Messages
-
JMF Not playing wav files in Linux
Hi all,
I'm using the code below to play a simple wav file in Linux:
==
import java.io.IOException;
import java.net.MalformedURLException;
import java.net.URL;
import javax.media.ControllerEvent;
import javax.media.ControllerListener;
import javax.media.EndOfMediaEvent;
import javax.media.Manager;
import javax.media.MediaLocator;
import javax.media.NoPlayerException;
import javax.media.Player;
* @author
public class AudioTest implements ControllerListener {
/** Creates a new instance of AudioTest */
public AudioTest() {
public static Object syncObject = new Object();
public static void main(String args[]) throws InterruptedException {
try {
URL url = new URL("file", "", "/magichome/xruser/jmf/WindowsXPStartup.wav");
String mediaFile = url.toExternalForm();
System.out.println(mediaFile);
MediaLocator mediaLocator = new MediaLocator(mediaFile);
System.out.println(mediaLocator);
if(mediaLocator != null) {
try {
AudioTest test = new AudioTest();
//Player player = Manager.createPlayer(mediaLocator);
Player player = Manager.createPlayer(url);
player.addControllerListener(test);
System.out.println(player);
player.start();
synchronized(syncObject) {
syncObject.wait();
player.stop();
player.close();
System.out.println("CLosed...");
Thread.sleep(10000);
System.exit(0);
} catch (NoPlayerException ex) {
ex.printStackTrace();
} catch (IOException ex) {
ex.printStackTrace();
} catch (Error err) {
err.printStackTrace();
//com.sun.media.amovie.AMController@9fef6f
} catch (MalformedURLException ex) {
ex.printStackTrace();
public void controllerUpdate(ControllerEvent event) {
System.out.println(event);
if (event instanceof EndOfMediaEvent) {
synchronized(syncObject) {
syncObject.notify();
}==
But on running the above program with the following commands:
/usr/java/j2sdk1.4.2_08/bin/javac -classpath /magichome/xruser/jmf/jmf.jar:./:/magichome/xruser/jmf/mediaplayer.jar:/magichome/xruser/jmf/multiplayer.jar:/magichome/xruser/jmf/sound.jar:customizer.jar AudioTest.java
/usr/java/j2sdk1.4.2_08/bin/java -classpath /magichome/xruser/jmf/jmf.jar:./:/magichome/xruser/jmf/mediaplayer.jar:/magichome/xruser/jmf/multiplayer.jar:/magichome/xruser/jmf/sound.jar:customizer.jar AudioTest
I get the following error:
==
file:/magichome/xruser/jmf/WindowsXPStartup.wav
file:/magichome/xruser/jmf/WindowsXPStartup.wav
com.sun.media.content.unknown.Handler@1ee4648
javax.media.TransitionEvent[source=com.sun.media.content.unknown.Handler@1ee4648,previous=Unrealized,current=Realizing,target=Started]
javax.media.DurationUpdateEvent[source=com.sun.media.content.unknown.Handler@1ee4648,duration=javax.media.Time@1e8a1f6
javax.media.RealizeCompleteEvent[source=com.sun.media.content.unknown.Handler@1ee4648,previous=Realizing,current=Realized,target=Started]
javax.media.TransitionEvent[source=com.sun.media.content.unknown.Handler@1ee4648,previous=Realized,current=Prefetching,target=Started]
Unable to handle format: LINEAR, 22050.0 Hz, 16-bit, Stereo, LittleEndian, Signed, 88200.0 frame rate, FrameSize=32 bits
Failed to prefetch: com.sun.media.PlaybackEngine@91cee
Error: Unable to prefetch com.sun.media.PlaybackEngine@91cee
javax.media.ResourceUnavailableEvent[source=com.sun.media.content.unknown.Handler@1ee4648,message=Failed to prefetch: cannot open the audio device.]
==
I'm unable to isolate the problem here. When I play the file with mplayer, it plays just fine. But with the code above, it just does not wish to play..
Can someone please point out the error I am commiting.
ThanksI'm using the code below to play a simple wav file in
Linux:I'm running the performance pack under Win XP, here..
try {
URL url = new URL("file", "", "/magichome/xruser/jmf/WindowsXPStartup.wav");
...Is that a linear encoded, 16 bit, stereo sample
recorded at 22050Hz sample rate? 4.81 seconds
(424,644 bytes), content type audio.x_wav?
The reason I ask is just that you do not mention if
you'd tested on any other OS, and I found a very
similarly named WAV of the above description on
my system and tried it with your code - and in
JMStudio.
It ran flawlessly in both.
But on running the above program ...
I get the following error:...
file:/magichome/xruser/jmf/WindowsXPStartup.wav
file:/magichome/xruser/jmf/WindowsXPStartup.wav
com.sun.media.content.unknown.Handler@1ee4648...
Unable to handle format: LINEAR, 22050.0 Hz,
16-bit, Stereo, LittleEndian, Signed, 88200.0 frame
rate, FrameSize=32 bits...
I'm unable to isolate the problem here. When I play
the file with mplayer, What is 'mplayer'? The default media player
of the OS?
..it plays just fine. But with
the code above, it just does not wish to play..
Can someone please point out the error I am
commiting.I cannot tell what the problem is, sorry. Just
thought I should check in and note there is
nothing wrong with the code, and that WAV
is sure understood by Windows based JMF. -
Playing .dcr files on linux-based server
Hi there. So I've got situation like this:
I would like to present .dcr files on my site (modified
Coppermine gallery). And it would be great if I could play these
files with internal player (or sth like this) and not count that my
visitors have a plugin installed.
The point is that only about 55% of Windows users can play
.dcr files (via browser), not even mention Linux users. So I would
like to let my visitors play in games (.dcr files) without any
actions from their side.
Is it possible guys?Oops. didn;t mean to hit send ;). No, I really don't think
this is possible.
The browser needs to know how to interpret the DCR file (as
it does a SWF
file) - hence the need to download the Shockwave or Flash
plugin in the
first place.
Remove '_spamkiller_' to mail -
Play wav file on PDA using JMF
Hi all,
I need to play wav files on a PDA so I installed J9 on the PDA and downloaded either JMF crossplatform and JMF for windows (version jmf 2.1.1.e for both of them).
I included in the classpath the jmf.jar from JMF crossplatform and sound.jar from JMF for windows (the JMF crossplatform doesn't have the sound.jar and jmf.jar requires some classes contained in it).
When I run my testing application I have such an error:
Unable to handle format: LINEAR, 8000.0 Hz, 8-bit, Mono, Unsigned, 8000.0 frame rate, Framesize=8 bits
Failed to prefetch: com.sun.media.PlaybackEngine@287a287a
Error: Unable to prefetch com.sun.media.PlaybackEngine@287a287a
I have the same error playing wav files with different features (8 or 16KHz, 8 or 16 bits ).
Can anyone help me?
Any suggestion is welcome. Thanks in advance!
Message was edited by:
pirascrsnot really I have seen it. The only buyable version left is IBM j9. All the rest basically are sold to handset manufacturers.
Its hectic out there. I still cant play audio on J9 to build a simple tourist guide!!!!
javajoom is for wtk21 - hello its 2007.
Oh well lets toss pda's out of the window along with Microsoft's OS and use smart phone OS - or should I toss J2me and start on C# to be on the safe side???
Has anyone an answer? -
Are there any apps or hacks that anyone is aware of that will allow me to play FLAC files in iTunes?
I do not want to convert my FLAC files to another format to use - it would be too difficult to synchronise the tags and song ratings from the mp3 files (or whatever formats itunes supports) back to my ''archived' FLAC files.
Yet I really enjoy iTunes' playlist functions - no other players compare. I am hoping to have the best of both worlds: FLAC and iTunes cataloguing features. A search through the web and these forums makes me think it is not possible.
Any links or suggestions? Or do I need to choose between FLAC and ITunes for realsies?Firstly, playing Flac in iTunes is an altogether different animal than playing them on your iOS device and is something you never asked about. For that you'll need to Google "Fluke FLAC" if you're still running Lion or older. If you're running a newer Mac OS I haven't yet heard of a solution for playing FLAC in iTunes and you'll have to resort to a third party app like Vox.
For most FLAC playing iOS apps you'll add your music files via the "file sharing" section at the bottom of your Apps tab in iTunes when your iPod touch is plugged in.
As for Flac Player specifically the high price coupled with some reported problems I heard when looking into it had me steering clear so I can't offer first hand reports on THAT program.
Since it sounds like you've been longing to play FLAC on your iPod touch for quite some time I was simply offering a bevvy of options to do just that I know of, including some free ones.
Hopefully someone will stumble across this thread and chime in with feedback about THAT app specifically for you. -
Playing .mov files from iMovie with Quitime for Windows
Hi,
Been searching but cannot seem to find a straight answer on this in these forums. My wife has a mac, we import all movies on to that using iMovie 08. I want to simply play the same movies on my PC. I copy the .mov files over, run them in quicktime and get audio but no video, just a black screen. Same for any other player. Quicktime Movie Inspector shows the following:
Format: 'm2v1', 768x576, Millions, 16-bit integer (Little Endian), Left, 48:000 khz, Right, 48:000
Movie FPS: 25.00
Playing FPS: 25.00
Data size: 7.26 MB
Rate: 5.97 mbits/sec
Current time: 00:00:10:20
Duration: 00:00:10:20
Normal Size: 768x576 pixels
Current size: 768x576 pixels
My first prefernce would be to just find a player that I can use to run the videos on the PC without converting them. If not, then if there is a simple way to convert please let me know. I just want to play these files, not edit them.
Cheers,
Scott.The PAL sized QuickTime file is in its "raw" codecs found in iMovie.
To view it on any other machine it should be compressed with "delivery" codecs like H.264 video and AAC audio. Do this directly in iMovie. -
Playing 3gpp or mp4 contents with JMF
Hi everyone
I try to send encoded(3gpp or mp4 ) video chunk in byte array from mobile phone and play it pc side in java.
But I could'nt play it. JMF does not support these content type. how do I achive this problem. It must have a solution!!:S
thanks..
Gökhan..There's a small chance that the AVI has been created with a codec the mac doesn't support. Go to a windows machine, download GSPOT (I kid not). Do a search for GSPOT and codec just to be on the safe side
GSPOT will tell you exactly what the codecs are within the file. Cross reference this with Perian and you should be good.
regards
Paul -
Pause/Play Wav Files Not working with timeline
OK, I'm going crazy here. I have imported a WAV file into my
Flash timeline. I have a button that pauses the timeline, and also
stops all sound. But... when I click on the play button to continue
the movie, the sound is no longer present. It's as if the timeline
only recognizes the first frame of audio, even within the source
file if I put the cursor anywhere besides the first frame of audio,
it does not play.
Any help desperately neededI almost have you. The code provided, I guess I would put
that on the frame where I redrop my wave file (that I did all the
link changes to as described).
Also, in conjunction with the code provided, do I need to
also put codes in for my buttons, or will that script you provided
take place of such.
Also, the code you provided, am I to put my own information
in there, or is it set to go as is.
I will only have a play button and a stop button. Just a
simple a play and stop action for each. Also, I didn't give an
instance name for each button, just default as is.
Almost there! I'm excited, thanks for help and hopefully more
help! -
Transmit video file on Linux not working
Hello everybody!
I am trying to transmit a video file over network on Windows and Linux. I am using the AVTransmit2.java example from Sun's JMF Solusions website. I discovered lot of problems with .avi and .mov files, becouse the JMF-Processor throws the exception :
Video transmitted as:
JPEG/RTP, 320x240, FrameRate=16.1
Failed to realize: com.sun.media.ProcessEngine@194ca6c
Cannot build a flow graph with the customized options:
Unable to transcode format: YUV Video Format: Size = java.awt.Dimension[width=320,height=240] MaxDataLength = 0 DataType = class [B yuvType = 2 StrideY = 320 StrideUV = 160 OffsetY = 0 OffsetU = 76800 OffsetV = 96000
to: JPEG/RTP, 320x240, FrameRate=16.1
outputting to: RAW/RTP
Error: Unable to realize com.sun.media.ProcessEngine@194ca6c
I understand that there are lot of formats JMF do not encodes, but I found a solution just by saving (exporting) a video captured stream from webcam to a file. Becouse the file is created by JMF it should allways work.
For my suprise I can transmit a (captured) video file on Windows using JMF windows performance pack, but I can not transcode the file on Linux (with JMF linux performance pack) but why?
It also works with JMStudio on Windows, but it does not with JMStudio on Linux.
Is there such a big difference between JMF for Windows and Linux?
Thanks for halp.
AdamMacBook Pro
https://discussions.apple.com/community/notebooks/macbook_pro
https://discussions.apple.com/community/mac_os
http://www.apple.com/support/macbookpro -
Problems playing flash v2 files with JMF 2.1.1
Hello,
I'm having troubled playing a flash version 2 file. I have a simple player that is able to play any file supported by the JMF api but flash.
Somebody can helped me, please?
Thanx!I wouldn't spend much time worrying about it. Flash 2 is a dead format, and neither Sun nor Macromedia have any strong interest in providing updated support.
-- Kevin -
Can't play mp3 file through RTP
I created an server/client application to play remote file through RTP using JMF. However, it works with *.wav and video track of mpg file only, can't work when playing *.mp3 and audio track of mpg file. Do anyone know the reason?
No any errors.
I just follow the code sample "AVTransmit2" & "AVReceive2" and change the format.
I change the format of mpg file audio stream to G723, it works now! So I think I used wrong format, but I found there is only two supported RTP format for mp3 file and it doesn't work for both of them. -
Why can i not play mpeg4 files on my Mac? I have a new video recorder (flash card type) but cannot download the movies even though the camera is supposed to work with imovies. I've been told i may need to install a driver to play/download mpeg4 files. I also can't play avi files. I have a converter that would convert the files to work but this would take ages for movie editing. Any help would be appreciated.
Probably not a problem with your MacBook, so you might need to repost this in another board, such as the iMovie forum for the version you're using.
I've got one suggestion: download & install the Perian set of codecs and see if that helps:
http://www.versiontracker.com/dyn/moreinfo/macosx/30931
If that doesn't do the trick, go here:
http://discussions.apple.com/category.jspa?categoryID=141
And look at the top for the version of iMovie you are using. Repost this topic over there & those folks will try to help you.
Good luck!
~Lyssa -
This html code only plays midi file in IE, not Safari - why?
<html>
<title>New York</title>
<bgsound src="http://home.earthlink.net/~maugustine2/daydream/bachair.mid" loop="0">
<body bgcolor="#CCCC98">
</html>
With this code, the midi file: bachair.mid will only play with IE 5.2/mac, not Safari 2.0.1 / 10.4.2
Safari will play the midi file with a direct link: http://home.earthlink.net/~maugustine2/daydream/bachair.mid - so it's not a problem with safari midi functions, only this code.
The page containing this code is at: http://home.earthlink.net/~maugustine2/daydream/DDhead.htm
Again - IE 5.2/mac plays the midi file with this code and Safari doesn't. Any help is very appreciated! I'm sure it's something very simple.
MarkThanks for the hint, I found this code - both lines will play the file in Safari - but they also make IE play the file twice! (with an echo). Safari seems to need both to play anything - IE plays it with either one! Any further ideas much appreciated! btw - I am >not< using this to play music on a home page - only a specific goofy little subpage - shouldn't be bothersome for anyone!
bgsound src="http://home.earthlink.net/~maugustine2/daydream/bachair.mid"
embed src="http://home.earthlink.net/~maugustine2/daydream/bachair.mid" hidden="TRUE" autostart="TRUE" loop="0"
/embed -
No Audio/Video when playing a file (timer bar moves though)
As the title says, the timer bar moves showing that the codecs are there. I'm using K-lite codec pack/Media Player Classic and everything works fine. I have also updated Itunes (installing the latest version of quicktime forced my hand on that one) so everything is up to date. Originally i thought it was all the codecs i had installed in the past conflicting with each other so i wiped out everything and just tried installing Quicktime by itself and adding the Divx codec afterwards but i still get the same problem.
Now you may ask, i can play any file i want with MPC, whats the problem? And here it is.. I want to be able to import videos to Photoshop CS3 Extended and apparently it runs off Quicktime so if my quicktime doesn't work, neither will my videos in photoshop.
To summarize:
-Right now i have MPC+Klite codecs installed along with the latest version of Itunes and Quicktime
-My goal is to be able to play avi files with my quicktime.
Any help would be appreciated, thanks for reading.41 views and no replies, no one has even at least an idea to suggest? =(
im willing to try anything short of a reformat. -
Play audio file with jmf on linux?
a simple audio player as flow:
import javax.media.*;
import java.io.File;
import java.net.URL;
public class SimpleAudioPlayer {
private Player audioPlayer = null;
public SimpleAudioPlayer(URL url) throws Exception {
audioPlayer = Manager.createRealizedPlayer(url);
public SimpleAudioPlayer(File file) throws Exception {
this(file.toURL());
public void play() {
audioPlayer.start();
public void stop() {
audioPlayer.close();
public static void main(String[] args) throws Exception {
File file = new File("/usr/local/download/1.wav");
SimpleAudioPlayer sap = new SimpleAudioPlayer(file);
sap.play();
}when run the program
javac -cp jmf.jar SimpleAudioPlayer.java
java -cp .:jmf.jar SimpleAudioPlayer
the output as flow:
Unable to handle format: ima4/ms, 8000.0 Hz, 4-bit, Mono, Unsigned, 4027.0 frame rate, FrameSize=4096 bits
Failed to prefetch: com.sun.media.PlaybackEngine@defa1a
Error: Unable to prefetch com.sun.media.PlaybackEngine@defa1a
How can I play wav file with jmf on linux?(OS is debian5 and jmf cross-platform pack)thanks for your reply.
I tried to replace the wav file "1.wav" with the linear encoded WAV download from pscode.org,and run the code again,but
BasicTrackControl:prefetchTrack():96 1 bm = com.sun.media.BasicRendererModule@1186fab
BasicRendererModule.doPrefetch:155 Render : true
Render buffer size: 32768
BasicRenderModule.doPrefetch:159
javax.media.ResourceUnavailableException: Cannot intialize audio device for playback
at com.sun.media.renderer.audio.JavaSoundRenderer.open(JavaSoundRenderer.java:93)
at com.sun.media.BasicRendererModule.doPrefetch(BasicRendererModule.java:158)
at com.sun.media.BasicTrackControl.prefetchTrack(BasicTrackControl.java:99)
at com.sun.media.PlaybackEngine.doPrefetch1(PlaybackEngine.java:682)
at com.sun.media.PlaybackEngine.doPrefetch(PlaybackEngine.java:658)
at com.sun.media.PrefetchWorkThread.process(BasicController.java:1430)
!!!!!!!§§§§§§§§§§§ BasicTrackControl:prefetchTrack():96
at com.sun.media.StateTransitionWorkThread.run(BasicController.java:1339)
Unable to handle format: LINEAR, 16000.0 Hz, 16-bit, Mono, LittleEndian, Signed, 32000.0 frame rate, FrameSize=16 bits
Failed to prefetch: com.sun.media.PlaybackEngine@26e431
Error: Unable to prefetch com.sun.media.PlaybackEngine@26e431
Maybe you are looking for
-
Growing PDF File Size is Pathetic
Hey all, I have been using Acrobat for a number of years but ever since my organization updated me to v9, this growing file size is pathetic! If I move a button on a form, the file size grows 100k. If I add a field, the file size grows 100k. I starte
-
Weird X on corner of copied file over the network
i was copying a file from my Mac Pro (Lion) to my MBP (ML) over the network and i noticed this little x in a black box on the top left hand corner of the icon while it was being copied. does anyone know if this is normal? the two little red marks mea
-
How do I manually white balance my three Sony HDR-HC1 hidef (consumer) video cameras in a dark theater? I produce DVDs of ballets for a local ballet company and I have trouble with color disparities between different camera angles when I am editing t
-
Default Unicode encoding on SAP ERP?
Hello there! Who could help me out and tell me where I can find official SAP information about what is the default Unicode encoding if I choose to install SAP ERP Unicode system. Is it UTF-8 or UTF-16? Installer does not ask this question, it just as
-
Dashboard customization during weblogic server deployment
Hi, We have this requirement to customize dasboard style (bg_banner.jpg) and we have done customization in 's_custom' folder at the following locations <b><install_dir>\OracleBI\web\res\s_custom </b> and <b> <install_dir>\OracleBI\oc4j_bi\j2ee\home\a