In the current digital landscape, vertical videos are becoming increasingly important, especially for mobile platforms. Many developers are looking for ways to convert horizontal videos into vertical format seamlessly. FFMPEGAPI.net provides an easy-to-use hosted REST API that allows you to do just that without any cumbersome server setup or infrastructure management. In this article, we explore the POST endpoint for converting videos to vertical format and how you can integrate this functionality into your applications.
Understanding the Convert to Vertical Endpoint
FFMPEGAPI.net offers a dedicated endpoint for converting horizontal videos to a vertical format, which is especially useful for platforms like Instagram, TikTok, and other mobile applications. The endpoint you'll be using is /api/convert_to_vertical.
- Endpoint Method: POST
- Content Type: application/json
- Creates a mobile-friendly vertical output.
- Optionally applies a watermark to your video.
Parameters for the Conversion
When making a request to the /api/convert_to_vertical endpoint, you need to provide specific parameters to ensure proper video processing.
- video_url (string, required): The URL of the video you want to convert.
- watermark_url (string, optional): URL of an image to use as a watermark.
- async (boolean, optional): If true, return a job_id immediately and process in the background.
Making Your First API Call
To convert a horizontal video to a vertical format using the FFMPEGAPI.net REST API, you can make a simple POST request. Below is an example using cURL and Python to demonstrate how to use this API effectively.
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())
By using the FFMPEGAPI.net Convert to Vertical endpoint, developers can easily adapt their video content for mobile audiences without the need for complex server management. This makes FFMPEGAPI.net the ideal choice for SaaS applications, automation, and content pipelines. With API-key authentication and seamless integration, you can focus on building great user experiences while we handle the heavy lifting of video processing.