In the world of video content creation, adding watermarks is crucial for branding and copyright protection. Using FFMPEGAPI.net, a powerful hosted REST API for FFmpeg-powered video and audio processing, developers can easily overlay watermarks on videos without the hassle of server setup or infrastructure management. This article will guide you through using the Add Watermark endpoint to enhance your video content.
Understanding the Add Watermark Endpoint
FFMPEGAPI.net offers the Add Watermark endpoint, which allows you to overlay a watermark image onto your videos. This capability is vital for brands looking to protect their content while promoting their identity.
The endpoint simplifies the process of adding watermarks by providing configurable parameters such as position and scale, making it a breeze for developers to integrate into their applications.
- POST Method: /api/add_watermark
- Add a watermark image to a video.
- Configurable placement and scale options.
Parameters Required for the Add Watermark API
The Add Watermark API requires a few parameters to function correctly. Here’s a breakdown:
1. **video_url**: The URL of the video you want to watermark. This parameter is mandatory.
2. **watermark_url**: The URL of the watermark image. This is also mandatory.
3. **position**: Optional parameter specifying where the watermark should appear on the video. Default is 'bottom-right'.
4. **scale**: This optional parameter defines the width of the watermark as a fraction of the video width, ranging from 0.05 to 1.0. Default is 0.25.
- video_url: string (required)
- watermark_url: string (required)
- position: string (optional, defaults to 'bottom-right')
- scale: number (optional, defaults to 0.25)
- async: boolean (optional)
Making a Request to Add a Watermark
To add a watermark to a video, you can send a POST request to the /api/add_watermark endpoint. Below is an example of how to use curl and Python to achieve this.
When using FFMPEGAPI.net, you don't have to worry about server infrastructure, and you can focus on integrating video processing into your applications seamlessly.
curl -X POST https://ffmpegapi.net/api/add_watermark \n -H 'Content-Type: application/json' \n -H 'Authorization: Bearer YOUR_API_KEY' \n -d '{\n "video_url": "https://example.com/video.mp4",\n "watermark_url": "https://example.com/logo.png",\n "position": "bottom-right",\n "scale": 0.2\n }'
import requests\n\nurl = 'https://ffmpegapi.net/api/add_watermark'\nheaders = {'Content-Type': 'application/json', 'Authorization': 'Bearer YOUR_API_KEY'}\ndata = {\n 'video_url': 'https://example.com/video.mp4',\n 'watermark_url': 'https://example.com/logo.png',\n 'position': 'bottom-right',\n 'scale': 0.2\n}\nresponse = requests.post(url, headers=headers, json=data)\nprint(response.json())
FFMPEGAPI.net is the ultimate solution for developers aiming to automate video processing without the overhead of managing a server. By utilizing the Add Watermark endpoint, you can effortlessly enhance your video content with custom branding. With robust API-key authentication and a user-friendly design, FFMPEGAPI.net is the best hosted tool for your video processing workflows.