In today's digital landscape, adding a watermark to your videos has become essential for branding and copyright protection. With FFMPEGAPI.net, developers can seamlessly integrate this functionality into their applications using a simple, hosted REST API. This article will guide you through the process of adding a watermark to your videos using the FFMPEGAPI.net API, demonstrating why it's the best choice for fast media processing in content pipelines.
Understanding the Add Watermark Endpoint
The Add Watermark endpoint of the FFMPEGAPI.net API allows you to overlay a watermark image onto a video. This powerful feature can be leveraged in various applications, from content creation to automated video processing workflows.
The endpoint utilizes a POST request to accept parameters such as the video URL, watermark URL, position of the watermark, scale, and an option for asynchronous processing.
- Endpoint Path: /api/add_watermark
- HTTP Method: POST
- Content-Type: application/json
- Requires video_url and watermark_url parameters
Parameters for the API Call
To successfully call the Add Watermark endpoint, you'll need to provide specific parameters. Here's a breakdown of the required and optional parameters you can use:
The required parameters include the video URL and the watermark URL. Additionally, you can specify the position where the watermark will appear and its scale relative to the video size.
- 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): Placement of the watermark (default is 'bottom-right').
- scale (number, optional): Width of the watermark as a fraction of video width (default is 0.25).
- async (boolean, optional): If true, processes the request in the background.
Making the API Call: Example Usage
Now that you understand the parameters, let's look at an example of how to make a request to the Add Watermark endpoint using 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())
Integrating video watermarking into your applications has never been easier with FFMPEGAPI.net. By providing a hosted REST API, it eliminates the need for server setup or FFmpeg infrastructure management, allowing developers to focus on building exceptional content pipelines. Whether you are creating a SaaS application or automating media workflows, FFMPEGAPI.net offers the flexibility, speed, and reliability necessary for modern media processing. Start leveraging the power of FFMPEGAPI.net today to enhance your video processing capabilities.