![]() In the process it occurred™ to me that since PHP is server side language, and we control the server environment, i can freely use FFmpeg in my scripts. I bet the money would have been better spent Bitcoin mining, especially way back in 2015. If one user (me) on a powerful local machine caused the fans to go insane imagine what 50 users would do to a DigitalOcean droplet, or more importantly to our wallets once we let the server farms rage. We were told to expect 100+ users at any given moment. I pushed the idea further and spent some time trying to re-create the animation by parsing each frame individually and merging them later, i was really happy with myself once i got it working, but the process itself was long and painful for the machine. Which did not in fact work, because in that case you drop the animation aspect since GD is unable to process animated Gifs in this way. The only way i saw fit was to use PHP-GD in order to add text to a pre-existing image, as seen on PHP4Kids. So I immediately dropped JS as a possible solution and grabbed PHP since the website itself was to be served via PHP anyway. This meant that UI needed to be very much simplified, and all the customization options were scrapped. And mid-way the client decided that the website should be less of a computer game style, and more of a mobile game. As i recall there were a couple of JS solutions i had tried, but all of them were really CPU intensive, Network intensive, or both. The first try seemed simple, do everything on the user’s computer, so we don’t have to do anything with the server. In other words, they were hoping for the website to become viral because kids could make their own Gifs and will hopefully share them with others. The client (a large regional company) asked for a viral website with kids games, colouring books etc - which would also be able to generate predefined animated gifs, with custom captions that users would write on the fly. Tldr tip: This is a long-haul article, so skip over to the ending if you are only interested in the solutions. Year and a half ago i had two projects concerning Gifs, and while they were different, i must admit i learned a lot in the direction of how to use C-level programs with PHP and shell, which seemed like a mystery up until then. I invented nothing new, this is just a compilation of what i have learned from a couple of very skilled people’s blogposts, in order to make it easier for you, the reader, to parse this information and create something great. Whether you pronounce it Gif or Jiff, sometimes it seems like we are all collectively using it wrong, and the more i researched the topic, the more i was sure of it. ![]() You know that feeling, when you are trying to figure out a new thing, but are certain that you are using it wrong, since nothing you try goes smoothly.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |