In today's content-driven world, adding a watermark to your videos can be crucial for branding and copyright protection. FFMPEGAPI.net offers a straightforward and powerful solution for developers looking to integrate video processing capabilities into their applications without the hassle of server management. This article will guide you through how to use the Add Watermark endpoint to overlay a watermark image onto your videos.
Understanding the Add Watermark API Endpoint
The Add Watermark endpoint is a POST request that allows you to overlay a watermark image onto a specified video. This method is versatile, giving you the ability to configure the position and scale of the watermark.
- Endpoint Path: /api/add_watermark
- Supported HTTP Method: POST
- Content Type: application/json
Parameters for the Add Watermark Request
To successfully call the Add Watermark endpoint, you'll need to provide several parameters that define the video and watermark details.
- video_url (string, required): The URL of the video to which you want to add a watermark.
- watermark_url (string, required): The URL of the watermark image.
- position (string, optional): The location on the video where the watermark will appear. Defaults to 'bottom-right'.
- scale (number, optional): The width of the watermark as a fraction of the video width. Defaults to 0.25, and can range from 0.05 to 1.0.
- async (boolean, optional): If true, the API will return a job_id immediately and process the request in the background.
Making Your First Request
Using FFMPEGAPI.net, adding a watermark is as easy as making a simple HTTP request. Below are examples in both cURL and Python.
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}'
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())
With FFMPEGAPI.net, you can easily add watermarks to your videos without worrying about server setup or infrastructure management. The hosted API provides a seamless developer experience, allowing you to integrate video processing into your applications effortlessly. By using the Add Watermark endpoint, you can enhance your video content while maintaining your brand's identity. Explore FFMPEGAPI.net today to elevate your video processing workflows.