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

Similar Messages

  • 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
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • To Decode and play  MPEG-2 Video files with JMF

    Hi ALL,
    I amin serious trouble with a problem. I am developing a Simulator, a function of which is to decode MPEG-2 Video files in real time and play it as well.I have got a MPEG-2 Decoder implemented in C from an open source and need to integrate with my Simulator which is writtebn in Java. The integration part I am doing via JNI(Java Native Interface). Now I have a bunch of C files in MPEG-2 decoder which are to be compiled during the Execution of the Java Simulator.Can anybody give some idea about how to call multiple C files from the Java Source through JNI at one go? Another problem I am facing is in calling a single C code from the traditional "HelloWorld" Java Code itself. The problem comes when I am trying to compile the shared library between the C native code and Java Code in my Linux Machine...I am getting the following message:
    /usr/lib/gcc-lib/i386-redhat-linux/2.96/.../../../crt1.0 : In function '_start' :
    /usr/lib/gcc-lib/i386-redhat-linux/2.96/.../../../crt1.0(.text+0x18): undefined reference to 'main'
    collect2: ld retrurned 1 exit status

    Duplicate; reply to http://forum.java.sun.com/thread.jsp?forum=54&thread=478434

  • How to use JFFmpeg with JMF

    Hi ,
    I am trying to use Jffmpeg with JMF to extend the supported format in JMF. I added jffmpeg-1.1.0.jar in class path variable.And I also made necessary changes to JMF Registry for JFFMPEG given in following url:
    http://jffmpeg.sourceforge.net/download.html
    But I could not play any mp4 video with JMF Studio.
    So,can any one help me to solve this problem?
    Thanks in advance
    Regards,
    Jyotirmoy

    This may not help much re Solaris, but is worth putting up here for reference for others, whilst the code structure may also be useful anyway being close to pure java and as a solution that reads & saves every frame.
    For Windows the folder in the zip includes Fobs4jmf, and - if necessary - setting preferences via the runjmstudio.bat should mean that the sun.bat will work for .mp4 and .flv video files.
    See vid2jpg.zip at http://www.exactfutures.com/index02.htm which includes the java source.

  • A script to force acrobat to play avi content with built in flash player instead of quicktime

    Hello, is there a script that would force acrobat to play embedded avi content with the built in flash player instead of the quicktime player?  first reason is that the built in quicktime player doesn't play the avi files anyway (for me at least); and second is that there are hundreds of sound clips in the pdf, and it is likely that i will have to revise the document and export again, so I can't manually change the properties of each sound clip to open with flash player.  Any thoughts would be appreciated.

    Buy software have wmv to Vp6 function.

  • HT4072 can't play video files (mp4, avi, mkv) with 5.1 audio tracks

    I have two Macs, one with a mini-optical out and no audio through its mini-displayport, and the other that supports digital audio out through its mini-displayport. On either of my Macs, how can I play video files (mp4, avi, mkv) in 5.1 using Quicktime or iTunes or VLC? I've heard I need Perian. Is this true? If so, how do I configure it on either machine?
    Note that when I connect the computer that supports audio through the mini-displayport to my receiver, my home theater receiver detects a PCM audio connection, but the audio I get out of my speakers is still stereo.
    Both computers are running Snow Leopard. I haven't had the need to upgrade to Lion yet, but if the answer is that I need Lion do do this, I'd spend the $29.
    Thanks for the help!

    daedalusman wrote:
    This just happened for the first time with an .mkv file I was trying to play. It started fine but then after selecting a menu option in smplayer the video disappeared. It didn't go black, the player just stopped presenting the video. In other words the player switched to audio playback mode only, the window was unable to go into fullscreen or be resized. Smplayer still works with other HD files. Deleting the config directory fixes the problem until I select a menu option, such as, setting the audio to 5.1, then the video portion disappears again.
    Does anyone know what is going on here or have any ideas on how to fix this issue?
    Thanks for any help provided.
    that's because now mplayer they switch to libavformat demuxer for mkv and ogg and i think is a bug in smplayer because is making some configuration for files in file_settings in which is sets demuxer & co. this switch is confusing smplayer and it should be reported upstream
    p.s if you actually select demuxer from smplayer to mkv it would work perfectly

  • Play movie with JMF

    Hey,
    I just started out with JMF (I wanted to play a movie with java).
    I got this code:
    import java.applet.*;
    import java.awt.*;
    import javax.swing.*;
    import java.net.*;
    import java.io.*;
    import java.util.*;
    import javax.media.*;
    * Demonstrate simple code to play a movie with Java Media Framework.
    * @author Ian F. Darwin, http://www.darwinsys.com/
    * @version $Id: JMFPlayer.java,v 1.9 2004/02/09 03:21:20 ian Exp $
    public class NewJApplet extends JPanel implements ControllerListener {
        /** The player object */
        Player thePlayer = null;
        /** The parent Frame we are in. */
        JFrame parentFrame = null;
        /** Our contentpane */
        Container cp;
        /** The visual component (if any) */
        Component visualComponent = null;
        /** The default control component (if any) */
        Component controlComponent = null;
        /** The name of this instance's media file. */
        String mediaName;
        /** The URL representing this media file. */
        URL theURL;
        /** Construct the player object and the GUI. */
        public NewJApplet(JFrame pf, String media) {
            parentFrame = pf;
            mediaName = media;
            // cp = getContentPane();
            cp = this;
            cp.setLayout(new BorderLayout());
            try {
                theURL = new URL(getClass().getResource("."), mediaName);
                thePlayer = Manager.createPlayer(theURL);
                thePlayer.addControllerListener(this);
            } catch (MalformedURLException e) {
                System.err.println("JMF URL creation error: " + e);
            } catch (Exception e) {
                System.err.println("JMF Player creation error: " + e);
                return;
            System.out.println("theURL = " + theURL);
            // Start the player: this will notify our ControllerListener.
            thePlayer.start(); // start playing
        /** Called to stop the audio, as from a Stop button or menuitem */
        public void stop() {
            if (thePlayer == null) {
                return;
            thePlayer.stop(); // stop playing!
            thePlayer.deallocate(); // free system resources
        /** Called when we are really finished (as from an Exit button). */
        public void destroy() {
            if (thePlayer == null) {
                return;
            thePlayer.close();
        /** Called by JMF when the Player has something to tell us about. */
        public synchronized void controllerUpdate(ControllerEvent event) {
            // System.out.println("controllerUpdate(" + event + ")");
            if (event instanceof RealizeCompleteEvent) {
                if ((visualComponent = thePlayer.getVisualComponent()) != null) {
                    cp.add(BorderLayout.CENTER, visualComponent);
                if ((controlComponent = thePlayer.getControlPanelComponent()) != null) {
                    cp.add(BorderLayout.SOUTH, controlComponent);
                // re-size the main window
                if (parentFrame != null) {
                    parentFrame.pack();
                    parentFrame.setTitle(mediaName);
        public static void main(String[] argv) {
            JFrame f = new JFrame("JMF Player Demo");
            Container frameCP = f.getContentPane();
            NewJApplet p = new NewJApplet(f,
                    argv.length == 0 ? "file:/C:/Users/Patrick Kos/Pictures/BAA.avi"
                    : argv[0]);
            frameCP.add(BorderLayout.CENTER, p);
            f.setSize(200, 200);
            f.setVisible(true);
            f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    }but I always get a unable to handle format exception, expect with mp3 files.
    But i"ve looked up the supported formats and its says its supported so??

    i get this error
    Unable to handle format: XVID, 320x240, FrameRate=29.9, Length=230400 0 extra bytes
      Unable to handle format: unknown, 22050.0 Hz, 0-bit, Stereo, Unsigned, 8000.0 frame rate, FrameSize=9216 bits
    Failed to realize: com.sun.media.PlaybackEngine@7259da
    Error: Unable to realize com.sun.media.PlaybackEngine@7259da
    Exception in thread "main" javax.media.CannotRealizeException
            at javax.media.Manager.blockingCall(Manager.java:2005)
            at javax.media.Manager.createRealizedPlayer(Manager.java:580)
            at projectnemo.NewJApplet.main(NewJApplet.java:102)

  • Play sdp file with JMF

    Hi,
    I have a Darwin Streaming Server(DSS) running on a machine, that reflects several broadcasts from other machines (I'm broadcasting to the DSS with JMF).
    I can see all the videos and audio without any problem with Quick Time, but I can't find a way to play the sdp files with jmf. I've searched the web for jmf and sdp, and there isn't much information, i've also tried to play with JMStudio..no luck. In the JMF solution there aren't any samples for SDP files....
    If I can't find a way to do it, I'll use Quick Qime 4 Java, the only problem is that there isn't a linux implementation :(
    Thanks in advance.
    Best regards,
    ANeto

    Hi,
    I have read all the mails on the JMF interest group regarding the Broadcaster and DSS.
    Well i too am trying to do a similar application. This is an Application
    Casting program basically to share my desktop with the other person sitting
    across the network using my client. And in order to multicast this, i am
    looking at using Darwin Streamng Server.
    The whole idea here is that i break the desktop image up into frames and
    then compress them and then send it over, protocol used here is TCP/RTP/UDP.
    I am trying to hit this stream of packets to DSS so that it can be accessed
    else where over the internet. I'm trying to under stand the basic
    authentication mechanism DSS uses, so that i can create the .sdp file and
    transfer it over to the DSS, which can further be accessed by any client
    that can understands sdp.
    As i read in the mail some of you were able to create the .sdp file with your custom built boradcaster and send it to DSS if i am not wrong.
    I have tried this with Mpegable Broad caster as you said.
    Now the problem i had was to create .sdp file with my application and push it to the DSS.
    So have you made some kind of a documentation or can you give me an idea as
    to how i can go about this. Or it will be even better if you can share the code with me.

  • How to play a mp4 movie with DTS audio?

    Hello,
    I try to play a mp4 movie with DTS audio on the z1 player but i dont get any sound...I also have downloaded the app mx player, but this also wont play the dts audio. Any suggestions?
    Thanks,
    Edy

    http://forum.xda-developers.com/showthread.php?t=1831111
    "I'd rather be hated for who I am, than loved for who I am not." Kurt Cobain (1967-1994)

  • I cant play audio only mp4 or mp3 file with audio tag in firefox...how to tackle this?

    In my web application m trying to play audio only mpeg 4 or mp3 files.I m using HTML5 <audio> tag to accomplish this,it smoothly working in chrome but not in firefox.Why this basic support not avail in Firefox??
    Note: I read about some patent issues with mp4 and mp3 but i wonder why chrome browser can play those files.

    Some problems with Flash video playback can be resolved by disabling hardware acceleration in your Flash Player settings. (See [[Flash Plugin - Keep it up to date and troubleshoot problems|this article]] for more information on using the Flash plugin in Firefox).
    To disable hardware acceleration in Flash Player:
    #Go to this [http://helpx.adobe.com/flash-player/kb/video-playback-issues.html#main_Solve_video_playback_issues Adobe Flash Player Help page].
    #Right-click on the Flash Player logo on that page.
    #Click on '''Settings''' in the context menu. The Adobe Flash Player Settings screen will open.
    # Click on the icon at the bottom-left of the Adobe Flash Player Settings window to open the Display panel. <br/> <br/>[[Image:fpSettings1.PNG]] <br/>
    # Remove the check mark from '''Enable hardware acceleration'''.
    # Click '''Close''' to close the Adobe Flash Player Settings Window.
    # Restart Firefox.
    This [http://www.macromedia.com/support/documentation/en/flashplayer/help/help01.html Flash Player Help - Display Settings page] has more information on Flash Player hardware acceleration, if you're interested.
    Does this solve the problem? Let us know.

  • NetStream doesn't play mp4 packaged with app

    I'm using StageVideo to play an h264 encoded mp4 file in an iPhone app. When I package the mp4 file with the app (in the root), the app doesn't play the video at all. When I simply change the video's location to a http location where the exact same file is located, it plays fine.
    In other words, the only change I'm making is:
    Packaging mp4 in root of app:
    var _videoURL:String = "video_h264.mp4" ;
    _nc = new NetConnection ( ) ;
    _nc.connect ( null ) ;
    _ns = new NetStream ( _nc ) ;
    _ns.client = this ;
    _ns.play ( _videoURL ) ;
    _stageVideo.attachNetStream ( _ns ) ;
    to
    Hosting video remotely:
    var _videoURL:String = "http://www.myDomain.dk/video_h264.mp4" ;
    _nc = new NetConnection ( ) ;
    _nc.connect ( null ) ;
    _ns = new NetStream ( _nc ) ;
    _ns.client = this ;
    _ns.play ( _videoURL ) ;
    _stageVideo.attachNetStream ( _ns ) ;
    Does anyone know if there's some restriction when using NetStream that could explain this?

    You can get away with just the relative path. But, do make sure you added the folder with the videos in the General tab.
    Another thing to know, you may not get a StageVideoAvailabilityEvent.STAGE_VIDEO_AVAILABILITY, that may have already happened before you start looking for it. In case like that you can get remote videos to work, and local videos will sometimes work. Seems to be  amateur of timing.
    The way I worked around that issue was to check the stagevideos before listening for the event. Like this:
    if ( stage.stageVideos.length >= 1 ) {
      enableStageVideo();
    }else{
      stage.addEventListener(StageVideoAvailabilityEvent.STAGE_VIDEO_AVAILABILITY, _onStageVideoAvailability);
    That seems reliable. enableStageVideo is just a function to set up the stageVideo variable, and its viewPort.

  • NetStream doesn't play mp4 packaged with app - but plays same file over http

    I'm using StageVideo to play an h264 encoded mp4 file in an iPhone app.
    When I package the mp4 file with the app (in the root), the app doesn't play the video at all. When I simply change the video's location to a http location where the exact same file is located, it plays fine.
    In other words, the only change I'm making is:
    Packaging mp4 in root of app:
    var _videoURL:String = "video_h264.mp4" ;
    _nc = new NetConnection ( ) ;
    _nc.connect ( null ) ;
    _ns = new NetStream ( _nc ) ;
    _ns.client = this ;
    _ns.play ( _videoURL ) ;
    _stageVideo.attachNetStream ( _ns ) ;
    to
    Hosting video remotely:
    var _videoURL:String = "http://www.myDomain.dk/video_h264.mp4" ;
    _nc = new NetConnection ( ) ;
    _nc.connect ( null ) ;
    _ns = new NetStream ( _nc ) ;
    _ns.client = this ;
    _ns.play ( _videoURL ) ;
    _stageVideo.attachNetStream ( _ns ) ;
    Does anyone know if there's some restriction when using NetStream that could explain this?

    You can get away with just the relative path. But, do make sure you added the folder with the videos in the General tab.
    Another thing to know, you may not get a StageVideoAvailabilityEvent.STAGE_VIDEO_AVAILABILITY, that may have already happened before you start looking for it. In case like that you can get remote videos to work, and local videos will sometimes work. Seems to be  amateur of timing.
    The way I worked around that issue was to check the stagevideos before listening for the event. Like this:
    if ( stage.stageVideos.length >= 1 ) {
      enableStageVideo();
    }else{
      stage.addEventListener(StageVideoAvailabilityEvent.STAGE_VIDEO_AVAILABILITY, _onStageVideoAvailability);
    That seems reliable. enableStageVideo is just a function to set up the stageVideo variable, and its viewPort.

  • Play RTSP stream with JMF

    hello, all, i tried to play RTSP stream with JMF, but i always get error:
         connection info: IN IP4 0.0.0.0
         connection info: IN IP4 0.0.0.0
         Failed to realize: Server is not responding
    But when i play RTSP stream with VLC, everything is well.
    Anybody can help me?
    Regards,
    lefish

    JMF does not. JMF only plays RTP-protocol streams.I doubt it.....though I have never tried to play RTSP streams using JMF but seeing following links I do think client side RTSP is supported by JMF:
    [http://java.sun.com/javase/technologies/desktop/media/jmf/reference/faqs/index.html#jmf2-rtsp-features]
    [http://java.sun.com/javase/technologies/desktop/media/jmf/2.1.1/support-rtsp.html]
    Thanks!

  • Play rtpdump files with jmf

    hello,
    I am trying to play a file created with rtpdump (or etheral) directly with jmf. I don�t know, how to create valid datasource and processor objects for a file with stored rtp-packets. Is there a possibility? Do I have to write an own demultiplexer f�r this rtp-dump format? Especially this RTP packets uses the H.263 format.
    Maybe there exists a code fragment for this problem.
    thanks a lot for your help

    I still didn't get it to work as I need it, but I made some progress so far:
    Instead of jffmpeg I used the FOBS for JMF Package (http://fobs.sourceforge.net/index.html) in addition with the JMF.
    Using this package allows you to play a 3gp-Video in Swing that is stored in your filesystem (!).
    I'm still having two problems with this solution:
    - I use a Java Webstart-framework and can't acces the user's harddisk, so I need to play the 3gp-Videos directly from memory (they are stored as byte[] in a database), but the current version of FOBS is limited to 3gp-Playback only from filesystem.
    - Each user of the application has to download and install JMF and FOBS for their OS (system-specific libraries). Especially FOBS is not always very easy to install, because it needs to change some of the jmf.properites. This can not be done with the JAR-distribution-System of WebStart and I'm expecting problems, when the users try to install both packages on their own.
    If you are developing a plain Swing-Application you might be satisfied with the possibilities of FOBS and JMF.
    Good luck :-)

  • Play sound with JMF on xletview

    How to play a sound (such as midi) file with JMF?
    now I test it on xletview,
    Manager.createPlayer(new MediaLocator("file://D:/Project/Test/classes/0.mid"));
    how can I use relative path instead of using absolute path?
    thx for your help

    Hi Redduke
    Althought your post is from July 2007 I will reply you ;)
    I'm trying to plays video on JMF (on a MHP project), but I can't. Nevertheless I am capable to play audio from two different ways:
    1. Via HSound: You create an HSound player, load the file on it and then plays it
    2. Via JMFPlayer: Like before but with JMF
    The restriction is that the sound would be in .mp1 o .mp2 format. I try with .mp2 and i can plays audio.
    Regards ;)

Maybe you are looking for

  • Display and performance problems

    Many times cannot power up my laptop the power light and charging light is on fan is working but screen is off I try always remove the battery and press power switch 40 seconds after screen is displayed many times I found this complaint I need a reas

  • Error message -48: The itunes library file cannot be saved.

    Hello, When I open up my itunes i get an error message 48 - the itunes library file cannot be saved. All my data is there - music, podcasts etc. Just wondering if this error message means anything, if so what, and what I can do to fix it? Thanks!

  • Ipod mini use on both the PC and Mac

    I just want to clarify this . . . I have a Mac at home that I formatted my Ipod on; however, I have a lot of music on my work PC (on ITunes) that I would love to put on the Ipod . . . so I have to restore/reinstall the settings on the Ipod for a PC?

  • Open Source SMS encryption

    Hi there, I have been looking for security related stuff when I found this: http://www.cryptosms.org The special thing about this is it is open source, thus it is more trustworthy than closed source java programs. Maybe useful for business folks who

  • IMovie 08 is saving events in my root directory???

    Hi, For some reason, ImOvie has chosen to store events in the root directory instead of in my Movies directory. I am using a network drive for my home directory connected to Mac OS X Server. How can I get iMovie to save in the correct location? thx!