Giter Site home page Giter Site logo

skyroom-record's Introduction

Skyroom recording automation

Docker Cloud Automated build Docker Cloud Build Status Docker Pulls

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 size

    medium -best choice for uploading, medium quality, medium speed, medium size

    low - chat text becomes unreadable but low in size and fast

    no-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

Creative Commons License
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.

skyroom-record's People

Contributors

atofighi avatar sfmth avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

skyroom-record's Issues

Copyright issues

SUT has successfully closed Aparat channels that distributed recorded classes. You might want to add personal use only description to the readme.md file and disclaim any abuse made by this code as you might be susceptible to DCMA takedowns.

1000 fps on the output file

I will fix it in my free time, just announcing that it is a known bug. I would have to re-tweak the presets. And maybe go for x265 on some presets.

Faster encoding

Fast encode but lower quality medium size
ffmpeg.input('video.webm').output( 'video1.mp4', **{'vcodec': 'libx264', 'acodec': 'aac', }, crf='28', preset='ultrafast', s='852x480', movflags='+faststart' ).run()
Slow encode but higher quality and lower size
ffmpeg.input('video.webm').output( 'video1.mp4', **{'vcodec': 'libx264', 'acodec': 'aac', }, crf='36', tune='stillimage', preset='slow', movflags='+faststart' ).run()

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.