Analysis of YouTube Video Delivery (360p, 720p)

3,950 views

Published on

Download a PDF file: http://www.netmanias.com/en/?m=view&id=techdocs&no=5918&vm=ppt
You can also find and download more materials from http://www.netmanias.com

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
3,950
On SlideShare
0
From Embeds
0
Number of Embeds
1,729
Actions
Shares
0
Downloads
0
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Analysis of YouTube Video Delivery (360p, 720p)

  1. 1. Copyright © 2002-2013NMC Consulting Group. All rights reserved. Netmanias Technical Document: Analysis of YouTube Video Delivery (360p, 720p) 1 www.nmcgroups.com Analysis of YouTube Video Delivery (360p, 720p) December 4, 2012 NMC Consulting Group (tech@netmanias.com) www.netmanias.com www.nmcgroups.com
  2. 2. Copyright © 2002-2013NMC Consulting Group. All rights reserved. 2 Netmanias Technical Document: Analysis of YouTube Video Delivery (360p, 720p) Summary of YouTube Video Delivery on the PC – PSY Gangnam Style 360p (default) 720p Video File Request and Delivery Jump to Any Part of a Video Request Method Multiple Chunk Requests (Byte Range Request) Single Request Video file stored on the YouTube server 16 HTTP GETs (byte range) Single HTTP GET 0 27.9MB  Multiple Requests for downloading a video file (1.78MB Chunk Request)  Request Method: Byte Range Request (URI Parameter) 0 93.1MB HTTP GET (byte range) 0 27.9MB Downloaded video data on the device 0 93.1MB HTTP GET (begin) Video file stored on the YouTube server Video file stored on the YouTube server Video file stored on the YouTube server Downloaded video data on the device  Single Request for downloading a video file  Byte Range Request (URI Parameter): Request from the selected point to the end of chunk  Begin Request (URI Parameter): Request from the selected point to the end of file
  3. 3. Copyright © 2002-2013NMC Consulting Group. All rights reserved. 3 Netmanias Technical Document: Analysis of YouTube Video Delivery (360p, 720p) 1. YouTube 360p (PSY Gangnam Style) PSY Gangnam Style 360p Playback Time: 4m 13s File Size: 27,909,147bytes PC Video Data (1,781,747B) GET /…itag=34…&range=13-1781759 (1,781,747B)… 200 OK (Content-Length: 1,781,747. Connection: keep-alive) TCP Session Setup (src Port = 4160, dst Port = 80) Select Content GET /…itag=34…&range=1781760-3563519 (1,781,760B)… 200 OK (Content-Length: 1,781,760. Connection: keep-alive) Video Data (1,781,760B) GET /…itag=34…&range= 3563520-5345279 (1,781,760B)… 200 OK (Content-Length: 1,781,760. Connection: keep-alive) Video Data (1,781,760B) GET /…itag=34…&range=24944640-26726399 (1,781,760B)… 200 OK (Content-Length: 1,781,760. Connection: keep-alive) Video Data (1,781,760B) GET /…itag=34…&range=26726400-28508159 (1,781,760B)… 200 OK (Content-Length: 1,182,747. Connection: keep-alive) Video Data (1,182,747B) … TCP Session Termination (4160) (Server sends TCP FIN after 30 seconds) … ① HTTP Progressive Download based on Byte Range request : Download video data by requesting 1.78MB chunk continuously ② Chunk request uses range parameter of Request URI (It does not use Range header of HTTP) ③ Four burst requests(Chunk 1 ~ Chunk 4) at the beginning, and then request at interval of 15 ~ 20 seconds ④ Last chunk is also requested with 1.78MB (even though last chunk is smaller than 1.78MB) ⑤ When user pauses during watching the video, next chunk request(HTTP GET) is not sent to the YouTube server, which means additional video downloading is not happened. That is similar with HTTP adaptive streaming (Downloading video only when watching a video) ⑥ Deliver the entire chunks of the video by single TCP session ⑦ Video quality is specified by itag parameter of Request URI (360p: itag=34) Video Request and Delivery Video Traffic Delivery Pattern Features of Video Request & Delivery Buffering Stage Steady State Single TCP Session 30s
  4. 4. Copyright © 2002-2013NMC Consulting Group. All rights reserved. 4 Netmanias Technical Document: Analysis of YouTube Video Delivery (360p, 720p) YouTube 360p (PSY Gangnam Style) Chunk “Byte Range” requested by device [B] “# of Chunk Size” requested by device [B] “# of Bytes” downloaded to device [B] Video File on the YouTube server [B] 1 13 - 1,781,759 1,781,747 1,781,747 2 1,781,760 - 3,563,519 1,781,760 1,781,760 3 3,563,520 - 5,345,279 1,781,760 1,781,760 4 5,345,280 - 7,127,039 1,781,760 1,781,760 5 7,127,040 - 8,908,799 1,781,760 1,781,760 6 8,908,800 - 10,690,559 1,781,760 1,781,760 7 10,690,560 - 12,472,319 1,781,760 1,781,760 8 12,472,320 - 14,254,079 1,781,760 1,781,760 9 14,254,080 - 16,035,839 1,781,760 1,781,760 10 16,035,840 - 17,817,599 1,781,760 1,781,760 11 17,817,600 - 19,599,359 1,781,760 1,781,760 12 19,599,360 - 21,381,119 1,781,760 1,781,760 13 21,381,120 - 23,162,879 1,781,760 1,781,760 14 23,162,880 - 24,944,639 1,781,760 1,781,760 15 24,944,640 - 26,726,399 1,781,760 1,781,760 16 26,726,400 - 28,508,159 1,781,760 1,182,747 File Size: 27,909,147B (360p) (Including 0 ~ 12 bytes) Video Request and Delivery Procedure: Chunk Concept – Range Request
  5. 5. Copyright © 2002-2013NMC Consulting Group. All rights reserved. 5 Netmanias Technical Document: Analysis of YouTube Video Delivery (360p, 720p) YouTube 360p (PSY Gangnam Style) – HTTP Message Request URI GET /videoplayback?algorithm=throttle- factor&burst=40&cp=U0hUR1JUTl9LS0N ONF9KTlJIOllkWFdMZFBGaVV0&expire=1 352290761&factor=1.25&fexp=907605% 2C912307%2C908415%2C910207%2C91409 1%2C916615%2C922401%2C912806%2C927 201%2C925003%2C913546%2C913556%2C9 16805%2C920201%2C900816%2C911112%2 C901451&gcr=kr&id=f5b664a7bab5f5fd &ip=58.180.202.52&ipbits=8&itag=34 &keepalive=yes&key=yt1&ms=au&mt=13 52267952&mv=m&range=13- 1781759&signature= 4A5B6DF29F7810CF97687B18C18C17D004 2361EE.5B0C56158BA633F9589EADF46A9 1B0FC43F4F648&source=youtube&spara ms=algorithm%2Cburst%2Ccp%2Cfactor %2Cgcr%2Cid%2Cip%2Cipbits%2Citag%2 Csource%2Cupn%2Cexpire&sver=3&upn= JQcBAGGnDuA HTTP/1.1 단말의 IP 주소 itag=34: 재생화질 = 360P 1,781,747 Bytes 전송할 것을 알림 HTTP GET Message HTTP 200 OK Message Video Data Range=13-1781759: 해당 범위의 컨텐츠를 달라 (Byte 단위) Request URI Device IP address itag=34: Video Quality=360p Range=13-1781759: Byte Range Request Server sends 1,781,747 bytes Video Data
  6. 6. Copyright © 2002-2013NMC Consulting Group. All rights reserved. 6 Netmanias Technical Document: Analysis of YouTube Video Delivery (360p, 720p) 2. YouTube 360p (PSY Gangnam Style): Jump ① When user jumps after receiving 4th chunk data, request of 11th chunk is sent to the YouTube server in this example. This chunk request includes range=19014386-19599359 in Request URI, which means device requests 585,974 bytes chunk, not 1,78MB ② After receiving part of 11th chunk (585,974 bytes), device requests next 1.78MB chunk ③ [NOTE] When user jumps during receiving chunk data, device terminates TCP session for stop downloading. After then, device creates new TCP session with YouTube server to download chunk from the selected point PC Video Data (1,781,747B) GET /…itag=34…&range=13-1781759 (1,781,747B)… 200 OK (Content-Length: 1,781,747. Connection: keep-alive) TCP Session Setup (src Port = 4160, dst Port = 80) Select Content Jump GET /…itag=34…&range=5345280-7127039 (1,781,760B)… 200 OK (Content-Length: 1,781,760. Connection: keep-alive) Video Data (1,781,760B) GET /…itag=34…&range=19014386-19599359 (584,974B)… 200 OK (Content-Length: 584,974. Connection: keep-alive) Video Data (584,974B) GET /…itag=34…&range=19599360-21381119 (1,781,760B)… 200 OK (Content-Length: 1,781,760. Connection: keep-alive) Video Data (1,781,760B) GET /…itag=34…&range=26726400-28508159 (1,781,760B)… 200 OK (Content-Length: 1,182,747. Connection: keep-alive) Video Data (1,182,747B) … … .. .. 0 27.9MB 1 2 3 4 12 13 14 15 1611 Video Request and Delivery Video Traffic Delivery Pattern Features of Video Request & Delivery First Request Jump Part of Chunk 11Single TCP Session 30s TCP Session Termination (4160) (Server sends TCP FIN after 30 seconds) Downloaded data on the device Video file stored on the YouTube server Chunk Request from the selected point (part of chunk)
  7. 7. Copyright © 2002-2013NMC Consulting Group. All rights reserved. 7 Netmanias Technical Document: Analysis of YouTube Video Delivery (360p, 720p) YouTube 360p (PSY Gangnam Style): Jump Chunk “Byte Range” requested by device [B] “# of Chunk Size” requested by device [B] “# of Bytes” downloaded to device [B] Video File on the YouTube server [B] 1 13 - 1,781,759 1,781,747 1,781,747 2 1,781,760 - 3,563,519 1,781,760 1,781,760 3 3,563,520 - 5,345,279 1,781,760 1,781,760 4 5,345,280 - 7,127,039 1,781,760 1,781,760 5 6 7 8 9 10 11 19,014,386 - 19,599,359 584,974 584,974 12 19,599,360 - 21,381,119 1,781,760 1,781,760 13 21,381,120 - 23,162,879 1,781,760 1,781,760 14 23,162,880 - 24,944,639 1,781,760 1,781,760 15 24,944,640 - 26,726,399 1,781,760 1,781,760 16 26,726,400 - 28,508,159 1,781,760 1,182,747 File Size: 27,909,147B (360p) (Including 0 ~ 12 bytes) Video Request and Delivery Procedure: Chunk Concept – Range Request Jump to Here
  8. 8. Copyright © 2002-2013NMC Consulting Group. All rights reserved. 8 Netmanias Technical Document: Analysis of YouTube Video Delivery (360p, 720p) YouTube 360p (PSY Gangnam Style): Jump – HTTP GET Message GET /videoplayback?algorithm=throttle- factor&burst=40&cp=U0hURlZLUV9LS0NONF9ORVVCOi1qTVZZcEpFVWt6&expire=1351603161&factor=1.25&fexp=909 713%2C916615%2C922401%2C920704%2C912806%2C927201%2C925003%2C913546%2C913556%2C920201%2C900816%2C91 1112%2C901451&gcr=kr&id=f5b664a7bab5f5fd&ip=118.131.192.218&ipbits=8&itag=34&keepalive=yes&key=yt1 &ms=au&mt=1351576871&mv=m&range=19014386-19599359&signature=B79D77FC 442BE39B0154FAF729AD501F4A9DAEDF.8A33028141001906CEDC2C3534C13A910DFB49F7&source=youtube&sparams=a lgorithm%2Cburst%2Ccp%2Cfactor%2Cgcr%2Cid%2Cip%2Cipbits%2Citag%2Csource%2Cupn%2Cexpire&sver=3&upn= 2vdF82swiFg HTTP/1.1 Host: o-o---preferred---sn-i3b76n7e---v22---lscache1.c.youtube.com Connection: keep-alive User-Agent: Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.4 (KHTML, like Gecko) Chrome/22.0.1229.94 Safari/537.4 Accept: */* Referer: http://www.youtube.com/watch?v=9bZkp7q19f0 Accept-Encoding: gzip,deflate,sdch Accept-Language: en-US,en;q=0.8,ko;q=0.6 Accept-Charset: windows-949,utf-8;q=0.7,*;q=0.3 HTTP GET Header: Jump to any part of video
  9. 9. Copyright © 2002-2013NMC Consulting Group. All rights reserved. 9 Netmanias Technical Document: Analysis of YouTube Video Delivery (360p, 720p) 3. YouTube 720p (PSY Gangnam Style) HTTP GET /videoplayback...&itag=22… HTTP 200 OK (Content-Length: 93,076,756) Video Data (93,076,756B) TCP Session Setup Select Content PC Video Request and Delivery Video Traffic Delivery Pattern Features of Video Request & Delivery ① HTTP Progressive Download: Download entire file by single request (HTTP GET) ② In this HTTP GET message, range and begin parameter are not included in Request URI (Device requests video data from the beginning to the end) ③ Deliver the video file by single TCP session ④ Video quality is specified by itag parameter of Request URI (720p: itag=22) PSY Gangnam Style 720p Playback Time: 4m 13s File Size: 93,076,756bytes TCP Session Termination (Server sends the last packet with FIN flag)
  10. 10. Copyright © 2002-2013NMC Consulting Group. All rights reserved. 10 Netmanias Technical Document: Analysis of YouTube Video Delivery (360p, 720p) 4. YouTube 720p (PSY Gangnam Style): Jump Video Request and Delivery Video Traffic Delivery Pattern Features of Video Request & Delivery ① Initial Request • Request: Device creates TCP session(1756) and sends HTTP GET. Device requests entire video file (There are no range and begin parameter in Request URI) • Response: HTTP 200 OK (Content-Length: 93MB) message and video data ② Jump to 2 minutes point • Device terminates TCP session(1756) to prevent downloading a video file • Request: Device creates new TCP session(1757) and sends HTTP GET message, which includes time information about jump point with begin parameter(begin=120793) in Request URI • Response: HTTP 200 OK (Content-Length = 50MB) message and video data PC HTTP GET /videoplayback...&itag=22… HTTP 200 OK (Content-Length: 93,076,756. Connection: Close) Video Data (22.7MB) TCP Session Setup (src Port = 1756, dst Port = 80) Select Content 1st Jump to 2 minutes point HTTP GET /videoplayback...&itag=22…&begin=120793 (2 minutes point)… HTTP 200 OK (Content-Length: 50,034,506. Connection: Close) Video Data (11.5MB) TCP Session Setup (src Port = 1757, dst Port = 80) 2nd Jump to 3 minutes point HTTP GET /videoplayback...&itag=22…&begin=180380 (3 minutes point)… HTTP 200 OK (Content-Length: 28,103,902. Connection: Close) Video Data (28.1MB) TCP Session Setup (src Port = 1760, dst Port = 80) TCP Session Termination (1756) TCP Session Termination (1757) Initial Request 1st Jump to 2 minutes 2nd Jump to 3 minutes 0 22.7MB 2m 3m GET GET /…begin=120793 GET /…begin=180380 4m 13s TCP Session Termination (1760) (Server sends the last packet with FIN flag) Request from the selected point to the end of video file
  11. 11. Copyright © 2002-2013NMC Consulting Group. All rights reserved. 11 Netmanias Technical Document: Analysis of YouTube Video Delivery (360p, 720p) YouTube 720p (PSY Gangnam Style): Jump – HTTP Message Initial Request Jump to 2 minutes point
  12. 12. Copyright © 2002-2013NMC Consulting Group. All rights reserved. 12 Netmanias Technical Document: Analysis of YouTube Video Delivery (360p, 720p) 5. YouTube Video Quality Change (360p → 720p) Video Request and Delivery Video Traffic Delivery Pattern Features of Video Request & Delivery ① While user watches a 360p video, device sends 1.78MB Range Request (In this example, chunk 1 ~ 4 are downloaded to the device) ② [Quality Change to 720p] When user changes video quality to 720p, device setups new TCP session with YouTube server and sends HTTP GET message • Quality Change: itag=22(720p) of Request URI in HTTP GET • Starting Point: begin=15845(15.8 seconds) of Request URI in HTTP GET • Device downloads video file from 15.8 seconds point to the end • YouTube server sends the last video data packet with FIN flag to terminate TCP session(1861) ③ [What about 360p after Quality Change?] 360p video chunk is not downloaded to the device any more because device does not send Chunk Request (HTTP GET). TCP session(1846) is not terminated right after quality change, but it is terminated after 30 seconds by sending TCP FIN packet by YouTube server PC Select Content TCP Session Setup (src Port = 1846, dst Port = 80) GET /…&itag=34…&range=13-1781759 (1,781,747B)… Video Data (1,781,747B) Video Data (1,781,760B) GET /…&itag=34…&range=3563520-5345279 (1,781,760B)… Video Data (1,781,760B) GET /…&itag=34…&range=5345280-7127039 (1,781,760B)… Video Data (1,781,760B) GET /…&itag=34…&range=1781760-3563519 (1,781,760B)… TCP Session Setup (src Port = 1861, dst Port = 80) GET /...&itag=22…&begin=15845 (15.8 seconds point)… 200 OK (Content-Length: 89880766. Connection: Close) Video Data (89.8MB) 200 OK (Content-Length: 1,781,747. Connection: keep-alive) 200 OK (Content-Length: 1,781,760. Connection: keep-alive) 200 OK (Content-Length: 1,781,760. Connection: keep-alive) 200 OK (Content-Length: 1,781,760. Connection: keep-alive) 360p 720p Quality Change (720p) at 15.8s Initial Request (360p) 4 GETs (360p) 1 GET (720p) TCP Session(1846) YouTube IP: 173.194.51.10 360p (4 x 1.78MB) TCP Session (1861) YouTube IP: 173.194.51.14 720p (89.8MB) 173.194.51.10 173.194.51.14   30s Change to 720p TCP Session Termination (1861) (Server sends the last packet with FIN flag) TCP Session Termination (1846) (Server sends TCP FIN after 30 seconds)
  13. 13. Copyright © 2002-2013NMC Consulting Group. All rights reserved. 13 Netmanias Technical Document: Analysis of YouTube Video Delivery (360p, 720p) YouTube Video Quality Change (360p → 720p): HTTP Message itag=34: Video Quality=360p itag=22: Video Quality=720p Chunk Request using Range Parameter Terminate TCP session after transmitting remaining data 89.8MB Request Video from 15.8 seconds point to the end
  14. 14. Copyright © 2002-2013NMC Consulting Group. All rights reserved. 14 Carrier WiFi Data Center Migration Wireline Network LTE Mobile Network Mobile WiMAX Carrier Ethernet FTTH Data Center Policy Control/PCRF IPTV/TPS Metro Ethernet MPLS IP Routing 99 00 01 02 03 04 05 06 07 08 09 10 11 12 13 eMBMS/Mobile IPTV Services CDN/Mobile CDN Transparent Caching BSS/OSS Cable TPS Voice/Video Quality IMS LTE Backaul Netmanias Research and Consulting Scope Visit http://www.netmanias.com to view and download more technical documents.

×