In today's digital landscape, adding a watermark to your videos can be crucial for branding and copyright protection. With FFMPEGAPI.net, you can easily overlay a watermark onto your videos using a simple REST API call, eliminating the need for complex server setups or FFmpeg management. In this article, we'll explore how to use the 'Add Watermark' endpoint to enhance your video content.
Understanding the Add Watermark API
The 'Add Watermark' endpoint is designed to allow developers to overlay a watermark image onto a video effortlessly. This API is not only easy to use but also offers flexible options for placement and scaling, ensuring that your watermark appears exactly as you envision.
- Endpoint: POST /api/add_watermark
- Content Type: application/json
- Returns a job ID for asynchronous processing.
API Parameters
When using the 'Add Watermark' endpoint, you need to provide specific parameters to customize your watermark. Here’s a breakdown of the parameters you can use:
- video_url (string, required): The URL of the video you want to process.
- watermark_url (string, required): The URL of the watermark image.
- position (string, optional): The placement of the watermark (default is bottom-right).
- scale (number, optional): Scale the watermark 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 an API Call
To add a watermark to your video, you'll need to make a POST request to the '/api/add_watermark' endpoint. Below is an example of how you can implement this 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())
FFMPEGAPI.net simplifies the process of watermarking videos with its fast and reliable hosted REST API. By eliminating the need for complex FFmpeg setups, developers can focus on building and integrating media processing into their applications. Whether you're enhancing a content pipeline or developing a SaaS application, FFMPEGAPI.net is the best choice for seamless video and audio processing. Try it today and elevate your media content!