This is an old revision of the document!
To record a view with ANSI Art, will be using FFMpeg and our terminal. The idea behind this, is to display our ANSI in the terminal and capture the screen with ffmpeg. To automate this process i build a BASH script, which will do the job for us. The requirements for the script are the following apps: xdotool
, xwininfo
, ffmpeg
, lxterminal
or gnome-terminal
and an app called mtype
(see below).
Here you can view some videos made with this procedure:
Save the code of the script bellow and make the file executable. Make sure you have installed all required packages. Execute the script in a terminal like this: ./ansirec.sh ansifile.ans
The script will open a new terminal app, in a specific area of the screen and begin recording it with ffmpeg. At the end you should have an .avi
video file with the name of your original ANSI file. (ansifile.ans.avi). The recording will stop by itself. The script is built this way, so it detects when the terminal app finished displaying the ANSI file and then kills ffmpeg.
Nothing big here. Just make sure that the dimensions of the terminal app. and the area that ffmpeg captures are the same and according to your configuration. For me the dimension was 800×520, but probably will be different for you.
#!/bin/bash control_c() { rm tmpbash.sh } trap control_c INT echo "#!/bin/bash" > tmpbash.sh echo 'echo -e "\e(U\e[0m"' >> tmpbash.sh echo "sleep 2" >> tmpbash.sh echo "mtype $1 8" >> tmpbash.sh echo "sleep 2" >> tmpbash.sh chmod +x tmpbash.sh lxterminal -t "ansi capture" -e "./tmpbash.sh" --geometry=80x25 sleep 1 WID=$(xdotool search --name "ansi capture") xdotool windowmove $WID 50 50 xdotool windowactivate $WID INFO=$(xwininfo -name "ansi capture") WIN_GEO=$(echo $INFO | grep -oEe 'geometry [0-9]+x[0-9]+' | grep -oEe '[0-9]+x[0-9]+') WIN_XY=$(echo $INFO | grep -oEe 'Corners:\s+\+[0-9]+\+[0-9]+' | grep -oEe '[0-9]+\+[0-9]+' | sed -e 's/+/,/' ) ffmpeg -f x11grab -y -r 15 -s 800x520 -i :0.0+52,80 -vcodec libx264 -qscale 1 -threads 2 $1.avi & while [ $WID -gt 0 ] do WID=$(xdotool search --name "ansi capture") sleep 1 done pkill ffmpeg rm tmpbash.sh
Is a Linux application to display ANSI art, with BAUD emulation. It's written by James Coyle (g00r00) the author of Mystic BBS. You can find a 32bit executable and the source code here https://github.com/xqtr/source_code/tree/master/pascal/mtype
ACiD View, also runs in Linux, by using Wine. It may give you an error, because it needs some libraries, like MFC42.DLL. To install it try this:
winetricks mfc42 Or winetricks dlls mfc42
You should execute the program from a command line, to see any errors, like this:
wine ACiDview.exe
Just donwload ACiD View from Sourceforge, unzip the file and launch the app. It has an option to extract ANSI files as video (.AVI).