I want to create 2D animation using Lua. Please give me some advices.
1. I dont need to create games. Are there engines for animation only?
2. If not, please help me to choose Lua Game Engine with export to mp4 or avi format.
Related
I am stucked by a video processing feature, Specifically, upload an image and then generate a video based on various video templates.
Here are the video templates:
http://video-static.biku8.com/data/video/template/3286012076458048/7437ab55-2e83-4a36-9046-5708fcddf4c1.mp4
http://video-static.biku8.com/data/video/template/3274256089907264/ae8fa3f7-6c9c-45ca-810f-48db92cc14cb.mp4
http://video-static.biku8.com/data/video/template/3213894231425088/bf107d439b9043a58c1ea0ba26f811db_template.mp4
...
As shown in the video templates above, I just need to upload a photo to generate a great video.
My question
What is the specific idea for implementing this video?
Which third-party libraries are needed? (ffmpeg, opencv)
PS: I am using dlib and opencv for face recognition. I can generate face image, but I don't know how to insert face image into the correct position of these template videos.
I would suggest you to follow the below 3 steps
Load the template video by opencv, you can access the video frame by frame
Modify each frame, one by one.
Save frame to video stream writer
Regarding step 2, actually, you must copy the uploaded image to the each frame by a mask (the pixel from source image would be copied to destination image if its coordinate on the mask is non-black). The mask could be defined by a list of points OR by an image. You should pre-define a mask for each frame in a file. Then load the mask for each frame and copy.
How to read video, save video OpenCV read-write Video
How to insert image to another image Copy non rectangular ROI
Generating videos like them are all not easy tasks. I recommend to use Adobe After Effects or other video creating software (with some scripts and actions) if you don't need to generate it by a single program or program language.
Then, I answer them below when you need to generate it by programatically.
For the first one, you should recognize faces and bones. So you should use OpenCV. ( I recommend to use tools like OpenFrameworks or TouchDesigner and so on. )
For the second one, I don't know what you exactly want, but if you want to recognize the position of the bottle dynamically, you have to use deep learning or other way to detect it. Then you may need TensorFlow or OpenCV. ( If you just want to merge layers, you can use ffmpeg etc. )
For the last one, you should split the video frame into the boxes, then you have to control. I think there are many ways to implement this. I may use OpenFrameworks, TouchDesigner, vvvv, or Processing.
I think using ffmpeg for them is not recommended. This tool is not the best for generating complicated video. But ffmpeg will do good, for example if you just merge two videos with alpha.
I want to hardsub all the movies and add watermark to them, I used ffmpeg once bu it’s slow, if you can recommend new way or how to use it faster.
To use a hardsub and watermark you will need to transcoding the entire movie. It is a slow operation regardless the software you use.
Maybe you can think about use a subtitle track. Watermarks can be used on players side too. That way you won't need transcoding.
Hello I want a script or a way to make a video from images. I have a folder with a lot of pictures named randomly like "flowers.jpg", "tree.jpg", etc.
I also have an "intro.jpg" photo which I want to add at the start of every video.
What I want exactly is to create a video (any format, .avi etc) for a custom duration with only two photos like this:
intro.jpg (10-20 seconds or how much i want) + tree.jpg (1 hour or how much i want)
intro.jpg + flowers.jpg
...
and so on.
Sorry for being a newbie, but I have no clue how to accomplish this.
The easiest way might be to use a free online creation tool. You can just upload you photos and specify the duration. You can also add audio and transitions.
My daughter uses Animoto
https://animoto.com/
or you could try this.
https://www.wevideo.com/
If you just want to make the video locally it is easy in Adobe Premiere, iMovie, Sony Vegas or any number of easy to use programs with free version or free trials.
By script do you mean code and if so under what environment? You can use FFMpeg which is open source and command line and execute from code.
FFmpeg create video from images
If you want guidance in building the FFMpeg script or just want to use ffmpeg locally try a GUI for ffmpeg such as
http://www.free-codecs.com/download/ffmpegGUI.htm
Good day!
I create programm for server, which should generate a video clip of the photos. The user sends photos to the server and the server generates a video with animation and sound track from this photos. I use ffmpeg for creation video, but how to create animation?. I need different (difficult) animation: transitions (fade in, fade out, scroll), zooming, animations numbers etc.
This example explains what I need.
Thanks
You should certainly check the MLT framework. It is used by many video editors, and supports different transitions in a quite easy form.
Check also Openshot which is video editing software written in Python. It also uses MLT framework, and due to being written in Python the code is rather easy to read.
I have application which simply is an animation (some circles moving around).
I want to know how can I save this animation as video like MP4?
OR is it possible to record(capture) things which happen inside a node and save it as video format?
There is no build-in functionality for that.
If you just want to record how your application run there are several tools for that. E.g Fraps
If you want to create your own video programmatically you need to use some 3rd party software (or write one), which allows to encode set of images to video. E.g. Xuggle. Here you can find how to take screenshots in JavaFX: Taking a screenshot of a scene or a portion of a scene in JavaFx 2.2