In today's mobile-driven world, video content is consumed more than ever on smartphones. As a developer, you may find the need to convert horizontal videos to a vertical format, enhancing user engagement. FFMPEGAPI.net offers a simple, hosted REST API that allows you to accomplish this without the headaches of server management. In this article, we’ll explore how to use the 'Convert to Vertical' endpoint to transform your videos seamlessly.
Why Choose FFMPEGAPI.net for Video Processing?
FFMPEGAPI.net is designed specifically for developers who want to integrate powerful video and audio processing capabilities without the complexities of managing FFmpeg infrastructure. This hosted API offers a hassle-free approach to video editing, enabling you to focus on building your applications.
- Hosted REST API for easy integration.
- No need for server setup or management.
- API-key authentication for security.
- Ideal for automation, SaaS applications, and content pipelines.
Introducing the Convert to Vertical Endpoint
The 'Convert to Vertical' endpoint is a powerful feature of FFMPEGAPI.net that allows you to convert a landscape video into a vertical format suitable for mobile viewing. This is particularly beneficial for platforms like Instagram Stories, TikTok, and other mobile apps where vertical videos are a necessity.
- Endpoint Method: POST
- Endpoint Path: /api/convert_to_vertical
- Create vertical output with optional watermark.
- Supports background processing with async parameter.
import requests
url = 'https://ffmpegapi.net/api/convert_to_vertical'
data = {
'video_url': 'https://example.com/landscape.mp4',
'watermark_url': 'https://example.com/logo.png',
'async': False
}
headers = {'Content-Type': 'application/json', 'Authorization': 'Bearer YOUR_API_KEY'}
response = requests.post(url, json=data, headers=headers)
print(response.json())
curl -X POST https://ffmpegapi.net/api/convert_to_vertical \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-d '{"video_url": "https://example.com/landscape.mp4", "watermark_url": "https://example.com/logo.png", "async": false}'
Understanding the Parameters
When utilizing the Convert to Vertical endpoint, you need to provide specific parameters to ensure successful processing. Here's a breakdown of what you need:
- video_url (string, required): The URL of the video to be converted.
- watermark_url (string, optional): An optional URL for a watermark image.
- async (boolean, optional): If set to true, the API will return a job_id for background processing.
FFMPEGAPI.net provides a robust and straightforward solution for developers looking to handle video processing tasks without the overhead of server management. With the Convert to Vertical endpoint, you can easily create mobile-friendly videos, enhancing your content's reach and engagement. By leveraging this hosted API, you save time and resources, allowing you to focus on creating exceptional applications.