fsxNet Wiki

BBS Development & Resources

User Tools

Site Tools


resources:misc:ansi_rec

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
resources:misc:ansi_rec [2018/03/29 01:58]
127.0.0.1 external edit
— (current)
Line 1: Line 1:
-====== How to make videos with ANSI Art ====== 
- 
-===== Linux ===== 
- 
-==== FFMpeg ==== 
- 
-=== Intro === 
- 
-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: 
-  * https://​www.youtube.com/​watch?​v=0yWHOhUWHgQ 
-  * https://​www.youtube.com/​watch?​v=SSOFZN_cpM8 
- 
-=== How to use it === 
- 
-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. 
- 
-=== Customization === 
- 
-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 800x520, but probably will be different for you. 
- 
-=== Resources === 
- 
-<code bash ansirec.sh>​ 
-#!/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 
- 
-</​code>​ 
- 
-== mtype == 
- 
-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 ==== 
- 
-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: 
- 
-<​code>​ 
-winetricks mfc42 
- 
-Or 
- 
-winetricks dlls mfc42 
-</​code>​ 
- 
-You should execute the program from a command line, to see any errors, like this: 
-<​code>​ 
-wine ACiDview.exe 
-</​code>​ 
- 
-===== Windows ===== 
- 
-==== ACiD View ==== 
- 
-Just donwload ACiD View from [[https://​sourceforge.net/​projects/​acidview6-win32|Sourceforge]],​ unzip the file and launch the app. It has an option to extract ANSI files as video (.AVI). 
- 
  
resources/misc/ansi_rec.1522288694.txt.gz ยท Last modified: 2018/03/29 01:58 by 127.0.0.1