Given a list of input media files, the object is to concatenate them to generate one contiguous output media file. The problem gets more complicated if the input media contain data with different formats. In such cases, we need to transcode them to matching formats before performing the concatenation.
A sample application is written. It accepts a list of input URL's. For each input URL, a Processor is created. Using the TrackControls from these Processors, it finds the matching tracks and performs the necessary transcoding if the tracks are not in matching formats. A custom DataSource is then created to accept the output DataSources from these Processors. It reads from the DataSources and in turn generates a continuous stream of data. This custom DataSource is then used to create another Processor to generate the concatenated output stream. The output from this last Processor then goes to a file DataSink to generate the final output data to a file.
| 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
java Concat -o <output URL> <input URL> ...
Example:
java Concat -o file:/c:/temp/foo.mov file:/c:/movies/amovie.avi file:/c:/movies/bmovie.mov