Html – How to download streaming video from xhr

flowplayerhtmlvideo

I'd like to download a video from a site that uses flowplayer. When I inspect the element, I get something like:
enter image description here
So we can say this video is streamed via xhr. Is there a way to get full video from these files? I tried Flash Player Downloader and it downloads the file in .mp4 but it's broken and can't repair it via some tools.

Best Answer

I don't have a real answer but I, too, tried to download such a fragmented stream. It's a pain. What helped me the answer to this: https://superuser.com/questions/1204497/download-all-m4s-files-of-a-mpeg-dash-stream

The idea is to get the stream's URL from the initial file IS.mp4. All subsequent parts numbered 000000.m4s, 000001.m4s, 000002.m4s, ... share the same location as IS.mp4

Generating the download links for all the parts, downloading and merging them, can be easily scripted, as shown in the linked post:

echo "IS.mp4" >"links.txt"
seq -f "%06g.m4s" 0 394 >>"links.txt"
wget -i "links.txt" -O "audio.mp4" -B "http://80.188.78.212/aa/ffc8a55fe6f203b0bffecb73efacb69b/1494953435522/eda9c6f7b1e3de68db8e3e5dc0d14fc7/dna-61924494877285694-pc/1002-1502/"

You have to download all parts, including IS.mp4 and then merge them to one file. Sometimes you'll also need to download the audio track in such way, too. After you have the video and audio track, combine them in one container.