In today's digital landscape, adding a watermark to your videos is essential for branding and copyright protection, especially when sharing on social media platforms. FFMPEGAPI.net offers a straightforward hosted REST API that allows developers to easily overlay watermarks onto videos without the need for complex server setup. In this article, we will explore how to use the 'Add Watermark' endpoint of FFMPEGAPI.net to enhance your video content.
What is FFMPEGAPI.net?
FFMPEGAPI.net is a hosted REST API designed for seamless video and audio processing using FFmpeg technology. It requires no server management or extensive setup, making it an ideal choice for developers looking to incorporate video processing capabilities into their applications.
- No server setup required.
- API-key authentication for secure access.
- Ideal for automation, SaaS apps, and content pipelines.
Using the Add Watermark Endpoint
The 'Add Watermark' endpoint is a powerful tool that allows you to overlay a watermark image onto your videos. This endpoint is particularly useful for enhancing brand visibility when distributing video content on platforms like YouTube, Instagram, and Facebook.
- Endpoint Path: /api/add_watermark
- HTTP Method: POST
- Content Type: application/json
import requests
url = 'https://www.ffmpegapi.net/api/add_watermark'
headers = {'Authorization': 'Bearer YOUR_API_KEY', 'Content-Type': 'application/json'}
payload = {
'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=payload, headers=headers)
print(response.json())
Parameters for Customization
The 'Add Watermark' API requires certain parameters to function effectively. Here’s a breakdown of the available parameters:
- - **video_url**: The URL of the video to watermark (required).
- - **watermark_url**: The URL of the watermark image (required).
- - **position**: Optional parameter to set the watermark's position. Defaults to 'bottom-right'. Choices include: top-left, top-center, top-right, middle-left, middle, middle-right, bottom-left, bottom-center, bottom-right.
- - **scale**: Optional parameter defining the width of the watermark relative to the video width (default is 0.25).
- - **async**: Optional parameter to process in the background, returning a job ID immediately.
Practical Example
To illustrate how to use the 'Add Watermark' endpoint, here’s a practical example using cURL:
curl -X POST https://www.ffmpegapi.net/api/add_watermark \
-H 'Authorization: Bearer YOUR_API_KEY' \
-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}'
FFMPEGAPI.net simplifies the process of adding watermarks to videos through its robust hosted API. With its easy-to-use endpoint, customizable parameters, and no server management requirements, it's the ideal solution for developers who want to enhance their social media video workflows. Start leveraging FFMPEGAPI.net today to protect your brand and elevate your video content.