[FFmpeg-devel] New Java wrapper for ffmpeg libraries using JNA

Ken Larson forum
Wed Aug 22 22:46:32 CEST 2007


Brent -

I haven't made a new FMJ release yet with this in it, so it is best to 
get the source for fmj and ffmpeg-java from CVS.

ffmpeg-java does show the basic technique to using a Java source for the 
data, in URLProtocolTest, which uses the class CallbackURLProtocolMgr.

There is an FMJ demultiplexer, net.sf.fmj.ffmpeg_java.FFMPEGParser, 
which applies the same technique for a JMF-style DataSource.  There is a 
fair amount of extra work for this to allow an arbitrary DataSource to 
be able to seek, which ffmpeg requires for certain files.

I described the approach in a FOBS forum thread as well:

https://sourceforge.net/forum/message.php?msg_id=4470063

Ken

Brent Baccala wrote:
> On Wed, 22 Aug 2007, Ken Larson wrote:
>
>> I thought you might be interested to know I've wrapped ffmpeg so that it
>> can be called from Java using JNA.
>
> Nice.  I started work on something similar.
>
>> This is a subproject of FMJ, and is called ffmpeg-java.  It has no
>> JMF/FMJ dependencies itself, it is just a wrapper.  It has its own
>> release under the FMJ downloads, and is in FMJ's CVS tree under
>> ffmpeg-java.
>>
>> Included in the project a Java version of avcodec_sample.0.4.9.cpp,  a
>> sample program which extracts the first 5 frames of a movie.
>>
>> I have also created a JMF demultiplexer in the FMJ project, so that
>> ffmpeg can be used to parse and decode .mov and .avi files, for example.
>
> Is the source to this in the CVS tree?  I don't see it in the download.
>
> I'm interested to know how you linked the ffmpeg file handling scheme
> in with JMF's buffering approach.
>
>
>                     -bwb
>
>                     Brent Baccala
>                     cosine at freesoft.org
>




More information about the ffmpeg-devel mailing list