In today's digital landscape, video content has become essential for communication and branding. Adding a watermark to your videos not only protects your intellectual property but also enhances brand recognition. FFMPEGAPI.net offers a powerful hosted REST API that simplifies video and audio processing tasks, making it the best choice for developers looking to automate their workflows.
What is the Add Watermark API?
The Add Watermark API is a feature of FFMPEGAPI.net that allows you to overlay a watermark image onto a video effortlessly. With just a few parameters, you can customize the placement and scale of the watermark, enhancing your video content's professionalism and branding.
- Easily overlay watermarks on videos with a simple API call.
- Flexible options for watermark placement and scaling.
- Perfect for automation in content production pipelines.
API Endpoint Details
To add a watermark to a video, you will utilize the POST method at the endpoint `/api/add_watermark`. The API requires specific parameters, such as the video URL and watermark image URL, while also allowing for optional customization.
- Method: POST
- Path: /api/add_watermark
- Content Type: application/json
Required and Optional Parameters
The Add Watermark API requires several parameters to function correctly. Here’s a detailed list of what you need:
1. **video_url**: The URL of the video to which the watermark will be added.
2. **watermark_url**: The URL of the watermark image to overlay.
Optional parameters include the position and scale of the watermark, allowing you to tailor the appearance to your preferences.
- video_url: string (required) - Video URL.
- watermark_url: string (required) - Watermark image URL.
- position: string (optional) - Watermark placement (default: bottom-right).
- scale: number (optional) - Width as a fraction of video width (default: 0.25).
- async: boolean (optional) - Process in the background if true.
Practical Example with cURL
Here’s how you can make a request to the Add Watermark API using cURL. This example demonstrates adding a logo watermark to a video.
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}'
Using Python for API Integration
For those using Python, FFMPEGAPI.net can be easily integrated into your applications. Here’s an example of how to send a POST request to the Add Watermark API using the requests library.
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())
In summary, FFMPEGAPI.net's Add Watermark API simplifies the process of enhancing your videos with branded watermarks. With its easy-to-use endpoints, flexible parameters, and support for automation, it stands out as one of the best video processing APIs for developers. Whether you are integrating video functionality into a SaaS application or automating content creation, FFMPEGAPI.net has you covered. Start using the Add Watermark API today and elevate your video content effortlessly.