I did a little research, it turns out they are stored as 3 second Transport Stream files using AVC/AAC encoding for video/audio.
If you press F12 in most browsers you can bring up the Developer Tools. In firefox you can press the icon to the left and hoover/click an element on the page to see the actual html code.
Scroll up a bit and find the DIV with playerContainer as ID. The data-config attribute of the div can be expanded and it contains the JSON variables, including the URL that configures the player.
To make the JSON more readable, you can put it into some online json viewer, for example:
http://codebeautify.org/jsonviewer
If you press beautify you can see the content more readable to the right.
You will notice that the video_url is actually a playlist:
Code:
https://video.twimg.com/ext_tw_video/806523101378772992/pu/pl/CvL38VeYPx1gKfX2.m3u8
If you open the file with a text editor like Notepad++:
Code:
#EXTM3U
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=256000,RESOLUTION=240x240,CODECS="mp4a.40.2,avc1.42001f"
/ext_tw_video/806523101378772992/pu/pl/240x240/GJpKyOeG285Z4nUK.m3u8
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=832000,RESOLUTION=480x480,CODECS="mp4a.40.2,avc1.42001f"
/ext_tw_video/806523101378772992/pu/pl/480x480/Fhoj2MWs1hbj9F88.m3u8
The playlist is actually just an url-list of playlists with different resolution. in this case 240x240 and 480x480.
However, the domain is stripped so the 480x480 url would actually be:
Code:
https://video.twimg.com/ext_tw_video/806523101378772992/pu/pl/480x480/Fhoj2MWs1hbj9F88.m3u8
Downloading the file and again open with Notepad++:
Code:
#EXTM3U
#EXT-X-VERSION:6
#EXT-X-MEDIA-SEQUENCE:0
#EXT-X-TARGETDURATION:3
#EXT-X-ALLOW-CACHE:YES
#EXTINF:3.000,
/ext_tw_video/806523101378772992/pu/vid/0/3000/480x480/zp2XfNNE9F1rII5b.ts
#EXTINF:3.000,
/ext_tw_video/806523101378772992/pu/vid/3000/6000/480x480/7ViunPjQRKOiSqQy.ts
#EXTINF:3.000,
/ext_tw_video/806523101378772992/pu/vid/6000/9000/480x480/WlXU-MZbn4hCuSVR.ts
#EXTINF:3.000,
/ext_tw_video/806523101378772992/pu/vid/9000/12000/480x480/WJ0l9z_nN8rLBJnC.ts
#EXTINF:3.000,
/ext_tw_video/806523101378772992/pu/vid/12000/15000/480x480/DaSNLQr5CI8DYkLW.ts
.
.
.
Let's take the first url and add domain:
Code:
https://video.twimg.com/ext_tw_video/806523101378772992/pu/vid/0/3000/480x480/zp2XfNNE9F1rII5b.ts
You can download the .ts file and play with mpc or vlc, but it's only the first three seconds.
In theory you could probably download all parts and merge them, but using a downloader or website is of course a lot easier.
It is also possible that there are other links to the files where you stream the complete file directly, but you would have to listen to network traffic urls or study the javascript for the player.
Finally, this video is a few years old but still valid and very interesting: