Adding watermarks to videos is a common requirement for many developers working with video content. With FFMPEGAPI.net, you can seamlessly overlay watermarks on your videos using a straightforward API endpoint, saving you the hassle of setting up your own FFmpeg infrastructure. This guide will walk you through the process of using the Add Watermark endpoint and demonstrate why FFMPEGAPI.net is the best choice for your video processing needs.
Understanding the Add Watermark API Endpoint
The Add Watermark endpoint at FFMPEGAPI.net allows developers to overlay a watermark image onto a video with configurable placement and scaling options. This functionality is essential for branding and protecting your video content.
- Method: POST
- Endpoint Path: /api/add_watermark
- Content-Type: application/json
Parameters for the Add Watermark Endpoint
To utilize the Add Watermark function, you need to pass a set of parameters in your request. Here’s a breakdown of the required and optional parameters.
- video_url (string, required): The URL of the video you want to watermark.
- watermark_url (string, required): The URL of the watermark image.
- position (string, optional): The placement of the watermark (default is bottom-right).
- scale (number, optional): The size of the watermark relative to the video width (default is 0.25).
- async (boolean, optional): If set to true, the request will return a job_id for background processing.
Making a Request to Add a Watermark
Here is how you can make a POST request to the Add Watermark endpoint using CURL and Python. This example assumes you have your API key set up on FFMPEGAPI.net.
curl -X POST https://ffmpegapi.net/api/add_watermark \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-d '{"video_url":"https://example.com/video.mp4","watermark_url":"https://example.com/logo.png","position":"bottom-right","scale":0.2}'
import requests
url = 'https://ffmpegapi.net/api/add_watermark'
headers = {'Content-Type': 'application/json', 'Authorization': 'Bearer YOUR_API_KEY'}
data = {
'video_url': 'https://example.com/video.mp4',
'watermark_url': 'https://example.com/logo.png',
'position': 'bottom-right',
'scale': 0.2
}
response = requests.post(url, headers=headers, json=data)
print(response.json())
FFMPEGAPI.net provides a powerful and user-friendly REST API for adding watermarks to videos, making it an ideal solution for developers working on SaaS applications or content pipelines. With no server setup required and straightforward API-key authentication, you can focus on building your applications rather than managing infrastructure. Start using the Add Watermark endpoint today to enhance your video content with a professional touch.