By Hans Uwe Petersen on Wednesday, 07 February 2018
Posted in Technical Issues
Replies 13
Likes 0
Views 865
Votes 0
In components - easysocial - settings - photos I have activated "Allow Aniated Gif Processing". When doing so, I got a popup message, saying myt API key was ok.

But when I try to add an animtaed gif to the stream by uploading it as a photo, I only get a still images.

When I add the same photo to an article in my Joomla-site, the animation works just fine.
It seems like after uploaded that gif photo through the story panel, it didn't show the photo which caused by your current template styling, i already applied some fix into your current template custom.css file, it should show fine now.

Can you try again? You can check this profile page -> http://yourdomain.com/index.php/under-uret/893-easy


body #es .es-photo-item.es-media-item img {
margin: 0;
}
·
Wednesday, 07 February 2018 08:44
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi!
It works with you test-gif file. But if I upload my own test-file, the animation still is not working. Please have a look at the attached file.
·
Wednesday, 07 February 2018 14:59
·
0 Likes
·
0 Votes
·
0 Comments
·
OK, is it a question about the size of the animation? I just have created a dummy-gif with some random pictures on my phone. This gif is working, when uploaded to EasySocial.

Sorry I forgot the link:
{mysite}/under-uret/872-hansuwe
·
Wednesday, 07 February 2018 15:07
·
0 Likes
·
0 Votes
·
0 Comments
·
Based on what i check, it seems like the system detected this image is not animation image. (https://stackideas.com/forums/animated-gifs#reply-393249)

But the strange thing is my local site seems work fine, you can watch my video here : http://take.ms/amFQdd

Is it possible provide us with your Cpanel access which can access this directory folder? /share/CACHEDEV1_DATA/Web/..

Because i would like to check that tmp file what is the content from that gif image.
·
Wednesday, 07 February 2018 17:27
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi again.
This is a bit strange.

If I take my animated-gif file and convert i to mp4 with the ffmpeg-command:
ffmpeg -i regitze.gif -movflags faststart -pix_fmt yuv420p -vf "scale=trunc(iw/2)*2:trunc(ih/2)*2" fruebjerg.mp4
the video works fine as a pseudo-animation

If I split the original file into 24 single jpg- and gif-files, each with a size of 872-730 px and then use imagemagic to create a new animated file I can observe the following:
convert -resize 972x730 -delay 60 -loop 0 *.gif resultat/nyny.gif
works on my local machine both in the imageviewer and webbroser, but does not work when uploaded to EasySocial

BUT when I change the original size to something smaller:
convert -resize 850x630 -delay 60 -loop 0 *.gif est-delay-60-resized-gifs-008.gif and upload this file to EasySocial it works, as it should do.
When inspecting the result, I can see that the animated gif even has been scaled down to 580x440 px.

If I use the single jpg's files and run the same command:
convert -resize 850x630 -delay 60 -loop 0 jpgs/*.jpg test-delay-60-resized-jpgs-007.gif
the uploaded file is not animated.

I also created an animated gif with Gimp, but the uploaded file was not animated either.

Is there any limitation regarding file size/picture size in the encoding of animated gifs in EasySocial?
Is it not possible to use an animated gif, which has been created with jpg's files?

Where is the adapter, which encodes the uploaded picture.

Best regards
Hans Uwe

p.s.: maybe I should mention, that I'm using Linux Mint on my desktop, laptop etc.
·
Wednesday, 07 February 2018 19:19
·
0 Likes
·
0 Votes
·
0 Comments
·
Thanks for getting back to us, the codes currently uses remote services to resize GIF images, mean it didn't go through any adapter or FFmpeg.

First we will use this following standard GIF image animation regex to check whether this image binary data match or not.

preg_match('#(\x00\x21\xF9\x04.{4}\x00\x2C.*){2,}#s', $file);


Second, we will send this image to our server to processing this animation GIF image using this PHP ImageMagick method.

After proceed, it will send back that image file on the site.
·
Thursday, 08 February 2018 16:43
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Arlex!

OK, this is a description of the process, but I think you will agree, it's not an answer to my question.

For test-purpose I have placed the following file in the root of my website:

<?php
$img="my-file";
$file = file_get_contents($img);
$animated=preg_match('#(\x00\x21\xF9\x04.{4}\x00\x2C.*){2,}#s', $file);
if ($animated==1){
echo "This image is an animated gif";
} else {
echo "This image is not an animated gif";
}
?>

When I upload my file "test-delay-60-resized-gifs-008.gif" and put the file name in the php-script and run the script, the result is:
This image is an animated gif

If I take my 24 gif files and run the command:
convert -delay 60 -loop 0 *.gif no-resize.gif

the converted file runs fine as an animation on my desktop.

When I adjust my testscript and upload the file the test result is:
This image is not an animated gif

Next I made a little new animation with my smartphone: 20180208-test.gif, run the above test, test result: This image is an animated gif.
Then I uploaded the file to EasySocial and the animation was working.

I'm really confused, why my original animation is causing this trouble. But for the time being let's say, that we can mark this question as solved.

BUT: why do we have to send the animated gif file to your server, why can't we have a "local" test with a script like the one above and then proceed the file also locally?

Once again: thanks for your effort and help.

Best regards
Hans Uwe
·
Thursday, 08 February 2018 18:21
·
0 Likes
·
0 Votes
·
0 Comments
·
Yes, i totally agreed with you, what my previous reply is just explained how it process.

But i did requested in my previous reply, I would like to continuous check your issue, is there a way to access your directory folder here /share/CACHEDEV1_DATA/Web/..? Because i wonder why it work on my local site but your site having this issue.

BUT: why do we have to send the animated gif file to your server, why can't we have a "local" test with a script like the one above and then proceed the file also locally?

Most of the hosting companies does not allow this because of the CPU consumption which is enormous especially those shared server.
·
Thursday, 08 February 2018 23:18
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi again.
Most of the hosting companies does not allow this because of the CPU consumption which is enormous especially those shared server.

I do understand this point of view, but on the other hand I'm not so happy, with the fact, that your code implements a communication over the Internet with your server, without making this clear from the beginning.
And when I compare the resource consumption, when encoding a uploaded video and with the encoding of an animated gif, I cannot follow you.

But for the time being, I think we should mark this ticket as RESOLVED.

I have some other issues, which I will report in a separate ticket.

Thank you so much for your help.

Hans Uwe
·
Thursday, 08 February 2018 23:43
·
0 Likes
·
0 Votes
·
0 Comments
·
Hey Hans,

Thanks for your input on this. Think of this as web services You will never be able to run a GIF resizer on a shared hosting mainly because it utilizes too much CPU. Even on our own virtual machine, resizing just 1 large GIF (6mb) it would consume about 6% of the CPU on a virtual machine that costs us $69 / month.

Encoding a video runs a CLI service which is offloaded to ffmpeg and most of these CLI services are optimized in a way as opposed to having a php script to process resized images.

Sure, if you have any other issues, please feel free to start a new ticket.
·
Friday, 09 February 2018 16:48
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post