Menu

flv file converting to jpeg is possible???

user
2005-05-17
2013-05-09
  • Nobody/Anonymous

    my os is win2k base and java1.4.2_06, ffmpeg0.4.9pre1,fobs4jmf_0.3pre2..

    i want flv(macromedia flash media server format) file convert to jpeg..
    this is possible??

    C api function is how call??

     
    • Jose San Pedro

      Jose San Pedro - 2005-05-19

      Hi,

      it's not really clear what you really want to do. Is it to convert all the frames of a flv into a set of jpeg files?? Do you want to use the C or the Java API?

      I've got some reports that enconding is not working in Fobs 0.3pre2. New version is almost completed, and I will try to fix that so encoding works fine again.

      Try to be more specific!!

      bye

      Jose San Pedro

       
    • Torsten Crass

      Torsten Crass - 2005-05-20

      Hi there,

      funny, I was just about to ask a similar question when I found this posting in the FOBS forum...

      What I am trying to do is to basically copy the JPEG-encoded video stream from one quicktime file to a new onw, discarding the audio stream, thus stripping the video from its soundtrack. When doing so using some code similar to http://java.sun.com/products/java-media/jmf/2.1.1/solutions/Split.html, I get a quicktime file about four time the original size, but with apparently reduced color depth. The Apple Quicktime player also tells me that the video track format now is "raw" (as opposed to "jpeg" in the orginal file).

      Well, I thought, no problem -- just specify VideoFormat.JPEG as the video track's format. This, however, yields an error message as follows:

      Failed to build a graph for the given custom options.
      Failed to realize: com.sun.media.ProcessEngine@f01a1e
        Cannot build a flow graph with the customized options:
          Unable to transcode format: FFMPEG_VIDEO, 640x400, FrameRate=12.0, Length=256000 0 extra bytes
            to: jpeg
            outputting to: video.quicktime
      Error: Unable to realize com.sun.media.ProcessEngine@f01a1e

      No wonder, I reckon -- how is poor com.sun.media.ProcessEngine supposed to know what to do with FFMPEG_VIDEO format...? ;-)

      Still I'd love to know if anyone managed to persuade a FOBS-enabled JMF to save an FFMPEG_VIDEO stream as JPEG... Maybe by manually specifying a codec chain?

      Best regards --

      Torsten

      P.S. Still very happy FOBS exists, and eager to experience version 0.4! :-)

       
      • Jose San Pedro

        Jose San Pedro - 2005-05-20

        Hi,

        thanks for your detailed description of the issue... I didn't really understand what the problem was !

        As I mentioned in a previous post, encoding is not yet implemented in Fobs4Jmf. Maybe, in the case of your application, a simple Transcoder would do the trick (assuming JMF support Jpeg encoding).

        The reason of the FFMPEG_VIDEO format is just that Fobs4Jmf core bypasses some JMF functionality...I'm ashamed to say this, but the a/v decoding is really performed in the Parser. So, the real output of the parser are raw RGBA frames. I came across some problems while doing tests (just before Fobs 0.1) if I didn't include a Codec class between the parser and the renderer, even though the parser output are raw frames. I decided to try saying to JMF that frames were encoded with FFMEPG_VIDEO and I coded  a basic Codec class that simply passed the frame to the next link in the chain. Guess what? That did the trick.

        So, the only way I see to solve your problem right now is to use the RGBA output of the video.NativeDecoder class as the input for a transcoder that will use JMF own codecs to jpeg frames.

        About 0.4, it's coming. But I cannot say yet a date!

        Thanks for using Fobs!

        Jose San Pedro

         
    • Nobody/Anonymous

      Hi guys,
      Sorry for not posting in a while. I've been busy lately.
      I wonder if you couldn't set the codec chain manually w/
      com.sun.media.codec.video.jpeg.NativeEncoder at the end if on Windows.

      So what type of problems did you come across exactly ?

      Also, before I forget, I had an idea the other day, see:
      http://www.jazillian.com/
      Isn't ffmpeg coded in C? maybe we could try to translate a few codecs just as a proof of concept?

      I'm sorry I don't have time for any of this right now, my exams start in a week, but I'd be glad to contribute more in the future.

      Masato

       
      • Torsten Crass

        Torsten Crass - 2005-05-30

        Hi Masato,

        thanks for the hint -- doesn't work, however, since there is no class called com.sun.media.codec.video.jpeg.NativeEncoder...

        Well, at least I got the color depth issue sorted out by iterating through the track's supportedOutputFormats and looking for the one with the greatest getBitsPerPixel.

        (Why is JMF documentation so da*n sparse?!)

        Bye --

        Torsten

         

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.