commit 00031c0f617bc37bd65c6444b0c1602bf4611980 Author: juyoung Date: Fri Apr 25 02:26:56 2025 -0700 Initial release diff --git a/README.md b/README.md new file mode 100644 index 0000000..63d107e --- /dev/null +++ b/README.md @@ -0,0 +1,19 @@ +``` +Kalturadl +========= + +Download and compress lecture videos from Kaltura on Canvas + +Right-click the video and select "Inspect" or press Ctrl + Shift + I. Go to +the "Network" tab. Play the video for 1-2 seconds, then pause it. Copy the +"index.m3u8" URL from the Network tab. + +Download the video: `bash dlm3u8.sh ` + +Compress the video to 480p: `ffmpeg -i -vf "scale=-1:480" -c:v +libvpx-vp9 -crf 30 -b:v 0 -cpu-used 4 -c:a aac -b:a 128k ` + +Archive all videos and course materials into a single file: `tar -cvpf - +/ | zstd -3 -o "_$(date +'%Y%m%d_%H%M%S').tar. +zst"` +``` diff --git a/archive.txt b/archive.txt new file mode 100644 index 0000000..28529eb --- /dev/null +++ b/archive.txt @@ -0,0 +1 @@ +tar -cvpf - cs101/ | zstd -3 -o "cs101_$(date +'%Y%m%d_%H%M%S').tar.zst" diff --git a/compress.txt b/compress.txt new file mode 100644 index 0000000..b9599d6 --- /dev/null +++ b/compress.txt @@ -0,0 +1 @@ +ffmpeg -i input.mkv -vf "scale=-1:480" -c:v libvpx-vp9 -crf 30 -b:v 0 -cpu-used 4 -c:a aac -b:a 128k output.mkv diff --git a/dlm3u8.sh b/dlm3u8.sh new file mode 100644 index 0000000..8398c39 --- /dev/null +++ b/dlm3u8.sh @@ -0,0 +1,6 @@ +#!/usr/bin/env bash +if [ "$#" -ne 2 ] ; then + echo "USAGE: $0 "; exit +fi +base=$(echo "$1" | rev | cut -d'/' -f2- | rev) +curl -s "$1" | grep -v "^#" | sed -e "s>^>$base/>" | xargs curl -s | ffmpeg -i pipe:0 -c:v copy -c:a copy "$2"