In today's mobile-first world, creating vertical videos from horizontal formats is essential for engaging audiences on platforms like Instagram and TikTok. FFMPEGAPI.net offers a powerful and easy-to-use hosted REST API that allows developers to automate this conversion seamlessly. In this article, we’ll explore how to use the 'Convert to Vertical' endpoint to optimize your video content for mobile devices.
Why Choose FFMPEGAPI.net for Video Processing?
FFMPEGAPI.net eliminates the need for complex server setups or managing FFmpeg infrastructure, allowing developers to focus on building their applications. With API-key authentication, it’s secure and straightforward to integrate into various workflows.
- Easy to integrate into automation and SaaS applications.
- No server management or installation required.
- Scale effortlessly with API-driven workflows.
Using the Convert to Vertical Endpoint
The 'Convert to Vertical' endpoint is designed to transform horizontal videos into a mobile-friendly format. This function is especially useful for creators looking to quickly adapt their content for different social media platforms.
Here’s how to access the endpoint to perform this action.
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}'
Parameters and Options
When using the Convert to Vertical endpoint, you need to provide the following parameters:
- video_url (required): The URL of the horizontal video to convert.
- watermark_url (optional): An image URL for a watermark to apply to the video.
- async (optional): If set to true, the processing will occur in the background, and you'll receive a job ID.
FFMPEGAPI.net is the ultimate solution for developers looking to automate video editing tasks like converting horizontal videos to vertical format. With its intuitive API, you can streamline your content creation process without the overhead of infrastructure management. Start optimizing your video content today with FFMPEGAPI.net and enhance your mobile viewing experience!