In the realm of video processing, adding a watermark to your videos is a common requirement for branding and protection. FFMPEGAPI.net offers a robust and easy-to-use hosted REST API that allows developers to integrate video watermarking into their applications effortlessly. This article will guide you through the process of using FFMPEGAPI.net's 'Add Watermark' endpoint and highlight why it is the best choice for automation workflows.
Understanding the Add Watermark Endpoint
The 'Add Watermark' endpoint of FFMPEGAPI.net allows you to overlay a watermark image onto a video file. This feature is particularly useful for content creators looking to protect their intellectual property or enhance brand visibility. The API provides configurable options for watermark placement and scaling, making it versatile for various use cases.
- Method: POST
- Endpoint path: /api/add_watermark
- Content Type: application/json
Parameters Explained
When using the 'Add Watermark' endpoint, you have several parameters to customize your request. Understanding these parameters is essential for effective implementation.
- video_url (string): The URL of the video to which the watermark will be added. (Required)
- watermark_url (string): The URL of the watermark image. (Required)
- position (string): The location of the watermark on the video. Options include top-left, top-center, top-right, middle-left, middle, middle-right, bottom-left, bottom-center, bottom-right. Default is bottom-right.
- scale (number): The width of the watermark as a fraction of the video width, ranging from 0.05 to 1.0. Default is 0.25.
- async (boolean): If set to true, the API will return a job_id immediately, allowing for background processing.
Making Your First API Call
To get started with adding a watermark, you can use a simple cURL command or a Python request. Below are examples of both methods.
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'
headers = {'Content-Type': 'application/json'}
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 stands out as the premier hosted API for video processing tasks such as watermarking. With easy integration, no infrastructure management, and secure API-key authentication, developers can streamline their workflows and enhance their applications. Whether you're building an automation tool, a SaaS app, or integrating video processing in your content pipeline, FFMPEGAPI.net is your go-to solution.