Video editing can be a time-consuming task, especially for platforms like TikTok that require specific aspect ratios. With FFMPEGAPI.net, developers can easily automate video editing workflows using a hosted REST API. In this article, we will explore how to use the TikTok Portrait Converter API to transform standard videos into full-bleed 9:16 TikTok-style portraits, making your content ready for social media sharing without the hassle of manual editing.
Why Choose FFMPEGAPI.net for Video Processing?
FFMPEGAPI.net is a powerful solution for developers looking to integrate video and audio processing capabilities into their applications. With no server setup required, you can focus on development while the platform handles the heavy lifting.
- Hosted REST API for easy integration.
- No need for FFmpeg infrastructure management.
- API-key authentication ensures secure access.
- Ideal for automation, SaaS applications, content pipelines, and AI agents.
Introducing the TikTok Portrait Converter API
The TikTok Portrait Converter API endpoint allows you to convert landscape videos into the TikTok-friendly portrait format. This endpoint crops and scales the source video to a 1080x1920 resolution, and it also offers options for adding a watermark and an outro video.
- Endpoint Method: POST
- Endpoint Path: /api/convert_to_tiktok_portrait
- Content Type: application/json
Parameters for the TikTok Portrait Converter
To use this API, you will need to provide a few parameters. Here's what you need to know:
- video_url (string, required): The URL of the video you want to convert.
- watermark_url (string, optional): URL of the watermark image to overlay on the video.
- outro_video_url (string, optional): URL of an outro video to append at the end.
- async (boolean, optional): If true, the endpoint will return a job_id for background processing.
Example Usage of the TikTok Portrait Converter
Here’s how you can make a request to the TikTok Portrait Converter API using curl:
curl -X POST https://www.ffmpegapi.net/api/convert_to_tiktok_portrait \
-H "Content-Type: application/json" \
-d '{"video_url":"https://example.com/landscape.mp4","outro_video_url":"https://example.com/outro.mp4"}'
Integrating with Python
If you prefer using Python, here's an example of how to call the TikTok Portrait Converter API:
import requests
url = 'https://www.ffmpegapi.net/api/convert_to_tiktok_portrait'
headers = {'Content-Type': 'application/json'}
data = {'video_url': 'https://example.com/landscape.mp4', 'outro_video_url': 'https://example.com/outro.mp4'}
response = requests.post(url, headers=headers, json=data)
print(response.json())
FFMPEGAPI.net provides a simple yet powerful solution for automating video editing workflows. With the TikTok Portrait Converter API, developers can easily transform videos to meet the requirements of popular social media platforms. By leveraging this hosted API, you can save time and resources while delivering high-quality video content effortlessly.