How to save mplayer's output when watching in ASCII mode (with aalib)
I was helping out a friend working on a presentation where he wants to show some videos he has taken but converted to ASCII art. I can do that quite easily with mplayer on a Linux box using aalib (-vo aa). But that only plays the movie, transcoding it live. What I would like to do is to convert those videos to ASCII art and save them in files so that they can be played in a loop on some regular video players (be that vlc, wmediaplayer, whatever).
I have played around with mplayer / mencoder trying to dump streams, videos, piping it to fifos, standard output and so on but I just can not seem to find any way of doing this.
Has any of you done this before and if yes, how?
Thanks a lot!
Aalib is incredible. I think the problem is that the mplayer output is in a different window making direct piping difficult. Here are a few routes you could take:
- One option, is to record the entire desktop. This SE link demonstrates a way to record the entire screen using ffmpeg.
Record entire screen from terminal
ffmpeg -f x11grab -s wxga -r 25 -i :0.0 -sameq /tmp/out.mpg
Then, start the video, maximize the window, wait until it stops, and stop the recording. Crop the screen dimensions and time of the screen capture video manually or with a script. The drawback here is that the work flow is greater than the real time of the video playback.
Recording an xterm is another route, but my xterm display never has the aesthetic beauty of my other settings.
If you have a tripod, camera, and patience, you could record playback with an analog work flow. Aesthetics go through the roof, but that feels kind of silly.
You have the most live playback options playing through mplayer so I would suggest setting up a Linux for your friend as the best option for playback. Also, you can loop the video by using the loop switch:
-loop 0
I also struggle with recording aalib. I would love to know a better way of doing this. If you find out, please share with me.