Zoomrs
Save thousands of dollars on Zoom Cloud Recording Storage! Download records automatically and store locally. Provide simple but effective web frontend to watch and share meeting recordings
Install / Use
/learn @parMaster/ZoomrsREADME
Zoomrs - Zoom meetings recordings download service
Save thousands of dollars on Zoom Cloud Recording Storage! Download records automatically and store locally. Provide simple but effective web frontend to watch and share meeting recordings.
Features
- Download Zoom Cloud Recordings automatically
- Delete/Trash downloaded recordings from Zoom Cloud after download
- Specify which types of recordings to download (shared screen, gallery view, active speaker) and which to ignore (audio only, chat, etc.)
- Host a simple web frontend to watch and share recordings
- Run multiple instances of the service for redundancy
Installation
Zoomrs can be installed as a systemd service or run from the console as a persistent process or a set of CLI tools. It can be run as a Docker container as well.
Prerequisites
Zoom API credentials
Zoom API credentials are required to download recordings. You can get them at https://marketplace.zoom.us/develop/create. You need to create JWT app and copy API key and secret to the configuration file.
Add the following scopes to the App:
/recording:master/recording:read:admin/recording:write:admin/report:read:admin
Google OAuth credentials (only if you want to host web frontend)
Google OAuth credentials are required to authenticate users. You can get them at https://console.cloud.google.com/apis/credentials. You need to create OAuth client ID and copy client ID and secret to the configuration file. Mind authorized redirect URIs - local domains are not allowed, so you need to use a public domain name or IP address.
Google OAuth authorized users (only if you want to host web frontend)
You need to specify the list of users that are allowed to access the web frontend. Their email addresses should be specified in the configuration file.
Configuration
See config/config_example.yml for example configuration file, available options and their descriptions. Copy it to config/config.yml and edit it to your needs.
Running the service
-
To run a binary distribution, please refer to the README in
distdirectory. -
To build from source, proceed with this manual.
Foreground mode
[!NOTE] this is not recommended for production use, use systemd service instead or run it in a Docker container
-
Clone the repository from GitHub
git clone https://github.com/parMaster/zoomrs.git -
Make sure
config/config.ymlexists and is configured properly -
Run
make runto build the binary and run it in foreground modemake run -
To stop the service press
Ctrl+C(or sendSIGINT,SIGTERMsignal to the process)
Systemd service
-
Repeat steps 1 and 2 from the previous section
-
Run
make deployto build the binary and copy everything where it belongs (seeMakefilefor details), enable and run the servicemake deploy -
Run
make statusto check the status of the servicemake status
Log files are located at /var/log/zoomrs.log and /var/log/zoomrs.err by default.
Docker container
-
Clone the repository from GitHub
git clone https://github.com/parMaster/zoomrs.git -
Make sure
config/config.ymlexists and is configured properly -
Check configuration parameters in Dockerfile and docker-compose.yml
-
Build and run container
docker compose up -d
Usage
Web frontend
Web frontend is available at http://localhost:8099 by default. You can change the port in the configuration file (server.listen parameter).
Web frontend Pages
GET `/`
Displays the list of recordings. Each recording has a link to share (view) it. Recordings are sorted by date in descending order. Login is required to view the list. Google OAuth is used for authentication. Access is restricted to users with email addresses from the list specified in the configuration file (see server.managers).
Share button is available for each recording, it generates a link to view the recording. Share link looks like:
GET `/watch/834d0992ad0d632cf6c3174b975cb5e5?uuid=kzbiTyvQQp2fW6biu8Vy%2BQ%3D%3D`
Displays the page with the meeting title and player to watch the recording. Simple controls besides the embeded player is providing are available.
API
GET /status
Returns the status of the service and Zoom cloud storage usage stats. If the service is running, returns 200 OK and the following JSON. Example response:
{
"cloud": {
"date": "2023-07-09",
"free_usage": "495 GB",
"plan_usage": "0",
"usage": "27.98 GB",
"usage_percent": 5
},
"stats": {
"downloaded": {
"count": 6529,
"size_gb": 2148,
"size_mb": 2200412
}
},
"status": "OK",
"storage": {
"free": "1.2 TB",
"total": "3.6 TB",
"usage_percent": 63,
"used": "2.2 TB"
}
}
status can be:
OKwhen everything is downloaded and nothing has failedLOADINGwhen there arequeuedordownloadingrecordings presentFAILEDwhen there are onlydownloadedandfailedrecordings in the database
stats section contains number of recordings and their total size in GB and MB grouped by status
cloud section contains Zoom cloud storage usage stats. date is the last time the stats were updated (it is updated every 24 hours, so if you see the date is not today, it means the stats dodn't change since then), free_usage is the amount of free storage, plan_usage is the amount of storage available for the current plan, usage is the amount of storage used by recordings, usage_percent is the percentage of used storage.
storage section contains the stats of the local storage. free is the amount of free storage, total is the total amount of storage, usage_percent is the percentage of used storage, used is the amount of used storage.
This API is useful for monitoring the service status and triggering alerts when something goes wrong.
Another example response, when there are recordings in queued and downloading status (only relevant fields are shown):
{
"stats": {
"downloaded": {
"count": 5292,
"size_gb": 1765,
"size_mb": 1808161
},
"downloading": {
"count": 1,
"size_gb": 0,
"size_mb": 666
},
"queued": {
"count": 88,
"size_gb": 27,
"size_mb": 28044
}
},
"status": "LOADING"
}
GET /check
Auth required. Runs a consistency check of the repository (see check cli tool cmd, it's the same). Example response:
{
"checked": 5278,
"error": null
}
GET /stats[/<K|M|G>]
Auth required. Returns the total size of the recordings grouped by date. Optional parameter K, M or G can be used to specify the size in KB, MB or GB respectively. If no parameter is specified, the size is returned in bytes. Example response:
{
"2023-03-20":31,
"2023-03-21":13,
"2023-03-22":36,
"2023-03-23":19,
"2023-03-24":41
}
GET /meetingsLoaded/{accessKey}
accessKey is checked against server.access_key_salt config option. This api is called to ask if every meeting from the list is loaded, list is passed as a JSON array of UUIDs in the request body.
Request example:
{
"meetings":{
"in7MDVrTS5adXWFwsCwoYg==",
"0ao3hvbxQvqU2wkpXjbwhw==",
"pEbVqZ5jQP6+NY0ewvZ+wg==",
"uOoMA3wcSF65PtwTDw/k1w=="
}
}
Response when all meetings are loaded:
{
"result":"ok"
}
Response when some meetings are not loaded:
{
"result":"pending"
}
CLI tool
Zoomrs comes with a CLI tool to trash/delete recordings from Zoom Cloud. It is useful when running miltiple servers and you want to delete recordings from Zoom Cloud only after all servers have downloaded them. CLI tool is located at cmd/cli/main.go. Run make to build it and put to dist/zoomrs-cli.
It can be run like this:
go run ./cmd/cli --cmd check
or like this:
./dist/zoomrs-cli --cmd check
Available commands:
check- checks the consistency of the repository: if all recordings are downloaded and if all downloaded recordings are present on the disk, also the size of each recording file is checked. Run this command periodically to make sure everything is OK. Run it like this:
./dist/zoomrs-cli --cmd check
Example output:
```
2023/06/19 17:15:01 [INFO] starting CheckConsistency
2023/06/19 17:15:01 [INFO] Checked files: 5278
2023/06/19 17:15:01 [INFO] CheckConsistency: OK, 5278
```
trash- trashes recordings from Zoom Cloud. Run it like this:
./zoomrs-cli --dbg --cmd trash --trash 2
where `2` is 2 days before today, so all the recordings from the bay before yesterday will be trashed. This is designed this way to run it as a cron job every day. Cron job line example:
00 10 * * * cd $HOME/go/src/zoomrs/dist && ./zoomrs-cli --cmd trash --trash 2 --config ../config/config_cli.yml >> /var/log/cron.log 2>&1
will trash all recordings from the day before yesterday every day at 10:00 AM. `--config` option is used to specify the path to the configuration file. `--dbg` option can be used to enable debug logging. Logs are written to stdout, and redirected to `/var/log/cron.log` in the example above.
cloudcap- trims recordings from Zoom Cloud to avoid exceeding the storage limit. LeavesClient.CloudCapacityHardLimitbytes of the most recent recordings (review the
