Please add comments

A quick "how to" for animated GIFs:
To convert a set of still images into an animation:
Using the free GIMP software, load all the frames by using "Open as Layers", crop each frame to a fixed size (use the "Dockable Dialog", "Layers " to view and select each frame individually). Save (or Export) the stack of frames as an animated GIF, choosing the "animation" option.

I think all naturewatch projects should have at least one journal entry, so that there is somewhere for people to communicate about the project. So here it is :-)

(click on the journal entry title to actually see the comment/discussion area)

Lähettänyt tony_wills tony_wills, 11. huhtikuuta 2014 10:53


It's a nice feature that this site animates the thumbnails as well as the full images, so that they show up animated in lists etc. , doesn't do that.

Lähettänyt tony_wills yli 7 vuotta sitten (Lippu)

It's a nice project you have here, I hope to add a bit of content if that's okay. I've just figured out a good way to convert my videos into GIFs but it's still a work in progress. I was just curious as to how you made the thumbnails into GIFs..

Lähettänyt russ87 melkein 7 vuotta sitten (Lippu)

The animated thumbnails are a hangover from the original website that allowed animated icons. When became a window into a lot of them were imported (a couple were lost). But the site now strips them down to the first frame on upload - I tried animated PNGs and other possibilities, but no go, the door is locked ;-).

Of course you are welcome to add whatever animations you have, and any tips etc on generating them. The main problem I found was keeping them down to a reasonable size (As a ballpark figure I think 10MB is ok, but 50MB is a bit excessive). I only found 2 animated observations already on inaturalist, but I don't think the creator is still active here and they haven't accepted the invites to the project (616847, and 619140).

Lähettänyt tony_wills melkein 7 vuotta sitten (Lippu)

Hi Tony, I stumbled on this project today and wonder if it will be possible for me to create some obs from past and future bird and insect obs there any update on simplest tech and size limit?

Lähettänyt kaipatiki_naturew... melkein 3 vuotta sitten (Lippu)

Absolute size limit is 20MB per file, but often anything above 10 to 12MB fails to load. Simplest technique is probably use an online service that creates animated GIFs.

Lähettänyt tony_wills melkein 3 vuotta sitten (Lippu)


Lähettänyt kaipatiki_naturew... melkein 3 vuotta sitten (Lippu)

I found a command-line gif conversion from a video file can be done using ffmpeg with ffmpeg -f gif -i out.gif. I needed some additional options to meet iNat's size limits, as per the tutorial I link below. For my first one, I used -ss 5.0 to skip the first 5.0 seconds, and might've used, say, -t 2.5 to only convert a 2.5 second clip but didn't need it for this one, & finally -vf scale=320:240 to downscale the video to 320x240.

The result, my first such animation, was a turkey vulture for which I could not provide an ID-able still photo, but is nevertheless recognizable in the vid: 25647320. It's admittedly not a good quality source video, and with a little bit of extra effort, the conversion quality could be improved, but my goal was "just good enough to recognize without spending too much time on it" and I think I managed OK on that.

For the method described above, I followed this tutorial, only having to look up and add the scaling option myself:

The exact command I ended up using was: ffmpeg -ss 5.0 -i -vf scale=320:240 -f gif 008.gif

See comments below for the better command that eventually replaced this in the final version.

As the tutorial explains, the quality may not be great with this quick-and-dirty method, but I deemed it good enough for my purposes, & did not pursue the extra steps required to improve on quality, especially considering the already rather poor quality of the source video; I don't think I could possibly have made it much worse!

Lähettänyt benarmstrong yli 2 vuotta sitten (Lippu)

I've used ffmpeg but had a hard time getting a decent pallette of colours if I recall. To cut down size you can clip the image to a letter-box proportions, ie long but not very high as most of the action is in that central region and GIFs don't demand particular aspect ratios or sizes. Also 10 frames per second is plenty for GIFs, so use only every nth frame (say every 5th frame). So I'd clip the video horizontally and vertically, and skip frames and see how big the result was, then work out how much to scale the result to get down to the size limits. (with ffmpeg you'd probably have to specify the output frame rate as otherwise skipping frames would speed it up)

Lähettänyt tony_wills yli 2 vuotta sitten (Lippu)

Cool. It would be nice to see a better tutorial tailored to the needs of this project added to the Tutorials area of the forum & linked here. I'd love to contribute, but at this point, need some more experience using the tool before trying my hand at one. Re. the colour palette, the tutorial I linked from giphy had some suggestions. Have you tried anything like that?

Lähettänyt benarmstrong yli 2 vuotta sitten (Lippu)

I think your final result was pretty good as you can see the flight motion quite well. I would expect you could probably get away with twice as big (eg 640x480 as it would only be about 14MB). I think you can get away with bigger images if you drag and drop them on an existing observation, rather than through the normal upload page which I think times out as tries to search for meta data in the big files (but still no bigger than 20mb).

Lähettänyt tony_wills yli 2 vuotta sitten (Lippu)

I did try lots of suggested ffmpeg things but found the best that works for me is to split the (short!) video into separate frames then load them into Gimp as layers. I can then easily crop the frame and add a delay at the end, or delays to any frames. But it is a bit quirky and depends on the version of Gimp that you have. But it does give the best full colour results that I've obtained. The limitations are that I can't easily change the brightness/levels/contrast over all the frames, and if I do I usually pay for it by ending up with obvious colour banding. Also it is a pain to remove extra frames, so I need to only import the frames I want (eg select start and end, and skip frames etc).

Could write a tutorial, perhaps a wiki one where people can add their ideas....

Lähettänyt tony_wills yli 2 vuotta sitten (Lippu)

I crop and shorten the video using WhatsApp's inbuilt editing tools and send the video to myself.
Then I use ffmpeg to scale it down to half the size and then convert it to a GIF.
I can also change speed and contrast/brightness etc using ffmpeg if needed.

Lähettänyt russ87 yli 2 vuotta sitten (Lippu)

Thanks. Maybe I'll incorporate some of those suggestions (crop, other tweaks) in other conversions.

Meanwhile, I went back and looked more carefully at the giphy tutorial and realized it was late in the day & I was too impatient. After reading the whole thing through attentively about how to use -filter_complex to get better quality, as well as layering on the fps & scale filters (whoops, missed that on the first skim through!) it's not that hard to follow, and the results really are much better than my first, clumsy attempt:

ffmpeg -ss 5.0 -i -filter_complex "[0:v] fps=12,scale=480:-1,split [a][b];[a] palettegen [p];[b][p] paletteuse" 008.gif

For one thing, the scale=480:-1 not only produces a nicer sized video, but also maintains the aspect ratio.

So I've gone back and replaced my poor first try with the improved version. I hope others find the above one-liner useful, which I feel is a good starting point, only needing tweaks on a case-by-case basis for special needs.

Lähettänyt benarmstrong yli 2 vuotta sitten (Lippu)

Yes that version is quite near the original quality.

Lähettänyt tony_wills yli 2 vuotta sitten (Lippu)

Yep. Quite pleased. Also yeah, I noticed the metadata timeout thing and discovered how to do it by adding media afterwards by accident.

Lähettänyt benarmstrong yli 2 vuotta sitten (Lippu)

The tutorial covers one more palette optimisation at the end. If you're fussy about palette, you might find that gives you better results (& might be less painful than the gimp process, though I guess if you're in there to do other things that might still make more sense). I found the difference between my 008.gif and 008-2.gif imperceptible (not a big surprise, given how little information of importance the colour actually carries for this one). But to save time wading through the tutorial again, here's that command:

ffmpeg -ss 5.0 -i -filter_complex "[0:v] fps=12,scale=480:-1,split [a][b];[a] palettegen=stats_mode=single [p];[b][p] paletteuse=new=1" 008-2.gif

The author says the tradeoff is the file may be bigger (but might be smaller, too!) In my case, it ended up negligibly smaller with this command. The difference here is that a more thorough palette generation is done here frame by frame -- unsurprising here that it netted me very little, since my scene has no abrupt changes in scene & colour composition.

I ended up not using the new file for my observation.

Lähettänyt benarmstrong yli 2 vuotta sitten (Lippu)

hello to everybody, I make a lot of GIFs, I really love them, but a time ago a guy pointed out that making gif is basically not ok, this user said "Inat allow the publication of photo and audios to ID your observations, not so videos .. if it were otherwise, they would be within the observation options. GIFs can help in some cases, but they are not the most appropriate way to register your observations" also said this "if Inat does not allow the publication of videos, uploading animated gifs is to trick the system, so you can do it" .
Is it really counterproductive to make gif for iNat? I think it's an entertaining way to record moments when only a video can do it, but I have no real notion of its "possible effect"

Lähettänyt diegoalmendras melkein 2 vuotta sitten (Lippu)

iNat is well aware that animated GIFs are used, iNat specifically allows them to display. Originally animated GIFs were allowed anywhere that images or icons were displayed (eg even for User profile icons), but they modified the code to just display the first frame in some situations. If iNat didn't tolerate them, they wouldn't be here. I don't think iNat has a specific objection to videos either, support for them has often been asked for, they just haven't found them to be a priority to implement (and they may have a cost with larger storage and bandwidth required).

Animated images can be very annoying though. If they are jerky, flashing or rapidly repeating, I find them annoying - I usually set them to endlessly repeat, but after a 5 second pause after the last frame.

Admittedly in most situations the animation doesn't help with identification, but there are a few like the following where a still image wouldn't show you enough to ID:

Lähettänyt tony_wills melkein 2 vuotta sitten (Lippu)

Very effective, I enjoyed seeing the kakariki feeding!

Lähettänyt kaipatiki_naturew... melkein 2 vuotta sitten (Lippu) works well for me for making GIfs out of individual images, turning videos into GIF, changing size, etc.

Lähettänyt alexis_orion yli 1 vuosi sitten (Lippu)

Thanks Alexis

Lähettänyt tony_wills yli 1 vuosi sitten (Lippu)

use a non-default scaling algorithm in ffmpeg to improve the quality of your gifs!

short example without palette gen:
ffmpeg -i -vf "fps=12,scale=500:-1:flags=lanczos" output.gif

better scaling filter, faster

best? scaling filter, slower

Lähettänyt libele noin 1 vuosi sitten (Lippu)

Thanks for the tips

Lähettänyt tony_wills noin 1 vuosi sitten (Lippu)

Lisää kommentti

Kirjaudu sisään tai Rekisteröidy lisätäksesi kommentteja