[How to] Create screencaps on linux

Status
Not open for further replies.

Avek

Member
21
2009
0
0
[TUT] Create screencaps on linux

We're going to use here mtn instead of mplayer which could not work on ur vps or server coz of something.

What's the advantage of using it?

  • No gui required,
  • quite simple usage,
  • very fast time of getting caps 0,5-5 seconds (on standard settings)
So here we go:
Part I - Installation

Update your repositories:
Code:
vi /etc/apt/sources.list
Ubuntu 9.10:
purge everything from there and enter:
Code:
deb http://archive.ubuntu.com/ubuntu karmic universe multiverse
deb-src http://archive.ubuntu.com/ubuntu karmic universe multiverse
deb http://us.archive.ubuntu.com/ubuntu/ karmic universe
deb-src http://us.archive.ubuntu.com/ubuntu/ karmic universe
deb http://us.archive.ubuntu.com/ubuntu/ karmic-updates universe
deb-src http://us.archive.ubuntu.com/ubuntu/ karmic-updates universe
deb http://us.archive.ubuntu.com/ubuntu/ karmic multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ karmic multiverse
deb http://us.archive.ubuntu.com/ubuntu/ karmic-updates multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ karmic-updates multiverse
deb http://security.ubuntu.com/ubuntu karmic-security universe
deb-src http://security.ubuntu.com/ubuntu karmic-security universe
deb http://security.ubuntu.com/ubuntu karmic-security multiverse
deb-src http://security.ubuntu.com/ubuntu karmic-security multiverse
For older versions read here:
9.04: https://help.ubuntu.com/9.04/serverguide/C/configuration.html
8.10: https://help.ubuntu.com/8.10/serverguide/C/configuration.html
8.04: https://help.ubuntu.com/8.04/serverguide/C/configuration.html

Other distro?
Hm well u gotta google

Update everything
Code:
sudo apt-get update
sudo apt-get upgrade
Install required stuff
Code:
sudo apt-get install -y libgd2 libavcodec libavformat libavutil libswscale
Download and unpack movie thumbnailer (mtn) binary:
Code:
[URL]http://rapidshare.com/files/344568205/mtn.rar[/URL]
chmod and alias it!
Code:
chmod 777 mtn

vi /your_user_name/.bashrc
add line:
alias mtn='/your_destination_path/mtn'
plus run that command in shell

Ok installation done.


Part II - Usage
Now how it works?
simple usage:
Code:
mtn moviename.avi
You'll get moviename_s.jpg as result

Still u can get some errors with fonts it happens sometimes so use eg.:
Code:
mtn moviename.avi -f /var/lib/defoma/gs.d/dirs/fonts/VeraBd.ttf
or other font just make sure that u'll include absolute path to font file.

Useful parameters:
Code:
-b 0.80 - will skip screen cap if 80% of screen is blank
-c x - use number instead of x, that's number of columns
-j 90 - jpeg quality in %
-r x - number of rows same as columns
-T text - addtext above output image
Need something different? Check help, just enter mtn and you'll get a lot more options.

NOTE - want to get caps of all files in directory and subdirectories? use eg:
mtn ./*.avi ./*/*.avi
Got questions? Feel free to ask
 
34 comments
Well u cannot make screencaps from packed files but u can eg. unpack them all and then as source use *.avi or path of folder with movies.
 
Package libgd2 is a virtual package provided by:
libgd2-xpm 2.0.36~rc1~dfsg-3ubuntu1.9.10.1
libgd2-noxpm 2.0.36~rc1~dfsg-3ubuntu1.9.10.1
You should explicitly select one to install.
E: Package libgd2 has no installation candidate
 
Status
Not open for further replies.
Back
Top