The following is the replay of the live broadcast of Weiwei on Yibo on October 19th (the girly face, the barrage was successfully removed and converted into a format that DPlayer can recognize.
The video sometimes freezes due to the live broadcast; there are 15,768 barrages in total, the barrage file is 1.7 MB, and the first barrage appears at 13 seconds.
The live barrage pool and the DPlayer barrage pool do not affect each other, and you can also post barrages below.
Video and barrage transfer
On the second day of the live broadcast, I found that there was a replay of yesterday on the first broadcast. I was so happy that I fainted. After I woke up, I started to think of ways to download the video and comment.
Video
I couldn’t find a tool to download a live video online, so I had to do it myself. The browser developer tool saw that the page loaded an m3u8 file, and then downloaded the 354 video clips in the m3u8 file.
Wrote a shell script for batch downloading:
#!/bin/bash
for k in $( seq 1 354 )
do
wget http://xxx/${k}.ts
done
DPlayer has already supported the m3u8 format, without any subsequent processing of the video clips.
Video download completed.
Barrage
Also use developer tools to capture packets and find the pattern of barrage file requests.
The first barrage clip is http://xxx?ts=1, and the other barrage clips only differ in the ts parameter. Then the rule of ts parameters is like this: the parameter of the next fragment is the last ts value in the return value of the previous fragment.
After knowing the rules, I wrote a js script to download the barrage and convert the barrage into DPlayer format.
function ajaxDan(ts) {
$.ajax({
url: `http://xxx?ts=${ts}`,
success: function (data) {
var tli = parseInt(data.data.list[data.data.list.length - 1].ts) + 1;
console.log(tli);
data.data.list.map(function (i) {
dan[index] = {
author: "yizhibon" + i.nickname,
time: parseInt(i.ts) / 1000,
text: i.content,
color: "#fff",
type: "right",
};
index++;
});
ajaxDan(tli);
},
});
}
var dan = [];
var index = 0;
ajaxDan(1);
Running results: 536 video clips, 15768 comments

Then stringify the barrage object and copy it to the json file.
Done.