Huggies is an international company producing disposable diapers for babies, and is marketed by the American corporation Kimberly-Clark.
The scope of our work: front-end
Solution: Video editing
Huggies Kazakhstan was aiming to launch a new marketing campaign to increase the Huggies brand awareness and sales with the help of a tool for creating videos with babies.
Sloboda Studio had to make video processing software where we would insert baby photos into a photo frame, an open photo book, and a tablet and provide mothers and fathers with new family memories.
To insert three images that were supposed to move and change in perspective and in size and curve.
For adjusting the first photo (photo in the photo frame) we used ImageMagick and Node.js. We changed its size and perspective and inserted it into the photo frame.
The second photo should have been inserted into the photo album with the text. The difficulty here was that the album was open and resembled a double arc. The baby photo should go on one side and text on the other side. For embedding a photo we used ImageMagick, however, the text had to be re-formed in a photo and then inserted with the help of ImageMagick.
The challenge here was that the video is one-layered and all the special effects that it had were on that one layer. So, we couldn’t insert the photos above that layer since it would hide all the elements. That is why the photos should go under that layer. In order to accomplish this, we created a transparent layer.
For creating a transparent layer, we split a video into numerous frames with the help of FFmpeg.
Here’s how the process of assembling a video looks: The image that was loaded from the front was reduced or enlarged, then its perspective was changed and, if necessary, was curved. Then the photo was inserted under the right frame with the outlined coordinates. Then a necessary language and a cover color according to the gender of the baby are added.
Failure of the local server due to the memory leak
The first thing we tried was to launch the project on AWS, nevertheless, there was not enough memory for our project. That is why we configured the automatic cleaning of RAM for such toolsets as OpenCV, ImageMagick and FFmpeg on Node.js so as not to overload the entire stream.
However, this issue was solved only when a single user requested to receive a video. For resolving this problem for more than one user, we had to do memory cleaning more gradually to slow down the process of assembling a video but make it possible.
To enable generating a video for multiple users, we write down the logs – every operation was noted down in the console and terminals.
Thus we developed a tool for creating custom videos with babies branded by Huggies. Recently this marketing campaign was launched and a number of parents have already obtained their family videos.
front-end developer | PM
Technologies we used
Tools (hosting, monitoring etc.)
Relevant success stories
Hudson Medical + Wellness Hudson Medical + Wellness is a medical practice based in New York City.