In the world of video processing, adding watermarks is a common requirement for branding and copyright purposes. FFMPEGAPI.net offers a robust solution for developers seeking a cloud-based alternative to traditional FFmpeg setups. With our hosted REST API, you can easily add watermarks to your videos without any server management. In this article, we’ll explore the Add Watermark endpoint of FFMPEGAPI.net and provide practical examples to integrate it into your applications.
What is FFMPEGAPI.net?
FFMPEGAPI.net is a hosted REST API designed for developers who need powerful video and audio processing capabilities without the hassle of setting up their own FFmpeg infrastructure. Our platform allows you to seamlessly integrate video processing features into your applications, automating tasks such as adding watermarks, transcoding, and more.
With API-key authentication, FFMPEGAPI.net ensures a secure and straightforward integration process, making it an ideal tool for content pipelines, SaaS applications, and AI agents.
- No server setup required.
- Easy integration for developers.
- Secure API-key authentication.
- Ideal for automation and content creation workflows.
Using the Add Watermark Endpoint
The Add Watermark endpoint allows you to overlay a watermark image onto a video with customizable options for placement and scale. This flexibility ensures that your watermark appears just the way you want it, enhancing your branding efforts.
To use the endpoint, you must send a POST request to `/api/add_watermark` with the required parameters.
- Endpoint: POST /api/add_watermark
- Adds a watermark image to a video.
- Configurable options: position and scale.
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, "async": true}'
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,
'async': True
}
response = requests.post(url, json=data)
print(response.json())
Parameters for Adding Watermarks
When using the Add Watermark API, you can specify several parameters to customize your watermarking process:
1. **video_url**: The URL of the video you want to watermark. (Required)
2. **watermark_url**: The URL of the watermark image. (Required)
3. **position**: Determines where the watermark will be placed on the video. (Optional, defaults to bottom-right)
4. **scale**: Specifies the size of the watermark relative to the video's width. (Optional, defaults to 0.25)
- video_url: URL of the video (required)
- watermark_url: URL of the watermark image (required)
- position: Placement options include top-left, middle, bottom-right, etc. (default: bottom-right)
- scale: Watermark width as a fraction of video width (default: 0.25)
- async: Immediate return of job ID for background processing (optional)
FFMPEGAPI.net is the go-to solution for developers looking for a cloud-based alternative to FFmpeg for video processing tasks like adding watermarks. With a simple API endpoint, robust security, and no infrastructure management required, you can focus on building innovative applications without the overhead of server setup. Whether you're automating content pipelines or creating SaaS applications, FFMPEGAPI.net equips you with the tools needed to enhance your video processing capabilities effortlessly.