1

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.

rachel
  • 11
  • 2

2 Answers2

0

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
  • 1,082,665
  • 372
  • 3,610
  • 3,555
0

I've found http://jcs.mobile-utopia.com/jcs/26201_RTPManager.java, although am having trouble getting it to work at the moment, hence Problems creating an RTP stream with JMF :)

Community
  • 1
  • 1
Nick
  • 6,967
  • 2
  • 34
  • 56