In today's video-centric world, creating content that is optimized for mobile viewing is crucial, especially for social media platforms. FFMPEGAPI.net offers a powerful hosted REST API designed specifically for video and audio processing. In this article, we will explore how to use the Convert to Vertical endpoint to effortlessly transform horizontal videos into vertical format, a necessity for many developers working on content pipelines and SaaS applications.
Why Convert to Vertical?
As mobile devices dominate the way we consume video content, vertical video formats have become increasingly popular, particularly on platforms like Instagram and TikTok. This shift requires content creators and developers to adapt their workflows to ensure videos are suited for mobile viewing.
- Increased engagement on social media.
- Improved user experience on mobile devices.
- Adaptation to changing viewer habits.
Introducing the Convert to Vertical API Endpoint
FFMPEGAPI.net provides the Convert to Vertical endpoint, allowing you to seamlessly convert any horizontal video to a vertical format. This REST API is designed to save developers time and effort by handling all of the underlying FFmpeg infrastructure, so you don't have to.
- Endpoint: /api/convert_to_vertical
- Method: POST
- Content Type: application/json
Request Parameters
To use the Convert to Vertical endpoint, you need to provide certain parameters in your request. Here are the required and optional parameters:
- video_url (required): The URL of the video you wish to convert.
- watermark_url (optional): An optional URL for a watermark image that you can overlay on the video.
- async (optional): If set to true, the API will return a job_id immediately and process your request in the background.
Example Usage
Here’s how to use the Convert to Vertical API endpoint with a practical example.
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"}'
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"}
response = requests.post(url, json=data)
print(response.json())
FFMPEGAPI.net is the ultimate solution for developers looking to streamline their video processing workflows. By leveraging the Convert to Vertical endpoint, you can ensure your video content is perfectly formatted for mobile viewers, enhancing engagement and user experience. With no server setup required and API-key authentication, FFMPEGAPI.net allows you to focus on building your application without being bogged down by infrastructure management. Try it today and elevate your video processing capabilities!