Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

We need to make some videos about working with LaTex -documents here. We have the typescript and timing -files and now we need to convert them into videos to display them in answers. Basically, the way to do that is to make small Gif -animations. Basically if I could record some area in the X window to GIF, then it would be possible over X to make such videos but it is a bit hxckish way and slow. So how can I convert script -processing into Gif -animations?

$ script -t 2> timing   # pastie.org etc to show your working
...WORKING...
$ scriptreplay timing   #how to make them into videos on this site?

Example videos

The source is here but created with pay-ware W tool.

enter image description here

Perhaps related

  1. Convert a typescript file to a list of commands (history)

  2. Screencasting in Windows here, what about in *ix?

share|improve this question
    
$ apt-cache search screencast gtk-recordmydesktop - Graphical frontend for recordmydesktop screencast tool istanbul - Desktop session recorder producing Ogg Theora video keymon - screencast utility that displays your keyboard and mouse status screenkey - Screencast your keys tested screenkey not like that, testing others. If someone finds the recording thing earlier to me, please, answer. –  user2362 Mar 29 '12 at 0:32
add comment

4 Answers

You can playback your typescript capture and encode the corresponding screen region using something like:

ffmpeg -y -f x11grab -s 100x100 -i :0.0+100,100 -pix_fmt rgb24 -r 5 Desktop/capture.gif

-y overwrites the output (most useful when testing)

-f x11grab forces the format to x11grab

-s 100x100 captured video is 100x100

-i :0.0+100,100 top left corner is on server 0 screen 0 on pixel 100,100

-pix_fmt rgb24 forces 24 bpp on input (AFAIK, needed for GIF encoder)

-r 5 5 fps

And Desktop/capture.gif is my captured file.

Hope it helps.

Just a note: sometimes the ffmpeg that comes from the distro repositories doesn't have all bells and whistles you may want. If that's the case, you'll need to build it yourself (or find a repo that carries a more complete binary). In my example I used a stock ffmpeg from the Ubuntu repos.

share|improve this answer
add comment

Untested: record with ttyrec, and convert with tty2gif.

share|improve this answer
    
Works for me. Usage is ./tty2gif typing ttyrecord. It will record the terminal window you run it in. –  Inaimathi May 26 '12 at 18:15
    
@Inaimathi on which system did you test it? I am trying it on OS X: it loads some ImageMagick things but then fires errs, did you get it like this? –  hhh May 13 '13 at 21:28
    
@hhh - I'm running Debian over here (I think it was Squeeze when I put up that comment). Nope, none of the errors in your paste happened. –  Inaimathi May 13 '13 at 23:20
add comment

most easy way to share typescript is http://shelr.tv/ It uses script or ttyrec as backend and you can puslish your typescript as easy as "shelr push last" :)

share|improve this answer
    
This is extremely cool! Now just some iFrame-video to GIF -conversion so I could easily use that for sharing things in SO. SO does not support iFrames... –  user2362 May 25 '12 at 19:02
    
Hey, can you see it?! Look Gilles have the tty2gif part, now just use that to convert the video to Gif and provide people a gif image there -- is that possible? It would make the service a killer... –  user2362 May 25 '12 at 19:06
    
I will accept this if it gets the Gif -part, wish I could do a patch to the site :P –  user2362 May 25 '12 at 19:09
    
Hey, guys. Web site is open-source so you can easily add postprocessing for uploaded records! github.com/shelr/shelr.tv/blob/master/app/controllers/… –  antono Jun 1 '12 at 14:42
add comment

I couldn't get tty2gif to work right with vim. So I hacked together ttygif.

gif

share|improve this answer
    
This is awesome. I actually found your github while searching for something like this and was debating installing it until I opened up one of my other search tabs and saw you had answered it here. I'm going to install this now. –  mikeserv Jul 11 at 3:16
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.