Menu

URL-Problem

user
2009-06-23
2013-05-09
  • Christian Marsch

    Hi

    I am using FOBS4JMF for a video-player (only videos, no sound) based on JMF.

    the player should be able to take screenshots and save them as a picture while playing, which works quite well.

    there are problems if a filename (and the generated URL)
    -is not located on local drive (netpath)
    -contains german umlauts (like ä ö ü)
    -contains space characters

    the player works in that way:
    get a file, get its URL and create a processor.

    first i was using file.toURI().toURL(). when using file.toURL() the player could play filenames containing space-characters.
    this seems to be because the space chars are not replaced by %20.
    not a nice workaround but it works. the other two problems stay.
    the funny thing is that in JMstudio it works, when using a realized player it works to. When creating a processor i get the following:

    Fobs4JMF - Native shared library found
    OpenError: File open error
    Fobs4JMF - Native shared library found
    Little Endian
    AVCODEC: Constructor
    AVCODEC: setInputFormat
    AVCODEC: setInputFormat
    AVCODEC: getMatchingOutputFormats
    AVCODEC: getMatchingOutputFormats
    AVCODEC: setInputFormat
    AVCODEC: setInputFormat
    AVCODEC: getMatchingOutputFormats
    AVCODEC: open
    AVCODEC: init_decoding
    Setting size - 352x288
    Encoding: mpeg
    Codec Found: 2
    Codec opened...W=352 H=288
    [mpeg2video @ 63DACB08]ac-tex damaged at 9 10
    [mpeg2video @ 63DACB08]Warning MVs not available
    [mpeg2video @ 63DACB08]concealing 176 DC, 176 AC, 176 MV errors
    [mpeg2video @ 63DACB08]ac-tex damaged at 5 0
    [mpeg2video @ 63DACB08]Warning MVs not available
    [mpeg2video @ 63DACB08]concealing 396 DC, 396 AC, 396 MV errors
    [mpeg2video @ 63DACB08]ac-tex damaged at 13 16
    [mpeg2video @ 63DACB08]Warning MVs not available

    Code for producing the file open error:

    try {
        p = Manager.createProcessor(ml);
    } catch (Exception e) {
        p = null;
        return false;
    }

    a more detailed view of the code can be found here (my program is based on this):
    www.codemiles.com/download/file.php?id=577

    I am using
    JRE 1.6. Update 3 (same goes with Update 6 or 7)
    FOBS4JMF 0.4.2
    Windows XP (SP3) , same could be reproduced on VISTA
    the movie could be MPEG2 or even MPEG4

    My question is:
    is there any workaround for this or any other way
    to get a valid URL out of a filename?

    Thanks for reply,

    Christian

     
    • masai

      masai - 2009-06-24

      HI,

      I have also encountered this issue.
      It seems that file.toURI().toURL does not work correctly.

      Try to create your URL using rather:

      String filePath = file.getPath();

            URL myUrl=new URL("file:/"+filePath);
            p = Manager.createProcessor(myUrl);

      Br

      Claude

       
  • David THIBAULT

    David THIBAULT - 2010-03-30

    I have the same error :
    With jmf alone I can open a file located like that :
    "D:/vidéos/test.mov";
    but using fobs I cannot use an URL with accents.
    Is there any solution to use FOBS4JMF with URL with accent like é,à,è…?
    Thanks a lot.

     

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.