tutorial-tool
is a simple video editing tool to automate creation of
tutorials by combining text and video
Here's a preview of a result:
- Python
tutorial-tool
is a small Python application
- Image magick
- Is used to produce still images that describe tutorial steps. Still images are generated from a step's text and background image
- MLT
- Is used to combine still images and video parts into single video
macOS
- Install Homebrew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
- Install Image magick
brew install imagemagick
- Install MLT
brew install mlt
- Install tutorial-tool
- Download it from GitHub and move to desired location
TODO Windows
- Install MSYS2?
- Install Image magick
- Install MLT
TODO Linux
- Install Image magick
- Install MLT
Note: you may use mplayer
to get timestamps in seconds of original video
Here's the usual workflow of making a new tutorial video:
- Create one or several videos of something you want to combine into a tutorial
- You can do it with software like OBS Studio.
- Convert the video with MLT to 25 FPS
melt -verbose -profile atsc_720p_25 source_video.mp4 -consumer avformat:destination_video.mp4 vcodec=libx264
- Create background image with 1280x720 resolution
- You can do it with software like GIMP.
- Prepare the script to build final video
- Bake the video
/path/to/tutorial-tool /path/to/script | sh
- Note:
tutorial-tool
only prints Bash commands for you to execute, so you have to redirecttutorial-tool
output to the shell
- Get the resulting video in your temporary directory
Here's an example script:
background bg.png
text 5 Let's install Blender
video 0:6 install_blender.mp4
text 5 Installing it with apt
video 6:26 install_blender.mp4
text 5 We're still installing it
video 26:56 install_blender.mp4
text 5 Congratulations! We just finished installng Blender
This script contains all supported language constructs:
background [image]
- Specifies background image to use for text
text [seconds] [text]
- Specifies text to render for desired number of seconds
video [seconds_start]:[seconds_end] [video_file]
- Specifies video_file part that starts at seconds_start and ends at seconds_end
Here is the resulting video at YouTube.
- Save video frames, one for each second
mkdir frames
ffmpeg -i video.mp4 -vf scale=640:-1:flags=lanczos,fps=1 frames/f%03d.png
- Convert video frames to GIF
convert -loop 0 frames/f*.png output.gif
- Crop video
ffmpeg -i in.mp4 -vf crop=1024:768:0:0 -c:v libx264 -crf 0 -c:a copy out.mp4