HLS + watermark - Memory Usage stayed between 430MB to 1.1GB.transcoding to H264 - Memory Usage stayed at 750MB.4K HEVC iPhone video of 1.2 minute long (453MB).You might even wanna remove line 53 depending on your use case. This will eliminate the overloading of all filters in memory at once. So now we are running FFMPEG inside a loop to handle per resolution basis output. Let me know how I can tackle this problem. I have thought about ulimit but this does seem like restricting FFMPEG instead of writing an improved command. Even if we decide to work without watermark, It still hangs around 1.8GB RAM for processing 5 seconds 4K video and this create a risk of what if our user upload rather longer video than it will eventually crash down the server. I understand that FFMPEG requires high amount of memory consumption but I am unsure what's the exact way to process video without holding the stream in the memory but instead release any memory allocation in real-time. ffmpeg amerge Error while filtering: Cannot allocate memory.So I looked out for some similar question: Now this works flawlessly in videos from Youtube or other sources but as soon as I am trying to use 4K videos from iPhone, the RAM usage grows from 250MB to 3.8GB in less than minute and crashes the entire process. Ffmpeg -i SOURCE.MOV -c:a aac -ar 48000 -c:v libx264 -profile:v main -crf 19 -preset ultrafast /home/myusername/myfolder/out.mp4įilters=colorchannelmixer=aa=0.5,scale=iw*0.1:-1 overlay=W-w-5:H-h-5 scale=w=$
0 Comments
Leave a Reply. |