No results found

Your search did not match any results.

We suggest you try the following to help find what you’re looking for:

  • Check the spelling of your keyword search.
  • Use synonyms for the keyword you typed, for example, try “application” instead of “software.”
  • Try one of the popular searches shown below.
  • Start a new search.
Trending Questions

Generating a Movie File from a List of (JPEG) Images [Custom DataSource]

JMF Solutions

Problem

Starting from a list of compressed JPEG image files, we'll generate a video-only QuickTime movie of the still images.

Solution

A custom PullBufferDataSource is designed to read compressed JPEG data from a list of JPEG still image files. For each file read, a Buffer object is created and the compressed data is set on the Buffer object.

The custom PullBufferDataSource is then used to create a Processor. The Processor's output is set to generate QuickTime data. The output DataSource of the Processor is then hooked up to a file DataSink to save the bits to a movie file.

Requirements

Platform: JDK 1.1.6 or later
JMF API: 2.0 or later
Implementation: AJ, WPP, SPP *

* AJ = All Java, WPP = Windows Performance Pack, SPP = Solaris Performance Pack

Related Classes

  • javax.media.Processor
  • javax.media.protocol.DataSource
  • javax.media.protocol.PullBufferDataSource
  • javax.media.protocol.PullBufferStream
  • javax.media.DataSink
  • javax.media.datasink.DataSinkListener
  • javax.media.Buffer
  • javax.media.format.VideoFormat

How to run this sample

java JpegImagesToMovie -w <width> -h <height> -f <frame rate per sec.> -o <output URL> <input JPEG file 1> <input JPEG file 2> ...

Example:

java JpegImagesToMovie -w 320 -h240 -f 1 file:/c:/temp/foo1.jpg file:/c:/temp/foo2.jpg

Source Code

  • JpegImagesToMovie.java