Menu

Flash Video (FLV) on OS X (Leopard)?

user
2008-07-28
2013-05-09
  • Nobody/Anonymous

    Hi, quick question for someone...

    I am trying to use FOBS4JMF to play FLV files. I can do it without a problem on my windows machine. But I can't for the life of me figure out how to get it to play .flv on my Mac (using OS X 10.5.4).

    I've installed the codec pack form Perian which allows Quicktime to play FLV files. I recall having to do something similar in Windows XP before I could create a processor to get at the video frames.

    Anyhow, if anyone has figured out how to play FLV files on OS X it would help me out a lot if you shared the steps you took to make that happen! I've even tried building 0.4.2 from the new source code (and including the x264 libs) with no luck.

    Also, if anyone has had success playing Quicktime MOV files on windows and could explain what needs to be done it would be most helpful!

    I've been futzing around with the JMF registry and recompiling FFMPEG with various options and libraries for hours!!

    Thanks in advance! -sj

     
    • Stewart Greenhill

      FOBS is independent of any codecs, except for what is compiled into ffmpeg. I'm playing Quicktime MOVs happily under Windows - both mp4 files collected on my phone, as well as movies I've created and rendered as h264.

      If ffmpeg is compiled correctly you should be able to view both FLV and MOV files without any extra components. The fact that it doesn't work suggests that maybe your installation of JMF is not finding the FOBS libraries, or ffmpeg. In this case it will fall back to the java-only codecs found in JMF, which are pretty minimal.

      I haven't tried the Mac OS version, but you'll need to make sure that both the JNI modules (*.jnilib) and ffmpeg itself is in the Java library path. You may need to add "-Djava.library.path=xxxx" to java to get it to work.

      Cheers,
        Stewart

       
      • Nobody/Anonymous

        Thanks for the reply Stewart...

        Hmm, I think I may be having troubles with the path. The jnilib is in
        the same directory as the fobs4jmf.jar and the jmf.jar. I'm setting
        -Djava.library.path to the current directory. I'm also setting the
        enviroment variable $DYLD_LIBRARY_PATH equal to the current directory.
        (All as shown by example in the runjmstudio.command script).

        So this is what I'm running:

        java -classpath ./jmf.jar:./fobs4jmf.jar -Djava.library.path=. JMStudio

        And my DYLD_LIBRARY_PATH is . (ie echo $DYLD_LIBRARY_PATH prints out
        the current directory).

        Is it possible that the GUi program JMStudio is not reading
        $DYLD_LIBRARY_PATH correctly? That is, I've read somewhere that
        Leopard sometimes has issues with reading environment variables.

        Anyhow, the error I'm getting is indeed "Native shared library NOT found":

        Fobs4JMF - Native shared library NOT found
        java.lang.UnsatisfiedLinkError: /Users/angus/FOBS/libfobs4jmf.jnilib:
               at java.lang.ClassLoader$NativeLibrary.load(Native Method)
               at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1822)
               at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1739)
               at java.lang.Runtime.loadLibrary0(Runtime.java:823)
               at java.lang.System.loadLibrary(System.java:1030)
               at com.moesol.bindings.NativeLibraryFinder.loadLibrary(NativeLibraryFinder.java:63)
               at com.omnividea.media.parser.video.Parser.<clinit>(Parser.java:107)

        Btw, both MOV files and FLV files work on my Windows setup, just not
        OS X 10.5. And even the MOV files print out the above error before
        starting to play successfully!

        If anyone has any ideas about what might be happening on Leopard
        please let me know!

        Thanks in advance, -sj

         
    • Nobody/Anonymous

      Ok--

      Something wonky is going on...

      I am printing out all my environment variables from within Java (using "System.getEnv()"), as well as the java.library.path (using "System.getProperty("java.library.path") ), and everything looks fine.

      I'm trying to mimic the code in  com.moesol.bindings.NativeLibraryFinder. That code simply calls System.loadLibrary("fobs4jmf") to try and find the "libfobs4jmf.jnilib". But... it can't find it!

      No matter where I put it, or how I call loadLibrary, I *always* get an UnsatisfiedLinkException. However, I can call any other library using the System.loadLibrary() or System.load() methods. For instance, I put libjogl.jnilib in the same directory and it is hard not to load it correctly (using the loadLibrary method).

      What is going on? How come I can't load in the fobs jnilib?

      I've tried both the version I found in the 0.4.1 binary download as well as building it manually using the 0.4.2 source code.

      I'm not even trying to play a file at this point, I'm literally just trying to link to the jnilib!!!

      Thanks again in advance to anyone who can shed some light on this!!!

      -sj 

       
    • Nobody/Anonymous

      Make sure you're using 32-bit Java. Note that Java 6 for Mac OS X is only available in 64bit. 32-bit JNIs (such as fobs4jmf.jnilib) are not compatible with 64-bit JRE...

      --sa

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.