I run ffmpeg through .bat file , which overlays the HUD video on top of the other (overlay). I saw this method here: FFmpeg - Overlay one video onto another video?
When you run the batch file, ffmpeg starts "rendering it" and in 1-2 minutes my computer begins to show terrible lags. In the task manager I see that 12 GB of the available 16 GB of RAM is gobbled up.
Code:
@echo off
setlocal EnableExtensions DisableDelayedExpansion
for %%i in (*.mov *.mp4 *.mts) do (
md "result_%%~ni"
ffmpeg -i "%%i" -i "res/intro 2018.mp4" -filter_complex "[1:v]setpts=PTS-10/TB[a]; [0:v][a]overlay=enable=gte(t\,5):shortest=1[out]" -map [out] -map 0:a -c:v libx264 -crf 18 -pix_fmt yuv420p -c:a copy -y result_%%~ni\%%~ni%%03d.mp4
)
pause
After 2 minutes, the error that the memory is not enough:
Here are the specs of the computer:
This is the size of the swap file (by system choice):
Example of video-file: