You are asking a lot of vague questions in one post, some of them could be answered with a google search but here we are so here I go.
*Encode movies to mp4-mkv
While encoding and transcoding both represent ways of converting files between formats, there is a distinct difference. Encoding, by definition, takes analog source content and converts it to a digital format, such as converting your old family Super8 films to DVD. In contrast, transcoding takes an existing digital format and converts it to a different digital format, as is the case when you take a Flash video and convert it to an adaptive bitrate format such as HTTP-Live-Streaming.
What you are looking to do is either transcode your movies from their original format to a format that can be ingested by a streaming server. Or, you want to convert your movies ahead of time
(my preferred option) to the format you wish
(mp4,mkv) or a format that does not need to need to be transcoded to be ingested
(FLV/M4V [Media Server Dependent]).
Before I breakdown the rest of your questions...
Adding a watermark to movies, creating a live stream from movies located in folder and add moving text overlay can be done on the fly with a streaming studio/mixing application (Wirecast, Xsplit, OBS, Snowmix). My answers below will assume a NON-on-the-fly mentality.
*Ability to add a movie clip in front of the movie
You want to concatenate your "clip" with your movie. This operation can be (but should not be) referred to as “join videos” or “merge videos”.
Simple video join using FFmpeg
ffmpeg -i “concat:video1.avi|video2.avi” output_video.avi
You can also add the clip between each video playing using a concatenated list (see below).
Learn More:
Concatenate Videos Using FFmpeg
Concatenate (Offical FFmpeg Documentation)
*Ability to add watermark to movies
A few ways to do this:
1. Use a GUI video converter
(Freemake)
2.Use FFmpeg
ffmpeg -i test.mp4 -i watermark.png -filter_complex "overlay=10:10" test1.mp4
Learn More:
How to Add a Watermark to Video (FFmpeg Filters)
*Ability to create a live stream from movies located in folder
Some media servers can do it like Wowza.
Some panels can do it like Xtream Codes or Flussonic
FFmpeg can do it using a
concatenated list:
Create a file mylist.txt with all the files you want to have concatenated in the following form (lines starting with a # are ignored):
# this is a comment
file '/path/to/file1.wav'
file '/path/to/file2.wav'
file '/path/to/file3.wav'
Note that these can be either relative or absolute paths. Then you can stream copy or re-encode your files:
ffmpeg -f concat -safe 0 -i mylist.txt -c copy output.wav
The -safe 0 above is not required if the paths are relative.
*Add moving text ,overlay,between ads.... and so on. <----
(Do not use "and so on" when asking for help. We are not mind reader's and cannot predict what that means)
You do not want to add text, overlays, ads to your movies directly because if you want to change it you have to redo the whole movie every time.
It should all be managed by the player on your website look at Brightcove Monetization and Advertising & Brightcove Overlay
(Do not want to link for risk of rule violation)
If you desire you can do a simple image overlay in FFmpeg using the following syntax:
ffmpeg -i input.mp4 -i image.png \
-filter_complex "[0:v][1:v] overlay=25:25:enable='between(t,0,20)'" \
-pix_fmt yuv420p -c:a copy \
output.mp4
overlay=25:25 means we want to position the image 25px to the right and 25px down, originating from the top left corner (0:0).
enable='between(t,0,20)' means we want the image to show between second 0 and 20.
[0:v][1:v] means that we want the first video file we import with -i, in our case input.mp4 or how ffmpeg sees it video input file number 0, to be under video input file 1, in our case image.png. :v just means we want video 0 and video 1. [0:a] would mean we want the first imported audio track. Which would also come from input.mp4 but would point to the audio track instead of the video track in the mp4 file.
*Transcoding via cpu or gpu? Whats better?
GPU acceleration is a kind of hardware acceleration where the processing intensive workloads are offloaded to the graphics processing unit (GPU) while the remaining tasks are still carried out in CPU. GPU is a computer hardware chip designed for rapid calculations. It's able to process images faster than a CPU due to its parallel processing architecture.
Learn More:
GPU Acceleration Performance & Speed in High-quality Video Transcoding
The only crutch I offer:
There are a couple of GUI interfaces for FFmpeg if you are not good with the command line.
Graphical User Interface (GUI) Applications using FFmpeg