Adding a watermark to your videos can enhance brand visibility and protect your content. With FFMPEGAPI.net's hosted REST API, you can effortlessly overlay watermarks on your videos without the hassle of managing your own FFmpeg infrastructure. This article will guide you through using the Add Watermark endpoint to implement this feature in your applications.
Why Use FFMPEGAPI.net for Video Watermarking?
FFMPEGAPI.net offers a fast and efficient way to integrate video processing capabilities into your applications. By leveraging our hosted API, developers can focus on building features without worrying about server setups or FFmpeg management.
- No server setup required.
- API-key authentication ensures secure access.
- Ideal for automation, SaaS applications, and content pipelines.
Understanding the Add Watermark Endpoint
The Add Watermark endpoint allows you to overlay a watermark image onto a specified video. With customizable options for placement and scaling, you can easily tailor the watermark to fit your needs.
- Endpoint: POST /api/add_watermark
- Parameters include video_url, watermark_url, position, scale, and async.
Parameters Details
The Add Watermark API requires specific parameters to process the video successfully. Here's a breakdown of each:
1. **video_url**: The URL of the video you wish to watermark. (required)
2. **watermark_url**: The URL of the watermark image. (required)
3. **position**: Defines where the watermark will appear on the video; options include top-left, top-center, top-right, middle-left, middle, middle-right, bottom-left, bottom-center, bottom-right. Defaults to bottom-right.
4. **scale**: Sets the watermark's width as a fraction of the video width, ranging from 0.05 to 1.0. Defaults to 0.25.
Practical Example: Adding a Watermark
Here’s how you can use the Add Watermark API with a practical example in both curl and Python.
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}'
import requests
url = 'https://ffmpegapi.net/api/add_watermark'
payload = {
'video_url': 'https://example.com/video.mp4',
'watermark_url': 'https://example.com/logo.png',
'position': 'bottom-right',
'scale': 0.2
}
headers = {'Content-Type': 'application/json'}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
With FFMPEGAPI.net, adding watermarks to your videos is a breeze. By integrating our hosted API into your content pipeline, you save time and resources while delivering professional-quality video processing. Take advantage of our easy-to-use interface and powerful features to elevate your media projects today!