User Tools

Site Tools


public:downloading_certain_videos_of_a_certain_university

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
Last revisionBoth sides next revision
public:downloading_certain_videos_of_a_certain_university [2019/07/25 17:52] – created fangfufupublic:downloading_certain_videos_of_a_certain_university [2022/07/17 22:31] fangfufu
Line 1: Line 1:
-====== Downloading certain videos of a certain university ====== +====== Downloading Graduation Ceremony Videos for University of East Anglia in 2019 ====== 
-This is a rather amusing story of my successful attempt at downloading certain videos from a certain university. I have to say it has been a rather educational experience.+This is a rather amusing story of my successful attempt at downloading graduation videos from a University of East Anglia. I have to say it has been a rather educational experience. 
  
-===== The video for The Degree That Matters ===== +===== Ethical Statement ===== 
-Well, it is called The Degree That Matters, because two of my good friends are in that ceremony. I also happen to know a lot of people who study that degree for some reason.+When I was an undergradI was told that I have to write ethical statement for my final year project, otherwise I would lose marks. So I think I probably should add an ethical statement for this web page. 
 + 
 +Quite frankly, I don't think it is fair to charge new graduates twenty pounds for the DVD version of the ceremonyor twenty-five pounds for the HD version of the ceremony on a USB memory stick. A lot of university provides this kind of video for free, for example University of York. Rumour says University of Bath also provides it for free for their graduates.  
 + 
 +One of the more amusing conversation I had was with a GP. He asked me why I don't charge fifteen pounds for these videos, my reply to him was that "I hate capitalism". ((Well, I will definitely get myself into trouble if I start selling these videos at a cheaper price! I may be dumb, but I'm not stupid. ))I do happen to believe charging so much for the graduation video is exploitative. And yes, on this occasion, I would like to denounce capitalism. LONG LIVE COMMUNISM!!!  
 + 
 +Anyway, the people who studied Medicine have to do a Situational Judgement Test. I definitely would not pass the CS equivalent of Situational Judgement Test.  
 + 
 +===== The graduation video for medicine ===== 
 +I wanted to download the graduation video for medicine because two of my good friends are in that ceremony. I also happen to know a lot of people who study that degree for some reason.
  
-The certain ceremony for this degree happens to be the first ceremony during the certain week -- it happened the first thing on Monday morning. The university promised to provide live stream of the ceremony. Unfortunately the third-party provider was underprepared. They did not expect the number of people who attempted to stream the ceremony, so their server crashed. This was really disappointing, because I got up early to watch the certain stream live in the lecture theatre. I and another friend sat in the lecture theatre for 1.5 hrs, and we saw nothing. This was because the lecture theatre used the same public live stream URL provided by that third-party. Effectively I got up early for nothing. However this did lead to the decision of providing an online video recording of live stream. +The graduation ceremony for this degree happens to be the first ceremony during the graduation week -- it happened the first thing on Monday morning. The university promised to provide live stream of the ceremony. Unfortunately the third-party provider was underprepared. They did not expect the number of people who attempted to stream the ceremony, so their server crashed. This was really disappointing, because I got up early to watch the graduation stream live in the lecture theatre. I and another friend sat in the lecture theatre for 1.5 hrs, and we saw nothing. This was because the lecture theatre used the same public live stream URL provided by that third-party. Effectively I got up early for nothing. However this did lead to the decision of providing an online video recording of live stream. 
  
-A quick inspection of the source code for the web page with the video recording does not reveal where the source video was located. So I decided to fire up the ''Developer tools'' of Google Chrome. I immediate realised that the full video was split into multiple segments, and a Javascript was sending out request for individual video segments. It is possible to replay the HTTP request sent from the browser to the server, by right clicking the individual network event, and click ''copy as cURL''. The copied text is a command for ``cURL`` to replay the chosen HTTP request. However, I still had to download the video segment by segment, then merge the whole video. +A quick inspection of the source code for the web page with the video recording does not reveal where the source video was located. So I decided to fire up the ''Developer tools'' of Google Chrome. I immediate realised that the full video was split into multiple segments, and a Javascript was sending out request for individual video segments. It is possible to replay the HTTP request sent from the browser to the server, by right clicking the individual network event, and click ''copy as cURL''. The copied text is a command for ''cURL'' to replay the chosen HTTP request. However, I still had to download the video segment by segment, then merge the whole video. 
  
-So I seeked to the beginning and the end of the video, recorded the segment filename. I wrote a for loop in ''Bash'', which enumerated all the ``cURL`` commands necessary for downloading every segment. I then merged the video segments together using ``ffmpeg``, the details of I merged the video fragment together is described in the next section. +So I seeked to the beginning and the end of the video, recorded the segment filename. I wrote a for loop in ''Bash'', which enumerated all the ''cURL'' commands necessary for downloading every segment. I then merged the video segments together using ''ffmpeg'', the details of I merged the video fragment together is described in the next section. 
  
 I have to say in some ways, it was great that the video live stream failed, otherwise I would not have been able to download the video stream - the best thing I could have done was doing a screen capture. I did not figure out how to download live stream until Wednesday morning. My housemates had their ceremony on Tuesday morning - all I could do for them was doing a screen capture.  I have to say in some ways, it was great that the video live stream failed, otherwise I would not have been able to download the video stream - the best thing I could have done was doing a screen capture. I did not figure out how to download live stream until Wednesday morning. My housemates had their ceremony on Tuesday morning - all I could do for them was doing a screen capture. 
  
-===== Downloading certain other videos ===== +===== Downloading other graduation videos ===== 
-Another one of my friend had her certain ceremony on Friday. After obtaining videos for two separate ceremonies, I wonder if I could take my art further. I felt the screen captures I did for my housemates was not good enough. +Another one of my friend had her graduation ceremony on Friday. After obtaining videos for two separate ceremonies, I wonder if I could take my art further. I felt the screen captures I did for my housemates was not good enough. 
  
 I thought about capturing my own network traffic, then extract the video fragment from the network traffic dump. There are two problems with this approach:  I thought about capturing my own network traffic, then extract the video fragment from the network traffic dump. There are two problems with this approach: 
Line 36: Line 45:
     tcpdump chromium     tcpdump chromium
  
-We need chromium [(https://www.chromium.org/)] to play the certain video, it honours the ''$SSLKEYLOGFILE'' environmental variable. We need tcpdump [(https://www.tcpdump.org/)] to capture the network traffic. +We need chromium [(https://www.chromium.org/)] to play the graduation video, it honours the ''$SSLKEYLOGFILE'' environmental variable. We need tcpdump [(https://www.tcpdump.org/)] to capture the network traffic. 
  
 You also need to set up a shared folder between your virtual machine and the host. Please follow the guide here [(https://help.ubuntu.com/community/VirtualBox/SharedFolders)]. You also need to set up a shared folder between your virtual machine and the host. Please follow the guide here [(https://help.ubuntu.com/community/VirtualBox/SharedFolders)].
Line 69: Line 78:
     for i in `ls destdir/*.ts* | grep -v \( |sort -V`; do echo file $i >> list; done     for i in `ls destdir/*.ts* | grep -v \( |sort -V`; do echo file $i >> list; done
     ffmpeg -safe 0 -f concat -i list -c copy -bsf:a aac_adtstoasc output.mp4     ffmpeg -safe 0 -f concat -i list -c copy -bsf:a aac_adtstoasc output.mp4
-    +
 The first command generates the list of the video fragments to be concatenated. Note the ''-V'' option in ''sort'', by using that option, the filenames are sorted in "natural sort". So if you have numbers "1 3 10 2", it gets sorted into "1 2 3 10" rather than "1 10 2 3". Normally ''sort'' sorts texts character-by-character.  The first command generates the list of the video fragments to be concatenated. Note the ''-V'' option in ''sort'', by using that option, the filenames are sorted in "natural sort". So if you have numbers "1 3 10 2", it gets sorted into "1 2 3 10" rather than "1 10 2 3". Normally ''sort'' sorts texts character-by-character. 
- 
-===== Ethical Statement ===== 
-Jura V jnf na haqretenq, V jnf gbyq gung V unir gb jevgr rguvpny fgngrzrag sbe zl svany lrne cebwrpg, bgurejvfr V jbhyq ybfr znexf. Fb V guvax V cebonoyl fubhyq nqq na rguvpny fgngrzrag sbe guvf jro cntr. 
- 
-Dhvgr senaxyl, V qba'g guvax vg vf snve gb punetr arj tenqhngrf gjragl cbhaqf sbe gur QIQ irefvba bs gur prerzbal, be gjragl-svir cbhaqf sbe gur UQ irefvba bs gur prerzbal ba n HFO zrzbel fgvpx. N ybg bs havirefvgl cebivqrf guvf xvaq bs ivqrb sbe serr, sbe rknzcyr Havirefvgl bs Lbex. Ehzbhe fnlf Havirefvgl bs Ongu nyfb cebivqrf vg sbe serr sbe gurve tenqhngrf.  
- 
-Bar bs gur zber nzhfvat pbairefngvba V unq jnf jvgu n TC. Ur nfxrq zr jul V qba'g punetr svsgrra cbhaqf sbe gurfr ivqrbf, zl ercyl gb uvz jnf gung "V ungr pncvgnyvfz". ((Jryy, V jvyy qrsvavgryl trg zlfrys vagb gebhoyr vs V fgneg fryyvat gurfr ivqrbf ng n purncre cevpr! V znl or qhzo, ohg V'z abg fghcvq. ))V qb unccra gb oryvrir punetvat fb zhpu sbe gur tenqhngvba ivqrb vf rkcybvgngvir. Naq lrf, ba guvf bppnfvba, V jbhyq yvxr gb qrabhapr pncvgnyvfz. YBAT YVIR PBZZHAVFZ!!!  
- 
-Naljnl, gur crbcyr jub qb Gur Qrterr Gung Znggref unir gb qb n FWG. V qrsvavgryl jbhyq abg cnff gur PF rdhvinyrag bs FWG.  
  
 ===== Other notes ===== ===== Other notes =====
-I have no idea why the certain ceremony video file for The Degree That Matters is bigger than other (2.7GB vs 1.1GB). I don't know if it actually has more entropy compared to other certain ceremony videos, or if whoever made it used a lower compression settings. To be fair, the standard variant of The Degree That Matters is 5 years compared to 3 years for a normal degree. Perhaps the file size reflects that. +I have no idea why the graduation ceremony video file for The Medicine is bigger than other (2.7GB vs 1.1GB). I don't know if it actually has more entropy compared to other graduation ceremony videos, or if whoever made it used a lower compression settings. To be fair, the standard variant of The Medicine is 5 years compared to 3 years for a normal degree. Perhaps the file size reflects that.