Coder Social home page Coder Social logo

gifine's Introduction

Gifine

Gifine is a tool for recording and stitching together a short gifs or videos. It is a GTK application implemented in MoonScript using lgi.

You can either load a directory of frames, or select a region of your desktop to record. After loading some frames, you can scroll through them and trim out what isn't necessary. When you've finalized the video you can export to gif or mp4.

It requires a few external commands to be present to function:

In order to select a record area you need one of the following:

Most of these things should be able to be installed from your package manager

The recorded frames recorded aren't automatically cleaned up. You can find them in your /tmp dir if you want to reload a session. Use the load directory button on the initial screen.

Install

luarocks install --server=http://luarocks.org/dev gifine

Run the command gifine to use.

Installation on Ubuntu 16.04 LTS

This has been tested on a fresh install of Ubuntu 16.04 LTS.

Install git:

$ sudo apt install git

Next, install all of the gifine's dependencies and sub-dependencies:

$ sudo apt install -y \
ffmpeg \
graphicsmagick \
gifsicle \
luarocks \
libxext-dev \
libimlib2-dev \
mesa-utils \
libxrender-dev \
glew-utils \
libglm-dev \
cmake \
compiz \
gengetopt \
libglu1-mesa-dev \
libglew-dev \
libxrandr-dev \
libgirepository1.0-dev

Install slop using the instructions in the slop README.md file.

Install LGI:

$ sudo luarocks install lgi

Install gifine.

$ sudo luarocks install --server=http://luarocks.org/dev gifine

Demo

Gifine demo

Articles

License

MIT, Copyright (C) 2016 by Leaf Corcoran

gifine's People

Contributors

ersanchez avatar leafo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gifine's Issues

Installation Error: Unauthenticated git protocol on port 9418

Seeing the following error when running sudo luarocks install --server=https://luarocks.org/dev gifine
on Ubuntu 20.04 amd64 Desktop, when following the installation steps as mentioned in README.

~$ sudo luarocks install --server=https://luarocks.org/dev gifine
Installing https://luarocks.org/dev/gifine-dev-1.rockspec
Cloning into 'gifine'...
fatal: remote error: 
  The unauthenticated git protocol on port 9418 is no longer supported.
Please see https://github.blog/2021-09-01-improving-git-protocol-security-github/ for more information.

Error: Failed cloning git repository.

Problems with gobject-introspection upon install

In Ubuntu 16.10, I've installed all of the dependencies listed in the README, and attempted to install a dependency of lgi. The ubuntu package of lua-lgi appears to be older than what you want.

Reading package lists... Done
Building dependency tree       
Reading state information... Done
gobject-introspection is already the newest version (1.50.0-1ubuntu2).
^[[A0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
fritzy@groose:~/local/app$ luarocks install --local --server=http://luarocks.org/dev gifine
Warning: falling back to wget - install luasec to get native HTTPS support
Installing http://luarocks.org/dev/gifine-dev-1.rockspec...
Using http://luarocks.org/dev/gifine-dev-1.rockspec... switching to 'build' mode

Missing dependencies for gifine:
lgi 

Using https://rocks.moonscript.org/lgi-0.9.1-1.src.rock... switching to 'build' mode
make -C lgi
make[1]: Entering directory '/tmp/luarocks_lgi-0.9.1-1-162/lgi/lgi'
pkg-config --exists 'gobject-introspection-1.0 >= 0.10.8' --print-errors
Package gobject-introspection-1.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `gobject-introspection-1.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gobject-introspection-1.0' found
Makefile:53: recipe for target '.depcheck' failed
make[1]: *** [.depcheck] Error 1
make[1]: Leaving directory '/tmp/luarocks_lgi-0.9.1-1-162/lgi/lgi'
Makefile:16: recipe for target 'all' failed
make: *** [all] Error 2

Error: Failed installing dependency: https://rocks.moonscript.org/lgi-0.9.1-1.src.rock - Build error: Failed building.```

Hangs on "Converting to gif"

Hi there.
I have gotten Gifine to build after some trouble, but I can't get it to export GIFs.

The build trouble was that it requires gobject-introspection on top of lua-lgi, the gobject-introspection-runtime is not sufficient (Arch Linux).

I did record ~600 800x600 frames, exporting them to mp4 works, but exporting to GIF makes it sit there indefinitely on "Working: converting". Likewise on the CLI it says "Converting to gif" and doesn't do anything noticeable. I suspect it is supposed to run 'convert', but there is no child process at all.

Lua 5.3
imagemagick 7.0.8.53
ffmpeg 1:4.1.3

missing desktop entry and icon

to fix it i run:

cat << EOF | tee /home/$USER/.local/share/applications/gifine.desktop
[Desktop Entry]
Name=gifine
Exec=gifine
Comment=Record and cut short animated GIF images from your screen
Keywords=screencast;screen recorder;screen capture;GIF;
Icon=$HOME/programs_setup/gifine/gifine.svg
Terminal=false
Type=Application
Categories=Graphics;2DGraphics;Video;Recorder;
EOF

but maybe that can be added to the program.

crashed when exporting to gif

I halved the frames, turned up the delay to 8 and exported to a gif, but the app crashed with this in terminal:

  WARNING: library configuration mismatch
  avcodec     configuration: --prefix=/usr --extra-version=1build2 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libebur128 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared --enable-version3 --disable-doc --disable-programs --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libtesseract --enable-libvo_amrwbenc --enable-netcdf
  libavutil      55. 34.101 / 55. 34.101
  libavcodec     57. 64.101 / 57. 64.101
  libavformat    57. 56.101 / 57. 56.101
  libavdevice    57.  1.100 / 57.  1.100
  libavfilter     6. 65.100 /  6. 65.100
  libavresample   3.  1.  0 /  3.  1.  0
  libswscale      4.  2.100 /  4.  2.100
  libswresample   2.  3.100 /  2.  3.100
  libpostproc    54.  1.100 / 54.  1.100
Reading	/tmp/gifine_kihnhhchwg/000000057.png
Reading	/tmp/gifine_kihnhhchwg/000000061.png
Reading	/tmp/gifine_kihnhhchwg/000000065.png
Reading	/tmp/gifine_kihnhhchwg/000000069.png
Reading	/tmp/gifine_kihnhhchwg/000000073.png
Input #0, image2pipe, from 'pipe:':
  Duration: N/A, bitrate: N/A
    Stream #0:0: Video: png, rgb24(pc), 1503x740, 30 fps, 30 tbr, 30 tbn, 30 tbc
[NULL @ 0x55929846fd60] Unable to find a suitable output format for '/home/liam/lol4'
/home/liam/lol4: Invalid argument
PANIC: unprotected error in call to Lua API (/usr/local/share/lua/5.1/gifine/commands.lua:234: bad argument #2 to 'new_from_bytes' (-1 is out of <0, 1.844674407371e+19>))

Use ffmped for GIF encoding

Hi, I have a suggestion for GIF encoding. Currently gifine uses imagemagick's convert to produce GIFs. Convert seems to try to load all raw images into memory. That often makes my system run out of memory and freeze (with 16GB of RAM).

Instead there are options for ffmpeg to produce GIFs with a reasonable quality, speed and memory usage. Here is an example how ffmpeg can be used: https://github.com/lukechilds/gifgen/blob/master/gifgen#L71

Would it be possible to add it as an encoding option?

After selecting area to record: Invalid argument

After selecting the recording area using slop
I got this error:
:0+0,0: Invalid argument
I experience this problem in 50% cases after selecting area to ### record.

What is strange is that after closing the program and reopening it again its works again

Full trace when working:
Recording with x: 0, 0, w: 961, h: 1054
Working in dir /tmp/gifine_putjybyefn
ffmpeg version n4.1 Copyright (c) 2000-2018 the FFmpeg developers
built with gcc 8.2.1 (GCC) 20180831
configuration: --prefix=/usr --disable-debug --disable-static --disable-stripping --enable-fontconfig --enable-gmp --enable-gnutls --enable-gpl --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libdrm --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libiec61883 --enable-libjack --enable-libmodplug --enable-libmp3lame --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libv4l2 --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxcb --enable-libxml2 --enable-libxvid --enable-nvdec --enable-nvenc --enable-omx --enable-shared --enable-version3
libavutil 56. 22.100 / 56. 22.100
libavcodec 58. 35.100 / 58. 35.100
libavformat 58. 20.100 / 58. 20.100
libavdevice 58. 5.100 / 58. 5.100
libavfilter 7. 40.101 / 7. 40.101
libswscale 5. 3.100 / 5. 3.100
libswresample 3. 3.100 / 3. 3.100
libpostproc 55. 3.100 / 55. 3.100
:0+0,0: Invalid argument

Update the code to work on Lua 5.3 (and 5.2)

I tried installing it and ended up with the following error:

$ gifine
/usr/bin/lua5.3: /usr/local/share/lua/5.3/gifine/main.lua:4: attempt to call a nil value (global 'unpack')
stack traceback:
	/usr/local/share/lua/5.3/gifine/main.lua:4: in main chunk
	[C]: in function 'require'
	/usr/local/lib/luarocks/rocks/gifine/dev-1/bin/gifine:2: in main chunk
	[C]: in ?

Quick Google search told me that "in Lua 5.2, unpack was moved to table.unpack."

The alternatives system on my Debian system selected lua5.3 as the default version. This version is also available in stable releases of Debian and Ubuntu.

Replacing unpack with table.unpack in command.lua and main.lua which can be found in /usr/local/share/lua/5.3/gifine/ did the trick for me.

Since Gifine did not really met my needs, there will be no PR from me today. Perhaps in the future.

Encode video > Save MP4 causes error "No such file or directory" or Output file "does not contain any stream"

After capturing a video, Encode video > Save MP4 never worked for me. The popup says "Save to GIF" so I'm not even sure what I'm supposed to select, and if try the following:

Entering a filename without extension:

App bottom message:

Wrote mp4 to filename (nil)

Terminal:

Unable to find a suitable output format for 'filename'
filename: Invalid argument

Entering a filename with extension .mp4 or .gif:

App bottom message:

Wrote mp4 to test.mp4 (nil)

Terminal:

[image2pipe @ 0x558eedfa37c0] Could not find codec parameters for stream 0 (Video: png, none(pc)): unspecified size
Consider increasing the value for the 'analyzeduration' and 'probesize' options
Input #0, image2pipe, from 'pipe:':
Duration: N/A, bitrate: N/A
Stream #0:0: Video: png, none(pc), 60 tbr, 60 tbn, 60 tbc
Output #0, mp4, to 'test.mp4':
Output file #0 does not contain any stream
du: cannot access 'test.mp4': No such file or directory
closing pipe

Entering path to an existing MP4 or GIF:

App bottom message:

Wrote mp4 to test.gif (1.4MB)

Terminal:

[image2pipe @ 0x56199b4827c0] Could not find codec parameters for stream 0 (Video: png, none(pc)): unspecified size
Consider increasing the value for the 'analyzeduration' and 'probesize' options
Input #0, image2pipe, from 'pipe:':
Duration: N/A, bitrate: N/A
Stream #0:0: Video: png, none(pc), 60 tbr, 60 tbn, 60 tbc
Output #0, gif, to '/home/leyn/Pictures/GIF/opt/test.gif':
Output file #0 does not contain any stream
closing pipe

I assume the popup should say "Save to MP4" and I should be able to either override an existing .mp4 or enter a new .mp4 name, then it should export there.

Stuck on "Converting to gif" and the mp4 option gives an error

Hello!

I'm experiencing a weird issue with gifine. Clicking the "save gif" button and selecting a name for the file ends up with the terminal showing 'Converting to gif' forever, no errors. I tried this with a tiny 3 frame gif, same issue.

MP4:
[image2pipe demuxer @ 0x5591c68c9920] Unable to parse option value "0.0" as video rate
[image2pipe demuxer @ 0x5591c68c9920] Error setting option framerate to value 0.0.
pipe:: Invalid argument
closing pipe
du: cannot access '/home/oleerik/testmp4': No such file or directory

Am I doing something wrong?

stuck in converting

Hi, I installed gifine on linux mint, it seems to work properly, but it stay stuck up during "Working: converting" infinitely.
I used record with square selection, I have 151 frames with a delay of 4

I give you the terminal trace :
Recording with x: 80, 119, w: 489, h: 275 Working in dir /tmp/gifine_jlaywgmilx ffmpeg version 2.8.11-0ubuntu0.16.04.1 Copyright (c) 2000-2017 the FFmpeg developers built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.4) 20160609 configuration: --prefix=/usr --extra-version=0ubuntu0.16.04.1 --build-suffix=-ffmpeg --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --cc=cc --cxx=g++ --enable-gpl --enable-shared --disable-stripping --disable-decoder=libopenjpeg --disable-decoder=libschroedinger --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librtmp --enable-libschroedinger --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzvbi --enable-openal --enable-opengl --enable-x11grab --enable-libdc1394 --enable-libiec61883 --enable-libzmq --enable-frei0r --enable-libx264 --enable-libopencv WARNING: library configuration mismatch avcodec configuration: --prefix=/usr --extra-version=0ubuntu0.16.04.1 --build-suffix=-ffmpeg --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --cc=cc --cxx=g++ --enable-gpl --enable-shared --disable-stripping --disable-decoder=libopenjpeg --disable-decoder=libschroedinger --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librtmp --enable-libschroedinger --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzvbi --enable-openal --enable-opengl --enable-x11grab --enable-libdc1394 --enable-libiec61883 --enable-libzmq --enable-frei0r --enable-libx264 --enable-libopencv --enable-version3 --disable-doc --disable-programs --disable-avdevice --disable-avfilter --disable-avformat --disable-avresample --disable-postproc --disable-swscale --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libvo_aacenc --enable-libvo_amrwbenc libavutil 54. 31.100 / 54. 31.100 libavcodec 56. 60.100 / 56. 60.100 libavformat 56. 40.101 / 56. 40.101 libavdevice 56. 4.100 / 56. 4.100 libavfilter 5. 40.101 / 5. 40.101 libavresample 2. 1. 0 / 2. 1. 0 libswscale 3. 1.101 / 3. 1.101 libswresample 1. 2.101 / 1. 2.101 libpostproc 53. 3.100 / 53. 3.100 Input #0, x11grab, from ':0+80,119': Duration: N/A, start: 1498562824.793944, bitrate: N/A Stream #0:0: Video: rawvideo (BGR[0] / 0x524742), bgr0, 489x275, 30 fps, 30 tbr, 1000k tbn, 30 tbc Output #0, image2, to '%09d.png': Metadata: encoder : Lavf56.40.101 Stream #0:0: Video: png, rgb24, 489x275, q=2-31, 200 kb/s, 30 fps, 30 tbn, 30 tbc Metadata: encoder : Lavc56.60.100 png Stream mapping: Stream #0:0 -> #0:0 (rawvideo (native) -> png (native)) Press [q] to stop, [?] for help frame= 203 fps= 30 q=-0.0 Lsize=N/A time=00:00:06.76 bitrate=N/A video:63145kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown Converting to gif

Crash optimising gif

Running on Manjaro, Arch:

100% [/tmp/gifine_jrptamcbut.gif] Analyze for gray...
100% [/tmp/gifine_jrptamcbut.gif] Classify colors...
100% [/tmp/gifine_jrptamcbut.gif] Reduce colors: 256...
100% [/tmp/gifine_jrptamcbut.gif] Synchronizing pixels...
Optimizing gif
/usr/bin/lua5.3: /usr/share/lua/5.3/gifine/commands.lua:28: attempt to index a nil value (local 'process')

luarocks install fails

Perhaps I'm doing something wrong? Fresh install of luarocks:

Installing http://luarocks.org/dev/gifine-dev-1.rockspec...
Using http://luarocks.org/dev/gifine-dev-1.rockspec... switching to 'build' mode

Missing dependencies for gifine:
lgi 

Using https://rocks.moonscript.org/lgi-0.9.1-1.src.rock... switching to 'build' mode
make -C lgi
make[1]: Entering directory '/tmp/luarocks_lgi-0.9.1-1-3364/lgi/lgi'
pkg-config --exists 'gobject-introspection-1.0 >= 0.10.8' --print-errors
Package gobject-introspection-1.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `gobject-introspection-1.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gobject-introspection-1.0' found
Makefile:53: recipe for target '.depcheck' failed
make[1]: *** [.depcheck] Error 1
make[1]: Leaving directory '/tmp/luarocks_lgi-0.9.1-1-3364/lgi/lgi'
Makefile:16: recipe for target 'all' failed
make: *** [all] Error 2

Error: Failed installing dependency: https://rocks.moonscript.org/lgi-0.9.1-1.src.rock - Build error: Failed building.

Tried a few seconds(10-20) of gif, produced ~140GB of garbage in tmp

I tried to produce a gif of like 10-20 seconds, it got stuck on optimizing gif. And i left my pc running, when i came back after ~1 hour, it was still stuck there. SO i cancelled it and killed the process.

So far so good, than i started getting low disk warnings. When i analyzed i saw ~140GB of gifine folder in /tmp directory.

Something fishy happened, and as of its impact, this needs to be fixed. I am sorry, i had to delete the folder without analyzing(because my machine was stucking) so can't say what was in it. But i felt that i must at-least report it.

PS: #18 #20 and #14 are related.

optimizing gif needs some form of progress feedback

When making a gif, everything seems smooth up until I get to "optimizing gif". There's no feedback on how far along it is, could we get some form of progress feedback for it?

Also, if it's taking too long, perhaps a hotkey to stop the current export and go back to the app to adjust it, like making it smaller?

Edit: Turns out I was watching it terminal, without realizing the optimize bit had completed. So maybe just state in terminal "Done" when it is done? :)

How to uninstall gifine

Gifine is a great tool but I have to reinstall it for certain reasons. I need to know how to uninstall it safely including its dependencies.

Because it uses luarocks installer and the dependencies and sub-dependencies are installed beforehand, obviously I cannot use:
sudo apt remove --auto-remove gifine

I succesfully uninstalled gifine, luarocks and gli. How can firstly-installed dependencies can be safely removed without affecting other system features?

slow to encode - progress bar?

hi, I've just started using your app, I'm liking the editing functions a lot.

however it seems to hang on encoding ~1000 frame gifs? there's no progress, anyway. is it possible to include a progress bar or some other way of tracking it? at the moment after selecting the place to save the animation it dumps you back to the editing screen with the save gif button greyed out.

I guess it could be my hardware, but the GIMP saves gifs a lot faster.

thanks!

Feature proposal: set extension (.gif, .mp4) in file path selection popup to auto add extension if needed

Currently, I must type the extnsion (.gif, .mp4) manually each time or I will export a file with a pure basename, and need to add the extension later.

Most apps open a file path prompt that has a set of extensions predefined, and will auto-fill the extension if not manually written in the filename. Since there is a dedicated button for GIF and MP4, we could just set the extension to the corresponding one.

Cannot install gifine, it seems a problem of lua versions

I'm trying to install gifine in my archlinux, but i got this trace message:

[andres@artemia ~]$ sudo luarocks install --server=http://luarocks.org/dev gifine
Installing http://luarocks.org/dev/gifine-dev-1.rockspec
Cloning into 'gifine'...
remote: Enumerating objects: 216, done.
remote: Counting objects: 100% (7/7), done.
remote: Compressing objects: 100% (5/5), done.
remote: Total 216 (delta 2), reused 6 (delta 2), pack-reused 209
Receiving objects: 100% (216/216), 91.36 KiB | 615.00 KiB/s, done.
Resolving deltas: 100% (119/119), done.
Missing dependencies for gifine dev-1:
   lgi (not installed)

gifine dev-1 depends on lua >= 5.1 (5.4-1 provided by VM)
gifine dev-1 depends on lgi (not installed)
Installing https://luarocks.org/lgi-0.9.2-1.src.rock

lgi 0.9.2-1 depends on lua >= 5.1 (5.4-1 provided by VM)
make -C lgi
make[1]: Entering directory '/tmp/luarocks_lgi-0.9.2-1-IwRv4J/lgi/lgi'
pkg-config --exists 'gobject-introspection-1.0 >= 0.10.8' --print-errors
touch .depcheck
gcc -fPIC  -O2 -fPIC -I/usr/include -I/usr/include/gobject-introspection-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/sysprof-4 -pthread  -Wall -Wextra -O2 -g -c -o buffer.o buffer.c
gcc -fPIC  -O2 -fPIC -I/usr/include -I/usr/include/gobject-introspection-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/sysprof-4 -pthread  -Wall -Wextra -O2 -g -c -o callable.o callable.c
callable.c: In function 'closure_callback':
callable.c:1237:13: error: too few arguments to function 'lua_resume'
 1237 |       res = lua_resume (L, NULL, npos);
      |             ^~~~~~~~~~
In file included from lgi.h:11,
                 from callable.c:12:
/usr/include/lua.h:300:15: note: declared here
  300 | LUA_API int  (lua_resume)     (lua_State *L, lua_State *from, int narg,
      |               ^~~~~~~~~~
make[1]: *** [Makefile:63: callable.o] Error 1
make[1]: Leaving directory '/tmp/luarocks_lgi-0.9.2-1-IwRv4J/lgi/lgi'
make: *** [Makefile:16: all] Error 2

Error: Failed installing dependency: https://luarocks.org/lgi-0.9.2-1.src.rock - Build error: Failed building.

The error occurs when compiling lgi library, that seems incompatible with the current lua version 5.4.

I've tried to use other lua versions using luaver. For example, by using lua 5.3.6 and luarocks 3.5.0 I'm able to install lgi and gifine, but when I start it I get this other error:

/home/andres/.luaver/lua/5.3.6/bin/lua: /home/andres/.luarocks/share/lua/5.3/lgi/override/Gdk.lua:23: bad argument #1 to 'registerlock' (userdata expected, got nil)
stack traceback:
	[C]: in function 'lgi.core.registerlock'
	/home/andres/.luarocks/share/lua/5.3/lgi/override/Gdk.lua:23: in main chunk
	[C]: in function 'require'
	/home/andres/.luarocks/share/lua/5.3/lgi/namespace.lua:183: in function 'lgi.require'
	/home/andres/.luarocks/share/lua/5.3/lgi/namespace.lua:170: in function 'lgi.require'
	(...tail calls...)
	/home/andres/.luarocks/share/lua/5.3/gifine/main.lua:2: in main chunk
	[C]: in function 'require'
	....luarocks/lib/luarocks/rocks-5.3/gifine/dev-1/bin/gifine:2: in main chunk
	[C]: in ?

Is there any combination of versions that work? Could it be related to this issue? lgi-devs/lgi#226

If the cause is incompatibility with Gtk4, is there any way to force using Gtk3?

Thanks.

Cannot open display :0

Hi,
I got this error after selecting my rectangle. I'm running on Archlinux with Gnome 3 (gdm).
I have same error with xrandr --display :0. Looks like gdm is running on display :0 and my user on :1.

Recording with x: 972, 438, w: 802, h: 462
Working in dir	/tmp/gifine_upcacpyudm
ffmpeg version 3.2.2 Copyright (c) 2000-2016 the FFmpeg developers
  built with gcc 6.2.1 (GCC) 20160830
  configuration: --prefix=/usr --disable-debug --disable-static --disable-stripping --enable-avisynth --enable-avresample --enable-fontconfig --enable-gmp --enable-gnutls --enable-gpl --enable-ladspa --enable-libass --enable-libbluray --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libiec61883 --enable-libmodplug --enable-libmp3lame --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libv4l2 --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-netcdf --enable-shared --enable-version3 --enable-x11grab
  libavutil      55. 34.100 / 55. 34.100
  libavcodec     57. 64.101 / 57. 64.101
  libavformat    57. 56.100 / 57. 56.100
  libavdevice    57.  1.100 / 57.  1.100
  libavfilter     6. 65.100 /  6. 65.100
  libavresample   3.  1.  0 /  3.  1.  0
  libswscale      4.  2.100 /  4.  2.100
  libswresample   2.  3.100 /  2.  3.100
  libpostproc    54.  1.100 / 54.  1.100
Invalid MIT-MAGIC-COOKIE-1 key[x11grab @ 0x560ae96ddf00] Cannot open display :0.0+972,438, error 1.
:0.0+972,438: Input/output error

Last Framerate setting is not remembered, sometimes defaults to 0

I find the Framerate value when opening gifine quite inconsistent.

Sometimes it's the last framerate I entered (60), sometimes something else (30), sometimes 0. I sometimes close gifine before or after finishing a full capture and GIF conversion, maybe this affects the last value saved?

It would be nice if it just remembered the last entered value (saved as soon as you press "Record rectangle", or alternatively use some preference for default value.

FPS precision loss when passing integer delay to gm convert (60 FPS is considered same as 50 FPS)

I was wondering what the "delay" option meant, and it seems passed to gm convert command as a number of hundredths of s between each frames (see man gm, search delay).

This induces a loss of precision in FPS as compared to GIF frame ms duration as found in editors like Aseprite.

I didn't see differences with naked eye, but when opening in Aseprite, I could see that the standard frame durations were 2 hundredths of second = 20ms <=> 50 FPS instead of ~16ms <=> 60 FPS.

This is about the same difference as playing the Genesis aka Mega Drive PAL version on 50Hz TV where the action and music would actually slow down slightly compared to their 60Hz/FPS counterpart. So while not perceptible for non-trained eye, I can imagine it may be an issue when uploading GIF of time-critical games like fighting games.

I also tested extreme FPS, the max is 79 FPS but in fact, it just sets delay to 0 which in turns sets the true frame duration to 1ms, the only case going below 10ms, which is equivalent to 1000 FPS (of course, my computer couldn't play that so that's just theoretical).

If the limitation of gm convert cannot be overcome, maybe a conversion pass with another tool could at least readjust the frame durations? Either in the middle before we start optimizing frames and packing similar frames together, or at the end if it's not an issue (the operation should be linear so still work after packing same frames together).

EDIT: note that browsers may support up to 50 FPS or even less, so that's something to take into account when making GIF for the web; for it's more something for the user to care about depending on their usage

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.