You are not logged in.

#1 2016-07-15 03:41:12

nicholasalipaz
Member
Registered: 2016-02-25
Posts: 50

Animated screenshot (gif) utility

I pieced together this little c program based off various other scripts I found. It uses byzanz and automates taking an animated screenshot of a section of the screen.
https://github.com/nalipaz/xrecordgif

I hope others might get some use of it. I needed it for work purposes since I many times need to show a screenshot of some UI to others but I don't necessarily need the entire screen. All the solutions I found were upgrade/ad-ware types that required money to get all the features or remove watermarks.

byzanz is the best solution I found but there was no real great way to specify the area of the screen you wish to capture without just doing the whole thing and cropping later.

If anyone has any suggested improvements I am receptive and open to PR's.

FTR, this is my first attempt at C...

Offline

#2 2016-07-15 04:06:05

damo
....moderator....
Registered: 2015-08-20
Posts: 6,734

Re: Animated screenshot (gif) utility

It's a bit smaller than gtk-recordmydesktop smile


Be Excellent to Each Other...
The Bunsenlabs Lithium Desktop » Here
FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt  «» BunsenLabs on DeviantArt

Offline

#3 2016-07-15 04:07:39

nicholasalipaz
Member
Registered: 2016-02-25
Posts: 50

Re: Animated screenshot (gif) utility

lol, well, not really for recording a full desktop/audio/video. Just gif. But yah!

Offline

#4 2016-07-15 09:10:23

ohnonot
...again
Registered: 2015-09-29
Posts: 5,592

Re: Animated screenshot (gif) utility

it depends on byzanz, which is a screenrecorder itself and, at least on my system, depends on gtk3.
so you made a "simple command line utility" that depends on an app that does the same thing AND depends on the heaviest toolkit around? or am i missing the point here?

Offline

#5 2016-07-15 09:35:24

brontosaurusrex
Middle Office
Registered: 2015-09-29
Posts: 2,746

Re: Animated screenshot (gif) utility

git clone https://gist.github.com/98351fa5d759a216a1836a40aa6ef8f9.git xrecordgif

requires authentication, so can't test unfortunately.

Offline

#6 2016-07-15 09:39:13

nicholasalipaz
Member
Registered: 2016-02-25
Posts: 50

Re: Animated screenshot (gif) utility

brontosaurusrex wrote:
git clone https://gist.github.com/98351fa5d759a216a1836a40aa6ef8f9.git xrecordgif

requires authentication, so can't test unfortunately.

Oops, bad clone url, I originally had a gist for this, but decided to turn into a project later on. The README is now updated with the correct url.

Offline

#7 2016-07-15 09:48:52

nicholasalipaz
Member
Registered: 2016-02-25
Posts: 50

Re: Animated screenshot (gif) utility

ohnonot, I guess you got me on the fact I hadn't noticed byzanz had capabilities of OGG Theora and Flash output files. It has a parameter for `--audio` too which I hadn't noticed. I have yet to use any of that, but I will say that byzanz states:

Byzanz is a small and efficient screencast creator. It records your desktop session or parts of it to an animated GIF, OGG Theora or Flash.

Which asserts (at least to me) it is pretty lean. Installing it didn't download any dependencies I didn't already have on what seems to be fairly stock BL, but perhaps I did something along the way.

I did however note that byzanz says it has a gnome applet which I never noticed before, but can also be used as a purely command-line utility. Just because I am curious, I am spinning up a new bl virtual machine and will only do an install of this stuff to see if I get prompted for any dependencies.

Offline

#8 2016-07-15 09:50:37

brontosaurusrex
Middle Office
Registered: 2015-09-29
Posts: 2,746

Re: Animated screenshot (gif) utility

Nice, thanks for sharing
https://cdn.scrot.moe/images/2016/07/15/recording.gif

Last edited by brontosaurusrex (2016-07-15 09:54:48)

Offline

#9 2016-07-15 09:57:47

nicholasalipaz
Member
Registered: 2016-02-25
Posts: 50

Re: Animated screenshot (gif) utility

brontosaurusrex, those are some pretty important commands to have available in the terminal. Glad you like it.

Offline

#10 2016-07-15 10:42:27

nicholasalipaz
Member
Registered: 2016-02-25
Posts: 50

Re: Animated screenshot (gif) utility

Here is the output I got on a stock BL with only some of the options from the bl-welcome script enabled:

nicholas@bl-test:/tmp$ cd /tmp
nicholas@bl-test:/tmp$ git clone https://github.com/nalipaz/xrecordgif.git
Cloning into 'xrecordgif'...
remote: Counting objects: 89, done.
remote: Compressing objects: 100% (62/62), done.
remote: Total 89 (delta 32), reused 79 (delta 24), pack-reused 0
Unpacking objects: 100% (89/89), done.
Checking connectivity... done.
nicholas@bl-test:/tmp$ cd xrecordgif
nicholas@bl-test:/tmp/xrecordgif$ ./setup.sh
[sudo] password for nicholas: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  gir1.2-notify-0.7 libelfg0 libgdk-pixbuf2.0-dev libglib2.0-bin libglib2.0-data
  libglib2.0-dev libpcre3-dev libpcrecpp0 libpng12-dev libpthread-stubs0-dev
  libx11-dev libx11-doc libxau-dev libxcb1-dev libxdmcp-dev pkg-config
  x11proto-core-dev x11proto-input-dev x11proto-kb-dev xorg-sgml-doctools
  xtrans-dev zlib1g-dev
Suggested packages:
  libglib2.0-doc libxcb-doc
The following NEW packages will be installed:
  byzanz gir1.2-notify-0.7 libelfg0 libgdk-pixbuf2.0-dev libglib2.0-bin
  libglib2.0-data libglib2.0-dev libnotify-dev libpcre3-dev libpcrecpp0
  libpng12-dev libpthread-stubs0-dev libx11-dev libx11-doc libxau-dev libxcb1-dev
  libxdmcp-dev pkg-config x11proto-core-dev x11proto-input-dev x11proto-kb-dev
  xorg-sgml-doctools xtrans-dev zlib1g-dev
0 upgraded, 24 newly installed, 0 to remove and 0 not upgraded.
Need to get 11.8 MB of archives.
After this operation, 41.6 MB of additional disk space will be used.
Do you want to continue? [Y/n]

Answering the prompt with 'y' continues without error and I have a working xrecordgif command after it completes. Not sure if this is what you are seeing ohnonot.

Offline

#11 2016-07-15 10:53:08

brontosaurusrex
Middle Office
Registered: 2015-09-29
Posts: 2,746

Re: Animated screenshot (gif) utility

p.s. Almost working in arch (libnotify from repos and byzanz from aur) as well, only it goes in background and notification runs/shows forever as it seems.
https://cdn.scrot.moe/images/2016/07/15 … g8f4e8.gif

Offline

#12 2016-07-15 18:06:04

nicholasalipaz
Member
Registered: 2016-02-25
Posts: 50

Re: Animated screenshot (gif) utility

brontosaurusrex wrote:

p.s. Almost working in arch (libnotify from repos and byzanz from aur) as well, only it goes in background and notification runs/shows forever as it seems.
https://cdn.scrot.moe/images/2016/07/15 … g8f4e8.gif

That is good to hear. I can guess that the issue with notifications is that arch uses a different notifier that does not yet support replacing notifications. The script shows a notification (with no expiration) and then proceeds to update the details of the notification by changing it's expiration and text. However, it is possible some notification daemons don't support replacing since it was recently fixed in xfce even from what I read. I will see if I can fire up arch in a vm and test it.

Offline

#13 2016-07-15 18:11:28

nicholasalipaz
Member
Registered: 2016-02-25
Posts: 50

Re: Animated screenshot (gif) utility

brontosaurusrex, I opened an issue to track your report in github.

Offline

#14 2016-07-16 05:02:04

ohnonot
...again
Registered: 2015-09-29
Posts: 5,592

Re: Animated screenshot (gif) utility

nicholasalipaz wrote:

ohnonot, I guess you got me on the fact I hadn't noticed byzanz had capabilities of OGG Theora and Flash output files. It has a parameter for `--audio` too which I hadn't noticed. I have yet to use any of that, but I will say that byzanz states:

Byzanz is a small and efficient screencast creator. It records your desktop session or parts of it to an animated GIF, OGG Theora or Flash.

Which asserts (at least to me) it is pretty lean. Installing it didn't download any dependencies I didn't already have on what seems to be fairly stock BL, but perhaps I did something along the way.

I did however note that byzanz says it has a gnome applet which I never noticed before, but can also be used as a purely command-line utility. Just because I am curious, I am spinning up a new bl virtual machine and will only do an install of this stuff to see if I get prompted for any dependencies.

no, i'm not running stock bl.
byzanz might be "small and efficient" within a GNOME desktop, i don't know, but it's a hell of a dependency, i mean look at the fluff it pulls in even when gtk3 is installed. plus, it basically already does what your thread announces.

but it's ok, i will complain no more: it seems your focus is on having the record-to-gif capability, i can see the appeal in that.

Offline

#15 2016-07-16 05:09:45

nicholasalipaz
Member
Registered: 2016-02-25
Posts: 50

Re: Animated screenshot (gif) utility

yes, the gif is the focus. The point of the project is to allow a bit of a more user-friendly interface for setting the parameters that go along with byzanz. Specifically that of the screen area in which you wish to capture.

I guess I can also see your point, you were thinking it might be a substitute for something like byzanz. Yeah, I can see the appeal in that too. I would imagine one could come up with something using something like imagemagick and taking multiple in succession, like one a second then creating a gif out of the produced images. That might be something more along the lines of what you were thinking. However, for me, that is more work than I wished to do when there is a program out there that already does the job, despite it's dependencies.

Offline

#16 2016-12-31 17:35:05

martix
Kim Jong-un Stunt Double
Registered: 2016-02-19
Posts: 1,267

Re: Animated screenshot (gif) utility

Just noticed: There is an other similar tool called peek. If someone gives it a try, please post the details.

https://github.com/phw/peek/releases

Offline

#17 2016-12-31 18:34:25

stevep
MX Linux Developer
Registered: 2016-08-08
Posts: 381

Re: Animated screenshot (gif) utility

Peek works fine.  I've had it in my little jessie-backports multimedia repository for a few months:

https://build.opensuse.org/package/show … ssert/peek

Ooh, a new release--let's update it and see what's changed.

Offline

Board footer

Powered by FluxBB