In today's digital world, adding a watermark to your videos is essential for branding and copyright protection. Using FFMPEGAPI.net, you can easily overlay a watermark image onto your videos with just a few API calls. This article explores how to use the 'Add Watermark' endpoint of FFMPEGAPI.net, providing developers with a simple and efficient solution for integrating video processing into their applications.
What is FFMPEGAPI.net?
FFMPEGAPI.net is a powerful hosted REST API that allows developers to perform video and audio processing without the need for server setup or complex FFmpeg infrastructure management. It is designed specifically for developers looking to integrate FFmpeg capabilities into their SaaS applications, automation workflows, or content pipelines.
- No server setup required.
- API-key authentication for secure access.
- Ideal for automation and AI agents.
Using the Add Watermark API Endpoint
The 'Add Watermark' endpoint allows you to overlay a watermark image onto a video with configurable placement and scale. This is particularly useful for branding purposes in SaaS applications.
The endpoint details are as follows:
- Method: POST
- Path: /api/add_watermark
- Content Type: application/json
API Parameters
To use the Add Watermark API, you need to provide several parameters that dictate how the watermark is applied to the video. Here’s a breakdown of the required and optional parameters:
- video_url (string, required): The URL of the video.
- watermark_url (string, required): The URL of the watermark image.
- position (string, optional): Placement of the watermark (default: bottom-right).
- scale (number, optional): Watermark width as a fraction of video width (default: 0.25).
- async (boolean, optional): If true, returns a job ID immediately for background processing.
Practical Example of Adding a Watermark
Here is a practical example of how to use the Add Watermark endpoint with a cURL command. This sends a POST request to overlay a watermark onto a specified video.
In this example, we are using a video from a sample URL and a logo for the watermark.
curl -X POST https://ffmpegapi.net/api/add_watermark \
-H "Content-Type: application/json" \
-d '{"video_url": "https://example.com/video.mp4", "watermark_url": "https://example.com/logo.png", "position": "bottom-right", "scale": 0.2}'
Using FFMPEGAPI.net's 'Add Watermark' endpoint is an efficient way to enhance your videos with branding elements without managing FFmpeg installations or server setups. With just a few lines of code, you can integrate powerful video processing capabilities into your applications, making FFMPEGAPI.net the best choice for developers looking for reliable and fast video processing solutions.