Desktop application in Java for downloading Microsoft Stream / SharePoint lecture recordings that you are already authorized to access.
The application automates:
- Microsoft login session persistence
- Stream/SharePoint embed resolution
- DASH manifest interception
- direct media download through
ffmpeg - multi-download queue management with per-file progress UI
Use this tool only for content you are authorized to access and download.
Before using the application, make sure the following software is installed on your system:
This application relies on ffmpeg to download and save video streams.
Install FFmpeg first and make sure it is available in your system PATH.
You can verify the installation with:
ffmpeg -version- Modern desktop UI built with Swing + FlatLaf
- Persistent Microsoft session (
state.json) after the first login - Multiple links management with one box per recording
- Add / remove links dynamically
- Parallel downloads
- Automatic file naming based on course and lecture number
- Per-file progress tracking with status and ETA
- Download through
ffmpegwithout re-encoding (-c copy)
Given a Microsoft Stream / SharePoint recording URL, the application:
- opens the page with an authenticated browser session
- retrieves the embed page URL
- intercepts the
videomanifestrequest - extracts the cleaned DASH manifest URL up to
format=dash - downloads the video with
ffmpeg
Generated filenames follow the pattern:
<COURSE_CODE> - Lecture <N>.mp4
- Java 17+
- Maven 3.9+
ffmpeginstalled and available inPATH
- Java 17
- Swing
- FlatLaf
- Playwright for Java
- ffmpeg
src/main/java/it/lagioiaproduction/
├─ app/
│ └─ TeamsLectureDownloaderApp.java
├─ ui/
│ ├─ MainFrame.java
│ ├─ theme/
│ │ ├─ AppColors.java
│ │ └─ AppTheme.java
│ ├─ components/
│ │ ├─ BadgeLabel.java
│ │ ├─ HintTextArea.java
│ │ ├─ LinkItemPanel.java
│ │ ├─ ModernButton.java
│ │ ├─ ProgressItemPanel.java
│ │ ├─ RoundedPanel.java
│ │ └─ ScrollableContentPanel.java
│ └─ sections/
│ ├─ HeaderSection.java
│ ├─ InputSection.java
│ ├─ ProgressSection.java
│ └─ StatsSection.java
├─ core/
│ ├─ DownloadCoordinator.java
│ ├─ FileNameGenerator.java
│ ├─ FfmpegRunner.java
│ ├─ StreamLoginService.java
│ └─ StreamManifestResolver.java
└─ model/
├─ DownloadProgress.java
├─ DownloadRequest.java
├─ DownloadSummary.java
└─ ResolvedStream.java
git clone https://github.com/<your-username>/teams-stream-lecture-downloader.git
cd teams-stream-lecture-downloadermvn exec:java -Dexec.mainClass="com.microsoft.playwright.CLI" -Dexec.args="install"mvn clean packagemvn exec:java -Dexec.mainClass="it.lagioiaproduction.app.TeamsLectureDownloaderApp"java -jar target/teams-stream-lecture-downloader-1.0.0.jarClick Login Microsoft and complete the authentication flow in the browser window.
The application stores the authenticated session in:
playwright/.auth/state.json
Use the + Nuovo link button to add separate input boxes and paste one URL per box.
Select the destination directory where videos will be saved.
Choose how many files should be processed at the same time.
Click Scarica video.
The application tries to infer:
- the course acronym from the SharePoint site slug
- the lecture number from the page title
Authentication is not handled through embedded credentials in the source code.
Instead, the application:
- opens a real browser window
- lets the user complete Microsoft login and MFA
- stores Playwright browser state locally
This approach is safer and more robust than hardcoding credentials.
Do not commit this file:
playwright/.auth/state.json
For each file, the UI shows:
- current status
- progress bar
- estimated progress percentage
- elapsed / total time
- download speed
- ETA when available
Progress information is parsed from ffmpeg output.
Make sure ffmpeg is installed and accessible from the system PATH.
Check with:
ffmpeg -versionIf downloads stop working because authentication is no longer valid:
- delete the saved auth state if needed
- run the app again
- click Login Microsoft
Main responsibilities are split as follows:
DownloadCoordinator: application orchestrationStreamLoginService: Microsoft login and auth state persistenceStreamManifestResolver: embed extraction and manifest interceptionFfmpegRunner: media download and progress parsingFileNameGenerator: output naming strategyui/*: application interface
This separation keeps the project readable and easier to maintain.