Adding watermarks to videos is a common requirement for content creators and developers. With FFMPEGAPI.net, you can easily overlay a watermark on your videos without the hassle of managing your own FFmpeg infrastructure. This article will guide you through the process of using the Add Watermark API endpoint to accomplish this task efficiently.
Understanding the Add Watermark API
FFMPEGAPI.net provides a powerful hosted REST API for adding watermarks to your videos. The Add Watermark endpoint allows you to overlay an image onto a video with flexible positioning and scaling options.
- No server setup required.
- API-key authentication for secure access.
- Ideal for developers, automation scripts, SaaS applications, and content pipelines.
API Endpoint Details
To use the Add Watermark feature, you'll interact with the following API endpoint:
- Method: POST
- Path: /api/add_watermark
Parameters for the Add Watermark Request
When making a request to the Add Watermark API, you will need to provide several parameters in JSON format:
- 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): Placement of the watermark on the video. Default is 'bottom-right'.
- scale (number, optional): Width of the watermark as a fraction of the video width (0.05 to 1.0). Default is 0.25.
- async (boolean, optional): If true, the job will be processed in the background.
Making a Request: cURL Example
Here’s how you can use cURL to make a request to the Add Watermark API:
curl -X POST https://www.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}'
Practical Python Example
If you prefer Python, you can use the requests library to interact with the API as follows:
import requests
url = 'https://www.ffmpegapi.net/api/add_watermark'
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, json=data)
print(response.json())
FFMPEGAPI.net offers a seamless way to add watermarks to your videos via a cloud-based API. With no server management required and easy integration for developers, it's the optimal solution for those looking for a reliable and efficient FFmpeg alternative. Start enhancing your video content today with FFMPEGAPI.net!