Download all .m4s files of a mpeg dash stream
When I open this page I can see in Firefox Web Developer Tools / "Network" tab that the page loads files with .mpd extension.
And then every few seconds it loads a file/stream with .m4s extension named like
000000.m4s
000001.m4sHow can I download the whole streamed video of this kind?
I think I need to download all .m4s segments but do not know the Linux command or the Windows software to do it. Then I will need to merge these files to a single .mp4
I already tried InviDownloader, but it has numerous problems.
22 Answers
Answering the question "How can I download the whole streamed video of this kind?"
You can use youtube-dl on the DASH mpd manifest URL to download the video, it worked for me.
youtube-dl {mpd_url}Maybe you should make clear in the title if you really want these intermediate m2s files or you just want the whole video file.
51) download IS.mp4 and all *.m4s for video (use wget) and merge IS.mp4 and *.m4s to one file video.mp4
2) download IS.mp4 and all *.m4s for audio and merge IS.mp4 and *.m4s to one file audio.mp4
3) merge video and audio into one file (use ffmpeg -i video.mp4 -i audio.mp4 -c copy movie.mkv)
EDIT
Example how to download audio stream:
echo "IS.mp4" >"links.txt"
seq -f "%06g.m4s" 0 394 >>"links.txt"
wget -i "links.txt" -O "audio.mp4" -B ""Initial part for audio stream is IS.mp4, audio consists of 394 parts (in a format of 6 digits) and base URL path for audio stream is . All these information can be obtained from .mpd file.
NOTE: base URL of audio and video stream is changed eachtime you play the video
5