Your search did not match any results.
We suggest you try the following to help find what you’re looking for:
How to transmit media over the network using JMF and JMF/RTP. You may want to transmit media from one computer to another. Or you may want to broadcast a live feed to your company's intranet. The source of the media can be a file, live media using a capture device or any other source supported by JMF.
The AVTransmit2 class is similar to VideoTransmit except that it attempts to transmit each of the tracks within the given input media. To do that, an RTP session is created for each media track. For that purpose, the RTP Session API instead of the DataSink API is used for flexibility. For JMF 2.1.1 users, an alternative sample that uses the new RTPManager API is also provided. The default (first available) RTP format is set for each track. For video, special attention is taken to ensure that the input sizes are usable for RTP transmission. Real-time scaling is applied when necessary.
Note that due to limitations of the JMF 2.1 implementation, audio and video are not in tight synchronization.
The AVTransmit2 class takes three parameters in the constructor - the source locator, the destination IP address and a base destination port number for all the media tracks.
The source locator can be -
The IP address should be the IP address of the computer that should receive your transmission. If you want all the computers on your subnet to receive the transmission, then use 255 as the last number in your IP address. For example, "22.214.171.124" can be used for a point to point transmission and "126.96.36.199" can be used for all computers that are on your subnet. Consult your system administrator if you're not sure what these IP addresses mean. You can also refer to the JMF RTP documentation in the JMF Programmer's Guide for more information on RTP transmission and reception.
The base Port number can be any port number that is not in use by any other service on your computer. For example, you can use "22222". Make sure that it is an even number. Once again, refer to the Programmer's Guide. The first media track will be transmitted from the base port number. The next track will go to base port number plus 2 and so on.
The sample program can be used as a utility class as well as standalone. There is a main method that takes three command line parameters. If all goes well, the media will be sent out for 300 seconds and then the application will exit. This 300 seconds limit is because there is no GUI that allows you to specify when to stop the transmission.
|Platform:||JDK 1.1.6 or later|
|JMF API:||2.0 or later|
|Implementation:||AJ, WPP, SPP *|
|Hardware: [optional]||Capture card required for live capture.|
* AJ = All Java, WPP = Windows Performance Pack, SPP = Solaris Performance Pack
java AVTransmit2 file:/avmedia.mov 188.8.131.52 42050
Where <sourceIP> is the IP address of the RTP session and the port number is the same one that is used on the transmitting side.