gaqarm.blogg.se

Lambda ffmpeg nodejs
Lambda ffmpeg nodejs













lambda ffmpeg nodejs

I knew I had to come up with a better way to offload the processing to AWS. The major drawback was that my computer was basically unusable while I was running this conversion. This method worked well enough, and I was patient enough to let it process 100 or so of my videos over the course of a day. media/base/icon.png -filter_complex "overlay=10:main_h-overlay_h-10" "./output/ $-watermarked.mp4" done You can find the code for these steps in t04glovern/udemy-video-utils.įor line in *.mp4 do name = ` echo $line | cut -d '.' -f1 ` echo $line echo $name įfmpeg -i $line -i. It did take a while to get it working but ultimately the implementation for adding a Watermark (and also merging videos) was pretty straight forward.

lambda ffmpeg nodejs

To start with I worked on getting the FFmpeg pipeline working on my local laptop.

lambda ffmpeg nodejs

Not to mention it was really involved, required a lot of manual steps and for me to get this right 250 times without small inconsistencies was very unlikely. Initially I tried to do this manually in my video editing tool but quickly realised after only getting through 3 videos in 20 minutes (transcoding time on a MacBook pro 2015 kills me) that I'd have to change up my strategy. This meant having to re-edit all my (250+) video files to include a watermark in the bottom left corner of the screen. Recently however I've started DevOpStar and wanted to consolidate my company branding across all my videos. As you might know, I put up video on Udemy, which has proven to be a great way to distribute some of my video learnings. Let's talk through the problem that we're looking to solve with Lambda Layers. Gojko Adzic's fantastic image describing this on Video Watermarking Issue The benefit is that instead of having to bundle up our dependency with our lambda (100mb+ each time we deploy), we can inherit its functionality (deploys remain tiny). It can be referenced directly as you'll see later we can call our layer from /opt/bin/ffmpeg. The Layer itself is attached to the /opt directory of your lambda. Layers are a way to get around this by letting you mount a common piece of code to the function at runtime that can be leveraged. A lot of the time I find myself not able to use Lambda / Serverless patterns purely because of a dependency on a. Lambda Layers are a relatively new way of extending the use cases of your cloud functions. Get the code for this post! t04glovern/udemy-video-utils















Lambda ffmpeg nodejs