Skip to content

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

Repository files navigation

SJTU Lecture Video

An unofficial Python client and CLI for Lecture Video New on SJTU Canvas (oc.sjtu.edu.cn). List recordings, resolve available views, resume downloads, and prepare timestamped transcripts and video frames for study.

Canvas operations use canvasapi. Authentication supports a Canvas API token or a browser-assisted jAccount session. Speech recognition runs locally with faster-whisper or, optionally, OpenVINO on Intel NPU.

Install from source

Requires Python 3.11+; Python 3.13 is recommended for optional native dependencies. Install FFmpeg and ffprobe through your system package manager for media processing.

cd sjtu-lecture-video
python3.13 -m venv .venv
source .venv/bin/activate
python -m pip install -e '.[browser,transcribe]'

Alternatively, use uv venv --python 3.13 .venv and uv pip install --python .venv/bin/python -e '.[browser,transcribe]'. For catalog access and downloads alone, install -e .. Extras: browser, transcribe, npu, dev.

Quick start

Copy .env.example to .env and set your Canvas token locally, or use browser-assisted login.

sjtu-lecture-video courses
sjtu-lecture-video recordings COURSE_ID
sjtu-lecture-video inspect COURSE_ID RECORDING_ID
sjtu-lecture-video download COURSE_ID RECORDING_ID --view VIEW_NUMBER --output lecture.mp4
sjtu-lecture-video prepare COURSE_ID --recording RECORDING_ID --start 900 --duration 300

Use IDs returned by your own course catalog. Commands return JSON; progress goes to stderr. The first local transcription downloads model weights. prepare prefers platform captions when available; otherwise it uses local Whisper and stores resumable evidence under /tmp/canvas-tools. Set --root PATH to keep it in persistent storage.

from sjtu_lecture_video import LectureVideoClient

with LectureVideoClient.from_env() as client:
    recordings = client.list_recordings(course_id)
    print(recordings)

Documentation

Companion agent skill

The sjtu-lecture-study repository contains the Codex skill that reviews this package's transcripts and frames and writes timestamped notes. Clone it separately and follow its README. The package works independently; it does not bundle or install agent instructions.

Scope and license

This integration is unofficial and may need updates when SJTU changes its services. It uses the recordings your account can access. Keep tokens, sessions, signed media URLs, and course content private. MIT covers the source code and grants no rights to redistribute lecture recordings.

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages