Recterm is a lightweight terminal recording tool along with audio. There will be a folder by the name new_term from where recterm script has been executed and the final mp4 file can be found here. Now change to the recterm directory and execute it. There must be at least 2GB RAM if you are trying to record a large file otherwise convert command will exit with 'killed' status. While converting to mp4 if the output contains 'gifsicle:: empty files' that means convert command unable to find the png/gif files or there is an insufficient memory to convert png/gif to mp4. Therefore to find the gif/png files in proper directory by the convert command, change the directory location of gif/png files to /tmp/ asciinema2gif*/frames/ *.png gif so that the final line looks like this- convert -delay 5 -loop 0 /tmp/ asciinema2gif*/frames/ *.png gif:- | gifsicle -colors=256 -delay=6 -optimize=3 -output='asciicast.gif'Īt the end of the asciinema2gif script, add the following line to remove the temporary directory. # vim /home/ubuntu/.linuxbrew/Cellar/asciinema2gif/0.5/libexec/bin/asciinema2gif The file path may be different if you are using different version of asciinema2gif. This is needed because asciinema2gif creates gif/png files in the temporary directory that is configured in line no 14 i.e readonly tempdir= "$(mktemp -d -t asciinema2gif.XXXX )"Įdit the following file and change the location of png/gif files. ![]() ![]() You can find the location of it by using 'which asciinema2gif' from the terminal. Now open asciinema2gif script in vi editor and edit the line number 116. To install recterm, simply clone the github repository and change the permission of the scripts. # sudo apt-get install sox ffmpeg bc Install recterm This is needed for re-sizing mp4 and to correctly combine mp4 and wav. Install bc which is an arbitrary precision numeric processing language. FFMPEG is needed for converting all gif into an mp4 files and to combine the audio (WAV) with final MP4 file. SOX is needed to start the audio recording separately while we start recording the terminal. Remote: Total 42 (delta 0), reused 3 (delta 0), pack-reused 0 Remote: Compressing objects: 100% (42/42), done. # brew install asciinema2gifĬloning into '/home/ubuntu/.linuxbrew/Library/Taps/homebrew/homebrew-dupes'. While installing asciinema2gif, brew will also install all the dependencies and these are gifsicle, xz, pkg-config, libtool, bzip2, jpeg, zlib, libpng, libtiff, freetype, imagemagick, gpatch, openssl, icu4c, libxml2, phantomjs. # brew install hello Install asciinema2gif # brew install gccĬheck the installation of brew by executing following command from the terminal. We need it because while installing asciinema2gif, brew will compile the dependencies for it. # echo 'export INFOPATH="/home/ubuntu/.linuxbrew/share/info:$INFOPATH"' >~/.bash_profile # echo 'export MANPATH="/home/ubuntu/.linuxbrew/share/man:$MANPATH"' >~/.bash_profile # echo 'export PATH="/home/ubuntu/.linuxbrew/bin:$PATH"' >~/.bash_profile home/ubuntu/.linuxbrew/etc/bash_completion.d/brewĪdd the linuxbrew binary path to PATH, man pages to MANPATH and info path to INFOPATH environmental variable in ~/.bash_profile. home/ubuntu/.linuxbrew/share/zsh/site-functions/_brew home/ubuntu/.linuxbrew/share/man/man1/brew.1 home/ubuntu/.linuxbrew/share/doc/homebrew Now install linuxbrew # ruby -e "$(curl -fsSL )" # sudo apt-get install build-essential curl git python-setuptools ruby We need linuxbrew to install asciinema2gif. Linuxbrew has few dependencies that we will install at first. It can be installed in the home directory and does not require root access. ![]() Linuxbrew is a fork of Homebrew the Mac OS package manager. # sudo curl -sL | shĭownloading asciinema v1.2.0 for linux-amd64. To install asciinema, execute the following command from the terminal. The viewers can simply pause the video, highlight the command and copy/paste it into their terminal. Once the terminal recording is complete, it provides a URL to share the recorded session. Install asciinemaĪSCIINEMA is a lightweight tool to record the terminal activities. This article covers installation of Recterm to record the terminal into a mp4 with audio using asciinema, asciinema2gif and ffmpeg. It does not need any video player like vlc, mplayer for recording into an mp4 with audio. The recterm is a tool that can record the terminal into a mp4 file. The drawbacks of asciinema is that the video does not include the audio. ASCIINEMA is a lightweight tool that record and share terminal session with high quality video. We generally record the terminal with a video recorder but the output video is generally blurry and not high quality.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |