Sun Java Solaris Communities My SDN Account Join SDN
 
Code sample

Splitting Tracks from an Input

 

JMF Solutions

Splitting Tracks from an Input

Problem
Given an input media file, the object is to generate one output media file for each elemetary track in the original file.

Solution
A sample application is written.  It accepts an input URL. A Processor is created from this URL. Custom DataSources are then created one for each SourceStream of the output DataSource from the Processor. Each of these custom DataSource is then used to further create a Processor. The outputs from these Processors are then connected to different DataSinks to generate the final output files.
 
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
How to run this sample
java Split <input URL> -a <audio ext> -v <video ext>
where:
<audio ext>: audio file extension for audio tracks.
<video ext>: video file extension for video tracks.
Example:
java Split file:/c:/movies/amovie.avi -a .wav -v .mov
will split the tracks of the input file and generate output files split-n.wav for the nth audio track and split-n.mov for the nth video track.
Source Code