Hi, I’m Matthew from OpenResty Inc. Today I’d like to share how we generate our tutorial videos via the OpenResty Demo tool chain.
Yes, our videos were all automatically generated, including the video associated with this article.
Basically humans just write a screenplay file for each video. Let’s create an example file,
In this example, we try to explain some basic bash usage.
We make the following edits:
- The first paragraph is some narrator which computer will eventually speak out in the final video. And as you might have have guessed, I, Matthew, am a computer voice. And while speaking this sentence, we can make the machine do something in the terminal.
- Note that shell commands all have an indentation.
- And we can also pause the terminal operation, and speak something. Note the
[S]prefix of a paragraph which means “synchronous”. By default, it is asynchronous.
Today I'll demonstrate some bash usage.
We can use our OpenResty Demo tool chain to process this screenplay file. This file contains all the necessary information needed for generating the final video.
It now completes processing the screenplay file. It has also finished executing all the shell commands which can be replayed.
We use our Ops language tool chain to automate the terminal operations.
opslang -h | less
The second step is to generate the audio as a bunch of MP3 files.
Finally, we generate the final video file.
We’re all set! We can now check the generated files ready for being uploaded to YouTube.
ls -lh bash.mp4 bash.srt
The MP4 file is the video file. And the SRT file is the corresponding subtitles with accurate timing information.
Web browser operations can be automated by our Nav language tool chain.
../navlang/navlang -h | less
We’ll cover this web topic in a separate video.
The generated bash video was appended to the video shown at the beginning of this post.
If you like this tutorial, please subscribe to this blog site and our YouTube channel. Thank you!
This article and its associated video are both generated automatically from a simple screenplay file.
Yichun Zhang is the creator of the OpenResty® open source project. He is also the founder and CEO of the OpenResty Inc. company. He contributed a dozen open source Nginx 3rd-party modules, quite some Nginx and LuaJIT core patches, and designed the OpenResty XRay platform.
We provide the Chinese translation for this article on blog.openresty.com.cn. We also welcome interested readers to contribute translations in other natural languages as long as the full article is translated without any omissions. We thank them in advance.
We always welcome talented and enthusiastic engineers to join our team at OpenResty Inc.
to explore various open source software’s internals and build powerful analyzers and
visualizers for real world applications built atop the open source software. If you are
interested, please send your resume to
firstname.lastname@example.org . Thank you!