Skyroom recording automation
This repository is a dockerized environment to record classes of vclass.sharif.edu and skyroom.online.
How to use?
It's simple. Install docker and then create a downloads
directory and use:
docker run --rm -v "$(pwd)/downloads:/opt/downloads" atofighi/skyroom-record:latest -u VLASS_URL -d CLASS_DURATION -n test-class -e encoding
Notes:
-
VCLASS_URL must be the url of class with
https://
. -
CLASS_DURATION must be the duration of recording in minutes. like
90
-
Your recorded video will be saved on
./downloads/test-class/NOW/video.webm
. -
To update your docker image you can just run:
docker pull atofighi/skyroom-record
. -
Encoding quality
-e
This option converts the
.webm
file to a.mp4
file. It has encoding presets that should be defined otherwise no conversion would occur.high
-best quality, slower and higher in sizemedium
-best choice for uploading, medium quality, medium speed, medium sizelow
- chat text becomes unreadable but low in size and fastno-encoding
-default best quality, medium size, no conversion -
With the
-v
option you can specify a file to encode without needing to record. Please note that when using this option you should provide only-e
and-v
otherwise it wouldn't work.
Development
The main file is src/main.py
. source code is not clean enough! sorry! ;)
There is also a simple flask app in src/app.py
for viewing current window and can do clicks for test. You can expose port 5000 for viewing current screen for example with this command:
docker run --rm -v "$(pwd)/downloads:/opt/downloads" -p 5000:5000 atofighi/skyroom-record:latest -u VLASS_URL -d CLASS_DURATION -n test-class
And see http://localhost:5000
. (Note: If you click on this page. App will click on docker window on that point.)
Roadmap
Done:
- Handling exceptions and retry when something went wrong.
- Logging for failure
TODO:
- Login with CW and vclass user/pass.
- Add cronjob for schedule recording
- Better failure detection (currently use screenshot similarity)
- Refactor code and make it clean
This work is licensed under a Creative Commons Attribution 4.0 International License, and it is offered “as-is”, without warranty, and we disclaim liability for any type of damages or problems resulting from using or abusing the project.