dtype.org
Log in

AWS ttyrec rendering

From dtype.org

Ttyrec2video is a java tool to automatically create a video from a ttyrec, along with a couple of niceties. It is based on jettyplay, by Alex Smith (ais523).

Usage

Running

Basic usage is as follows:

   java [-server] -jar ttyrec2video.jar <options>

It might be possible to run it directly from the class files, but I haven't experimented with that. The -server flag, intended to be used for long-running applications on servers, allows for slightly faster runtime, at the cost of memory and startup time. It is probably a good idea to use this flag with ttyrec2video, because it is cpu-bound (rather than i/o-bound or user-input-bound) and rather slow.


Input

Ttyrec2video can get its input from either one of two places: an S3 bucket, or a file stored locally. These can optionally be bzip2-compressed (this is autodected). For s3 buckets, the usage is -s3bucket <bucketname> -s3key <filename>. For example, -s3bucket altorg -s3key ttyrec/Adeon/2008-03-25.14:36:24.ttyrec.bz2. For files, the usage is simply -in <filename>. If both an s3 file and a local file are provided, an error will be printed; but if, e.g., a local file and an s3 bucket (but not an s3 key) are provided, the local file will be used.

Output

Ttyrec2video will always output to a file. This is automatically chosen as <infile>.avi, if a local file is provided, and out.avi if only an s3 file is provided, but can be overridden with the -out switch. The video can optionally be uploaded to youtube, if the -yttitle <title> -ytdescr <description> -yttoken <oath2 token> options are provided. The yttitle and ytdescr options simply set the title and description of the video. The oath token can be obtained by doing the following:

1. Go to https://console.developers.google.com/apis/credentials, and sign in if necessary

2. Click on Create Credentials, then OAuth client ID.

3. Select "Other," and enter anything for Name.

4. You should now be presented with a page showing you a 'client ID' and 'client secret'

4. Run this script. Copy-paste the client ID and client secret from above. It should open up a web browser window but if not then copy-paste the link it shows into your web browser.

5. You should see a webpage that says that ttyrec2video is requesting to manage your youtube videos. If it is asking to manage anything else, then either you have malware instead of the real ttyrec2video, or this webpage is out of date. Click "allow," and the script should spit out your access token.