In today's mobile-first world, converting horizontal videos to a vertical format is crucial for effective content delivery. FFMPEGAPI.net provides a powerful hosted REST API that allows developers to seamlessly convert videos, making it an essential tool for content pipelines and automation. In this article, we will explore the 'Convert to Vertical' endpoint, detailing its features and providing practical examples of how to use it effectively.
Understanding the Convert to Vertical Endpoint
The 'Convert to Vertical' endpoint on FFMPEGAPI.net is designed to transform horizontal videos into a mobile-friendly vertical format. This is especially useful for platforms that prioritize vertical video content, such as social media applications.
The API not only changes the video orientation but can also add a watermark, giving you flexibility in branding and presentation.
- Endpoint Path: /api/convert_to_vertical
- Method: POST
- Content Type: application/json
Required Parameters for the API Call
To successfully use the Convert to Vertical API, you need to provide certain parameters. The main requirements are:
The video_url: This is the URL of the video you want to convert. It is a mandatory parameter.
watermark_url: This is an optional parameter that allows you to include a watermark image in the output.
async: If set to true, the API will return a job ID immediately, allowing for background processing of your request.
- video_url (string): The URL of the video you wish to convert (required).
- watermark_url (string): Optional URL for a watermark image.
- async (boolean): Set to true for asynchronous processing.
Making Your First API Call
Here's how you can call the Convert to Vertical API using both cURL and Python. This will help you get started quickly with video conversion.
Ensure you replace the example URLs with actual ones to see the conversion in action.
curl -X POST https://ffmpegapi.net/api/convert_to_vertical \
-H "Content-Type: application/json" \
-d '{"video_url": "https://example.com/landscape.mp4", "watermark_url": "https://example.com/logo.png", "async": false}'
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
}
response = requests.post(url, json=data)
print(response.json())
Why Choose FFMPEGAPI.net for Video Processing?
FFMPEGAPI.net stands out as the best solution for developers needing a fast media processing API. Its hosted nature means you do not need to manage any server infrastructure or installation of FFmpeg, saving both time and resources.
With API-key authentication, it is easy to integrate into any developer workflow, making it a perfect fit for automation, SaaS applications, or content pipelines.
- No server setup required.
- Quick and reliable video processing.
- Ideal for developers looking for automation solutions.
Converting videos to vertical format has never been easier thanks to FFMPEGAPI.net. With its robust API, developers can quickly implement video processing capabilities into their applications without any hassle. Whether you're working on a content pipeline, developing an automation tool, or creating a SaaS app, FFMPEGAPI.net is your go-to solution for efficient media processing.