IMediaWriter writer = ToolFactory.makeWriter(outputFile.toString(), reader);
// create a tool which paints video time stamp into frame
IMediaTool addTimeStamp = new TimeStampTool();
// create a tool which reduces audio volume to 1/10th original
IMediaTool reduceVolume = new VolumeAdjustTool(0.1);
// create a tool chain:
// reader -> addTimeStamp -> reduceVolume -> writer
reader.addListener(addTimeStamp);
addTimeStamp.addListener(reduceVolume);
reduceVolume.addListener(writer);
// add a viewer to the writer, to see media modified media
writer.addListener(ToolFactory.makeViewer());