1 / 42

An Examination in Wireless Media Streaming in a Home Network Environment

An Examination in Wireless Media Streaming in a Home Network Environment. Purpose. The Purpose of my research is to answer two questions. How can wireless media streaming be implemented? What issues (e.g performance) are there with streaming wireless media?. History of Project.

Download Presentation

An Examination in Wireless Media Streaming in a Home Network Environment

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. An Examination in Wireless Media Streaming in a Home Network Environment

  2. Purpose • The Purpose of my research is to answer two questions. • How can wireless media streaming be implemented? • What issues (e.g performance) are there with streaming wireless media?

  3. History of Project • The original concept was to design two boxes, one for the server and one for the client to be able to stream media wirelessly. • The boxes would be similar in size to today's PVR. • Early on it was found this was not feasible and it is more practical to work on a software solution using PCs. • A tech demo was set up using Microsoft Media encoder and player which can be configured to stream media.

  4. First tech demo • Problems occurred when using a wireless setup. • Using one wireless connection (802.11b) it worked but using two wireless connections it failed. • In failing it would play a few seconds then skips a few seconds then play a few seconds while playing the audio all the time. • It also has limited adjustable settings and is not real time with a minimum of 1 second buffering.

  5. Research Questions • Two main questions were asked after the first tech demo. • Why were there skips in the video feed in the tech demo? • Why is there a minimum of 1 second latency

  6. The search for answers • In order to answer the questions two software programs were developed. • The first is a wireless simulator that will show what is happening at the packet level of a wireless stream. • The second is a media streaming software that has adjustable settings such as latency, bit rate etc. • In addition to developing the software to make it useful, the purpose was also to fully document the software and the methodology used to create it. • Pay attention to software engineering issues.

  7. Wireless Simulator • Several open source network simulator available but I decided to make my own • Several nice features • Nice GUI • Bug Free • Fast (written in c++ vs java) • Simulates multiple channels • Data integrity • OS like API • Configurable to anything

  8. CTS NAV NAV NAV NAV RTS CTS Data ACK RTS ACK Data SIFS SIFS SIFS DIFS DIFS SIFS SIFS SIFS DIFS Channel Available Source Access Point Destination Other Device 802.11 Introduction

  9. Network Process Process Process OS NIC Physical Layer Gives each process execution time Contains the necessary virtual functions to simulate an actual process such as Init, Run and Message sent/received functions to allow real application to be run in the network Create Sockets Send messages Receive Events (message send, message received Packets outgoing messages Buffers and recombines incoming messages OS Fills ingoing and NIC fill outgoing packets Has logic to perform RTS-CTS-Data-ACK sequence Has access point option to perform access point functions For outgoing packet the NIC notifies physical layer that a packet is available and copies over the data when required NIC accepts incoming data Polls the NICs for data when idle and performs collision detection. Accepts data from the NIC when no contention and routes this data to the proper destination NIC. Advances the clock of the simulation Simulator Architecture

  10. Network Process Process Process OS NIC (channel 0) Physical Layer (channel 0) Physical Layer (channel 1) NIC (channel 1) To NICs (channel 0,1) … … Multiple Channel Architecture

  11. Programming Example • Windows Startup code CChildView::CChildView() { m_pNetwork = new TestNetwork; m_pNetwork->Init(); } • Network code void TestNetwork::SetupNetwork() { TType = MultiRun; m_NumMultiRuns = 15; m_aProcess[m_NumProcesses] = new ServerProcess; m_aProcess[m_NumProcesses]->Init(); ServerProcess *tSProcess = (ServerProcess *)m_aProcess[m_NumProcesses]; tSProcess->SetDataRate((m_nSaveStats+1)*40000); m_NumProcesses++; m_aProcess[m_NumProcesses] = new APProcess; m_aProcess[m_NumProcesses]->Init(); m_NumProcesses++; m_aProcess[m_NumProcesses] = new ClientProcess; m_aProcess[m_NumProcesses]->Init(); m_NumProcesses++; }

  12. Programming Example 2 • Server code void ServerProcess::Run() { m_CurrTime = NGetTicks(); if (m_CurrTime >= m_SendTime) { // send something out int Rand = rand(); int ExtraTime = (m_IntervalTime*Rand)/RAND_MAX; m_SendTime = m_CurrTime + m_IntervalTime/2 + ExtraTime; if (m_SendSocket != -1) m_pOS->Send(m_SendSocket,m_SendBuffer,10000); } }  void ServerProcess::Init() { strcpy(m_ProcessName,"Server"); // init create the socket Process::Init(); m_SendSocket = m_pOS->CreateSocket(0,SockDataGram); m_pOS->SetSockOpt(m_SendSocket,BROADCAST);  } void ServerProcess::SetDataRate(int BRData) { // set it up to match the bit rate approx int MPerSecond = BRData/10000; if (MPerSecond <= 0) MPerSecond = 1; m_IntervalTime = 1000/MPerSecond; }

  13. Programming Example 3 • Client Code void ClientProcess::OnMessageReceived(int SourceIP, int Port) { int length = 20000; char blah[20000]; int length1 = m_pOS->Receive(m_ListenSocket,blah,length); m_TotalReceived += length1; } void ClientProcess::UserDrawStats(CDC *pDC, CPoint Offset, CPoint &Size) { char tempo[200]; sprintf(tempo,"Total Received %d",m_TotalReceived); pDC->TextOut(Offset.x+2,Size.y,tempo); Size.y += 15; }

  14. Simulator Results • Simulator was tested for both data integrity and throughput values and shown to be working. • Three tests performed • What effect does an access point have on a the network performance? • What happens to a video stream when the bit rate exceeds the throughput? • Multiple Channel testings

  15. The effects of an access point

  16. The effects of an access point 2 • Increased the wait time and number of resends • Halves the throughput • Did not contribute to large efficiency decreases

  17. Video streaming

  18. Video Steaming 2

  19. Video Streaming 3 • The results answer what is happening when a video feed is playing for 5 seconds and then stopped for 5 seconds. • The software realizes if it continues to attempt to transmit the entire stream eventually nothing will get through so it instead gives up on portions of the video feed so at least some will get through.

  20. Multiple Channel experimentation

  21. Development of Streaming Software • Microsoft DirectShow used to develop software • DirectShow has free components that handle all of the media capture, encoding, decoding, and rendering. • The DirectShow components are not open source so if there is a problem there is no way to fix it.

  22. Server Video data packetization Buffering and streaming Video stream Video capture card Video encoding Audio data packetization Buffering and streaming Audio stream Audio capture card Audio encoding Control Messages Connection functionality Client Video Stream Video buffering Video decoding Video rendering Audio/Video Synchronization Audio Stream Audio buffering Audio decoding Audio rendering Control Messages Connection functionality Buffer monitor Resend requester General Architecture

  23. Server Front End

  24. Client Front End

  25. Incoming data Outgoing buffers Server stream packets Packetizer class Header class Client receives stream Incoming buffers Render Media Packetizer class Header class Packetizing Class

  26. Software Engineering Advantages • The same code is used in both the server and the client. • The packetizer class contains both the code for packetizing and recombining which means is can be tested separately. • Any changes to the header format is simply done in the header class and no other code has to change anywhere else.

  27. Compressed sample Uncompressed sample Network Receiver Fill buffer with media Decoder Decodes the media Video Renderer Play the media Sleeps to synchronized with the audio Media Synchronization • Since there is some buffering the audio and video has to be synchronized. • Method used plays the audio continuously in a streaming buffer and synchronizes the video based on the audio.

  28. Server GUI

  29. Client GUI

  30. Network Test Utility

  31. Network type Ping response time (32,32) Ping response time (32,1400) 11 Mbps Wireless 1696 uS 3300 uS 54 Mbps Wireless 1345 uS 2119 uS 100 Mbps Wired 790 uS 1052 uS Ping Test

  32. Network type Network type Maximum Bandwidth Theoretical maximum Bandwidth 11 Mbps Wireless 1034 Kbytes/second 11 Mbps Wireless 887 Kbytes/second 54 Mbps Wireless 3984 Kbytes/second 54 Mbps Wireless 3813 Kbytes/second 100 Mbps Wired 11648 Kbytes/second Throughput Test Table 6‑2 Bandwidth test Table 6‑3 Theoretical maximum bandwidth

  33. Testing • Two kinds of tests done • Throughput Stress Test • Packet Loss Rate Test

  34. Throughput Testing 2 • 10 minutes of VBR video streaming with 500 Kbytes of simulated CBR traffic. • No other user generated traffic on the network. • 150 ms of buffering, no simulated packet loss. • Lost 248 video frames and 181 audio frames. • When buffering was increased to 4 seconds, under the same conditions there was 0 frames lost.

  35. Throughput Testing

  36. Simulated Packet drop testing • Using same 10 minutes of VBR. • Buffering at 150ms (2 internal buffers) • Testing done under 802.11b and 802.11g under various packet loss rates.

  37. Cascade effect

  38. (54 Mbps 1%) (54 Mbps 5%) (54 Mbps 10%) (54 Mbps 20%) Total Video Traffic 180122982 183884042 186920318 186512921 Resend Traffic 1772250 9565591 21156994 44616837 Percentage .984% 5.2% 11.3% 24% Total missing frames 9 172 988 3954 Various Packet Loss Rates

  39. Conclusions • Wired Networks vs Wireless Networks • Other then a decrease in maximum throughput and a minor increase in latency there is no other issue that has to be looked at from an application perspective • Streaming Performance • Never want to have the bit rate of the media exceed the available throughput. • Better off lowering the bit rate then having to watch choppy video. • Large buffers and the resend request can compensate for momentary increase in bit rate or packet error rate. • Software Engineering • Proper design of architecture can make software development easier.

  40. Contributions • Wireless simulator that can be extended to future standards such as 802.11e and 802.11n. • Media streaming software that has fully adjustable buffering and can be made to simulate different network conditions. • Tutorial on both the design of the wireless simulator and the media streaming software.

  41. Future work • A smarter resend request mechanism • Extend the wireless simulator to include routing and different kinds of networks. • Investigate a network with multiple media streams and other traffic, in terms of regulating the throughput usage.

More Related