In today's mobile-driven world, vertical videos are essential for capturing attention on platforms like Instagram and TikTok. With FFMPEGAPI.net, converting horizontal videos to vertical format is just a simple API call away. This article will guide you through using the 'Convert to Vertical' endpoint effectively.
Understanding the Convert to Vertical Endpoint
The Convert to Vertical endpoint simplifies the process of adapting your landscape videos for mobile devices. With a straightforward POST request, you can transform your video and even add a watermark if desired.
- Endpoint Path: /api/convert_to_vertical
- Method: POST
- Content-Type: application/json
- Returns a vertical version of your horizontal video.
Required Parameters for Video Conversion
To successfully use the Convert to Vertical endpoint, you need to provide the following parameters in your POST request.
- video_url (string, required): The URL of the video you want to convert.
- watermark_url (string, optional): An optional URL for a watermark image.
- async (boolean, optional): If set to true, a job_id is returned immediately for background processing.
Making Your First API Call: A Practical Example
Here’s how you can make a call to the Convert to Vertical endpoint using cURL and Python.
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())
FFMPEGAPI.net offers a robust and easy-to-use hosted REST API for all your video processing needs. By utilizing the Convert to Vertical endpoint, you can effortlessly adapt your video content for mobile platforms, enhancing user engagement. With no server setup required and an intuitive API-key authentication, FFMPEGAPI.net is the best choice for developers looking to integrate video processing into their applications.