Skip to content

Instantly share code, notes, and snippets.

@henrydatei
Last active September 8, 2025 10:44
Show Gist options
  • Save henrydatei/b85f2ffbe0390b2e8b069ab1e5765986 to your computer and use it in GitHub Desktop.
Save henrydatei/b85f2ffbe0390b2e8b069ab1e5765986 to your computer and use it in GitHub Desktop.
Download a video from Videocampus Sachsen
#file=$1
#videoname=$(echo "$file" | cut -d "." -f1)
#echo "$videoname"
touch playlist.txt
touch urllist.txt
key=$1
videoname=$2
#keystring=$(cat $file | grep -o -E "key=[0-9,a-z]+")
#key=$(echo "$keystring" | cut -c 5-)
link="https://videocampus.sachsen.de/media/hlsMedium/key/$key/format/auto/ext/mp4/learning/0/path/m3u8"
playlist=$(curl -s "$link" | tail -n 1)
newLink="https://videocampus.sachsen.de/media/hlsMedium/key/$key/format/auto/ext/mp4/learning/0/path/$playlist"
wget -O playlist.m3u8 "$newLink"
for line in $(cat playlist.m3u8 | grep ".ts"); do
partLink="https://videocampus.sachsen.de/media/hlsMedium/key/$key/format/auto/ext/mp4/learning/0/path/$line"
echo "$partLink" >> urllist.txt
echo "file $line" >> playlist.txt
done
cat urllist.txt | parallel -j 50 'wget {}'
ffmpeg -f concat -i playlist.txt -c copy $videoname.mp4
rm playlist.m3u8
rm playlist.txt
rm urllist.txt
rm *.ts
@FestplattenSchnitzel
Copy link

yt-dlp fully supports Videocampus Sachsen, e.g.

yt-dlp https://videocampus.sachsen.de/video/studieren-in-dresden-deine-uni-no-matter-what/e270387f313939f18be0ff9c55beee37

In case you want to download a video that's gated behind a login there's also the --cookies-from-browser command line option.

Should you encounter any problem with the yt-dlp extractor please open an issue at their repository and ping me there (I'm the author and maintainer of that extractor).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment