IWS II Project - UML Video Lan Streaming Project Harshavardhan Achrekar- UML00812539 email – [email protected] Purpose: - To implement Streaming of videos from various UML Servers to the UML Client on peer to peer basis. Inspiration: - Alex Presentation on Next Generation of Multimedia Communication on peer to peer networks through use of meta-data files. Usage Scenario: -As explained by Alex ,after the client has made a selection on the file to be played based on the meta data which was presented to the requestor which included a list of available files on the server from one of its peer on the lan , requestor Client enters into a peer to peer interaction with the Server module on the Provider end. This is exactly where he will use my application to view the stored streamed movie in Mjpeg format. Implementation details: The Server is listening for request for connections on the port it is configured i.e, 2000 in this case .The client establishes a TCP Connection with the UML Streaming server to exchange RTSP messages. The Initial state of RTSP is INIT; with READY,FORWARD and PLAYING being remaining states it can be in. Then we construct a new Datagram Socket to receive RTP Video data packets from the server, on port RTP_RCV_PORT -25000 in this case. With RTSP sequence number set to 1 , Client Send SETUP message to the UML Streaming server and wait for a response “200” to enter into RTSP state of READY. When Play Button pressed, Client increases the sequence number by 1 , sends a Play Message to Server and waits for 200 Response. If it receives a response it changes RTSP state to PLAYING. In this process it starts the timer which handles the function of constructing a Datagram Packet to receive data from the UDP socket and construct a PacketShaper object from the datapacket received. Then retrieve data bit stream to get back image in the form of Imageicon. send_RTSP_request() and parse_server_response() methods within client are used for interacting with the Server. Now let us consider the Server functionality of the same application. Server creates a socket to be used to send and receive UDP packets containing the video frames from the client ip address and the port which it uses to receive UDP data packets. Client creates a buffer to store images to be send to the client and send starts the timer at the frame rate to send at that rate. The interaction between client and server has been mention above. Running the Code: 1. javac StreamMovie.java 2. javac PacketShaper.java 3. javac Server.java 4. javac Client.java 5. java Server 6. java Client User Interaction Details: 1. Figure below show’s the Server.java program when you initially start it. • You must run Server.java before running Client.java. • Change the port number to the desired port and click the “Configure Server port” button to start the UML Streaming server. • The “Configure Server port” button will change to “Configures Successfully” and the UML Streaming server will wait for a UML Video Lan client to connect. 2. Figure below Shows the Server.java program connected to the Client.java program. 3. Figure below Shows the Server.java program while playing the mjpeg movie. 4. Figure below Shows the Server.java program when paused after playing the mjpeg movie for a certain time. • The server IP address and port number are shown after Localhost. • The bar show’s the percentage of video sent to client. • Various statistics are also displayed(i. e. frame number, packet length, timestamp, etc) • The Client IP address is also shown. 5. An “Exit Application” from the Client.java program will also close the Server.java program. 6. Figure below show’s the initial screen that Client.java will start in. • Server.java must be set to a port number and ready to accept a connection from Client.java. • The “Streaming Server Name” box shows the name of the UML machine that Server.java is running on. • The “Port” shows the port number used by Server.java. • The “Video File” shows the file that is going to be displayed by Client.java. 7. Once the settings are set to connect to the UML machine that Server.java is running on then click on the “Connect” button. The “Connect” button turn into “Connected Successfully” when a connection to the server has been made. 8. Figure below shows Client.java correctly connected to Server.java and playing a movie. • “Play Video” tells Server.java to jump into the play state to start playing the movie. • “Pause Video” pause’s the video. • “Exit Application” closes Client.java and Server.java applications. • When a movie is playing it will display “PLAYING” in the lower Status Statistics Section of the application window representing the state of Server.java. • “Transmission Rate” is the total amount of packet size divided by the timestamp. • “Burst Rate” is the current packet size divided by the timestamp. Conclusion: - The implementation of Streaming Application was deployed and tested on UML Computer Science Network and was found to be functional. Multiple Connection were made to the UML Streaming Server on Different Ports from Various Client Programs and video streaming was tested. Codes path :- The implemented Project along with its documentation can be found at Website: http://www.cs.uml.edu/~hachreka/514_s2007/Project
© Copyright 2026 Paperzz