views:

78

answers:

2
+1  Q: 

JMF Output Stream

Does anyone have a simple example of how to take a local file and (unicast) stream it with Java JMF? Examples from others seem scarce.

A: 

Use Manager#createPlayer().

File audioFile = new File("/path/to/audiofile.wav");
Player player = Manager.createPlayer(audioFile.toURL());
player.play();

Don't forget to read the introducory javadoc of the Manager class for other hints.

BalusC
A: 

I've found http://jcs.mobile-utopia.com/jcs/26201_RTPManager.java, although am having trouble getting it to work at the moment, hence http://stackoverflow.com/questions/2822074/problems-creating-an-rtp-stream-with-jmf :)

Nick