Writing is a one method to save our knowledge. Using this method, we can produce - let say - books. Along with advances in technology, we can convert paper into file. Since the speed of Internet is becoming faster, video is more preferable. For some cases, I prefer to watch video than reading. Then, now video recording is one the method to save and share our knowledge's to others.
If you are using Linux, there is a video recording tool to help you. The tool is named Asciinema.
What is Asciinema
Here is the quote from it's website about what is Asciinema :
asciinema [as-kee-nuh-muh] is a free and open source solution for recording terminal sessions and sharing them on the web.
Asciinema also a light-weight and purely text-based terminal recording tool. It support most Linux distribution and *BSD
A video which is created using Asciinema software is called Asciicast.
While Asciinema support most of Linux distribution, this article shows you how to install Asciinema using Ubuntu Linux 16.04 edition.
First, we need to add asciinema repository to our PPA using this command :
sudo apt-add-repository ppa:zanchey/asciinema
Second, we need to update our Ubuntu repository :
sudo apt-get update
Last, we can proceed to install Asciinema :
sudo apt-get install asciinema
Start recording using Asciinema
Using Asciinema is very easy. Once Asciinema installed, you can start recording by typing this command on your terminal.
Once you run the command, you can immediately start recording. Any typing activity on your terminal will be recorded. When you are done, just press Ctrl-D to stop recording.
To save it to your local disk use this command :
asciinema rec /path/to/yourfilename.json
It will save your recording file into /home/user/ directory with yourfilename.json file.
How about the size of the recording file? A recorded file with 53 seconds length is about 17Kb.
So let say if 60 seconds / 1 minute file will occupied 20Kb, then 60 minute / 1 hours file length will occupied 60 x 20Kb = 1200Kb only! (around 1,2 Mb)
How to Play it?
After we successfully create an asciicast file, the next thing we want to do is to play it. There are some methods how to play it.
First using from your teminal just type :
asciinema play /path/to/yourfilename.json
The video will play immediately.
Second, if you upload the video to website, then you can use this format to play it :
asciinema play https://yourwebsite/path/to/your/video.json
Third, you can play it remotely.
ssh email@example.com cat using_asciinema.json | asciinema play -
Upload the video file
When you create a video recording file, normally you will create it on your local file. Then after you are sure about the content and quality, you may want to upload it to asciinema.org website.
Uploading it is very easy. Just use upload parameter to upload it into asciinema.org
asciinema upload using_asciinema.json
Wait until a link to play it appear.
Then copy-paste the link into your browser to play it.
Manage what you have uploaded
If you want to manage what you have upload to asciinema.org website, then you need to use auth parameter.
But first, you need to login to asciinema.org.
- Point your browser to https://asciinema.org/login/new
- Put your email there and click Login
- Login link will be sent to your email
Once you logged in, you will see how many video you have uploaded.
- Pick one
- Scroll down until you see a gear icon on the bottom left
- Click it, then click Edit
Now you will see parameters to edit. Don't forget to Save it :-)
For those who like or want to documenting your console activity, for any reasons, asciinema offers us a great and easy tool. A lightweight application, easy to use, using an open-standard format file, and easy to share.