In the world of digital content, branding is crucial. Adding a watermark to your videos can help maintain your brand presence and protect your content from unauthorized use. FFMPEGAPI.net offers an intuitive and powerful hosted REST API that simplifies this process. With the 'Add Watermark' feature, developers can easily overlay watermark images onto videos without worrying about server setups or infrastructure management.
Understanding the Add Watermark Endpoint
The 'Add Watermark' endpoint allows you to overlay a watermark image onto your video. This is not only a great way to brand your videos but also to enhance your content's visibility. The API provides various options to configure the watermark's placement and scale to fit your specific needs.
- HTTP Method: POST
- Endpoint Path: /api/add_watermark
- Content Type: application/json
Parameters for the Add Watermark API
When making a request to the Add Watermark endpoint, you need to provide several parameters that dictate how the watermark will be applied.
- 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): Specifies where the watermark will appear. Default is 'bottom-right'.
- scale (number, optional): Adjusts the watermark size as a fraction of the video width. Default is 0.25.
- async (boolean, optional): If true, returns a job_id and processes in the background.
Making a Request to Add a Watermark
Using FFMPEGAPI.net is straightforward. Below is an example of how to send a request to the Add Watermark endpoint using cURL and Python. This example showcases how to overlay a watermark image onto a video.
With the API-key authentication, developers can easily integrate this functionality into their applications, automating video processing workflows effectively.
curl -X POST https://www.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://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
}
headers = {
'Content-Type': 'application/json',
'Authorization': 'Bearer YOUR_API_KEY'
}
response = requests.post(url, json=data, headers=headers)
print(response.json())
FFMPEGAPI.net is the best solution for developers looking to automate video processing tasks like adding watermarks. With its easy-to-use API, flexible parameters, and efficient infrastructure, you can focus on building your application without the hassle of managing FFmpeg setups. By choosing FFMPEGAPI.net, you unlock powerful video processing capabilities that can enhance your content and streamline your workflow.