Automate TikTok Video Processing with n8n

February 24, 2026 · RenderIO

TikTok has specific video requirements

TikTok accepts videos between 3 and 10 minutes. The ideal resolution is 1080x1920 (9:16 vertical). Maximum file size is 287.6MB. Videos should be H.264 encoded with AAC audio.

If your source video is horizontal, square, or a different resolution, it needs processing before upload. Doing this manually for every video is a time sink. Doing it with n8n + RenderIO takes zero manual effort after the initial setup.

What the workflow does

  1. Receives a video URL (via webhook, Google Drive trigger, or any source)

  2. Resizes to 1080x1920 with proper padding

  3. Compresses to fit under 287MB

  4. Strips metadata (creation tool, location, etc.)

  5. Outputs a TikTok-ready download URL

Optionally: creates multiple unique variations for multi-account posting.

The FFmpeg command for TikTok

This single command handles resizing, compression, and metadata stripping:

-i {{in_video}} -vf "scale=1080:1920:force_original_aspect_ratio=decrease,pad=1080:1920:(ow-iw)/2:(oh-ih)/2:black" -c:v libx264 -crf 23 -preset fast -c:a aac -b:a 128k -map_metadata -1 -movflags +faststart {{out_video}}

Breaking this down:

  • scale=1080:1920:force_original_aspect_ratio=decrease - Fits within 1080x1920

  • pad=1080:1920:(ow-iw)/2:(oh-ih)/2:black - Centers with black bars

  • -crf 23 - Good quality, reasonable file size

  • -map_metadata -1 - Strips all metadata

  • -movflags +faststart - Moves moov atom for faster playback

Use the RenderIO n8n node

RenderIO has a partner-verified community node on the n8n marketplace. Install from Settings → Community Nodes → search "renderio". It provides native FFmpeg operations without HTTP Request configuration.

For TikTok workflows, the node simplifies the submit-and-poll pattern. The examples below use HTTP Request nodes for full flexibility, but the same FFmpeg commands and file mappings work with the native node.

Building the workflow

Node 1: Webhook Trigger

  • Path: /tiktok-process

  • Method: POST

  • Expected body:

{
  "videoUrl": "https://example.com/source-video.mp4",
  "accountName": "main-account"
}

Node 2: Submit to RenderIO (HTTP Request)

  • Method: POST

  • URL: https://renderio.dev/api/v1/run-ffmpeg-command

  • Authentication: Header Auth (X-API-KEY)

  • Body:

{
  "ffmpeg_command": "-i {{in_video}} -vf \"scale=1080:1920:force_original_aspect_ratio=decrease,pad=1080:1920:(ow-iw)/2:(oh-ih)/2:black\" -c:v libx264 -crf 23 -preset fast -c:a aac -b:a 128k -map_metadata -1 -movflags +faststart {{out_video}}",
  "input_files": {
    "in_video": "{{ $json.videoUrl }}"
  },
  "output_files": {
    "out_video": "tiktok_{{ $json.accountName }}.mp4"
  }
}

Node 3: Wait (5 seconds)

Node 4: Check Status (HTTP Request)

  • Method: GET

  • URL: https://renderio.dev/api/v1/commands/{{ $('Submit to RenderIO').item.json.command_id }}

  • Authentication: Header Auth

Node 5: IF (completed?)

  • Condition: {{ $json.status }} equals completed

  • True: Continue to output

  • False: Loop back to Wait (add a back-connection)

Node 6: Output

The {{ $json.output_files.out_video.storage_url }} URL contains your TikTok-ready video.

Handling horizontal source videos

If your source is 16:9 (landscape), the above command adds black bars top and bottom. That looks bad on TikTok. Better options:

Center crop (fills frame, cuts sides):

{
  "ffmpeg_command": "-i {{in_video}} -vf \"scale=1080:1920:force_original_aspect_ratio=increase,crop=1080:1920\" -c:v libx264 -crf 23 -c:a aac -map_metadata -1 {{out_video}}",
  "input_files": { "in_video": "{{ $json.videoUrl }}" },
  "output_files": { "out_video": "tiktok-cropped.mp4" }
}

This scales up and crops to fill the entire 9:16 frame. You lose the sides, but the video fills the screen.

Blur background (fills bars with blurred version):

{
  "ffmpeg_command": "-i {{in_video}} -filter_complex \"[0:v]scale=1080:1920:force_original_aspect_ratio=increase,crop=1080:1920,boxblur=20[bg];[0:v]scale=1080:1920:force_original_aspect_ratio=decrease[fg];[bg][fg]overlay=(W-w)/2:(H-h)/2\" -c:v libx264 -crf 23 -c:a aac -map_metadata -1 {{out_video}}",
  "input_files": { "in_video": "{{ $json.videoUrl }}" },
  "output_files": { "out_video": "tiktok-blur-bg.mp4" }
}

This creates a blurred, zoomed-in version as background and overlays the original centered on top. More visually appealing than black bars.

Multi-account processing

For TikTok multi-account strategies, you need unique variations of each video. Each account should post a slightly different version.

Add a Code node before the submit step to generate variations:

const accounts = ["account1", "account2", "account3"];
const baseUrl = $input.first().json.videoUrl;

return accounts.map((account, i) => ({
  json: {
    videoUrl: baseUrl,
    accountName: account,
    cropOffset: i * 2,  // Slightly different crop per account
    crf: 22 + i  // Slightly different quality per account
  }
}));

Then use Split in Batches to process each variation:

{
  "ffmpeg_command": "-i {{in_video}} -vf \"crop=iw-{{ $json.cropOffset }}:ih-{{ $json.cropOffset }},scale=1080:1920:force_original_aspect_ratio=decrease,pad=1080:1920:(ow-iw)/2:(oh-ih)/2:black\" -c:v libx264 -crf {{ $json.crf }} -c:a aac -map_metadata -1 {{out_video}}",
  "input_files": { "in_video": "{{ $json.videoUrl }}" },
  "output_files": { "out_video": "tiktok_{{ $json.accountName }}.mp4" }
}

Each video is slightly different: different crop, different encoding quality. Different enough for TikTok's duplicate detection.

Compression for large files

If your source video is large, CRF 23 might produce a file over 287MB. Add aggressive compression:

{
  "ffmpeg_command": "-i {{in_video}} -vf \"scale=1080:1920:force_original_aspect_ratio=decrease,pad=1080:1920:(ow-iw)/2:(oh-ih)/2:black\" -c:v libx264 -crf 28 -preset slow -c:a aac -b:a 96k -map_metadata -1 {{out_video}}",
  "input_files": { "in_video": "{{ $json.videoUrl }}" },
  "output_files": { "out_video": "tiktok-compressed.mp4" }
}

CRF 28 with slow preset produces significantly smaller files while maintaining acceptable quality for TikTok's compression anyway.

Scheduling posts after processing

After the video is ready, trigger a scheduling workflow:

Option 1: n8n + TikTok API (requires developer account) Use HTTP Request node to POST to TikTok's Content Posting API.

Option 2: n8n + Buffer/Later Send the processed video URL to your social media scheduling tool via their API.

Option 3: n8n + Google Sheets Store the download URL in a spreadsheet. Manually schedule from there.

The processing workflow produces the URL. The scheduling workflow consumes it. Keep them separate for flexibility.

Error handling

TikTok-specific errors to handle:

  • File too large: If the output exceeds 287MB, re-process with higher CRF (28-32)

  • Wrong dimensions: Verify output dimensions match 1080x1920

  • No audio: TikTok requires audio. If source has no audio, add silence:

-i {{in_video}} -f lavfi -i anullsrc=r=44100:cl=stereo -c:v libx264 -crf 23 -c:a aac -shortest {{out_video}}

Get started

  1. Sign up at renderio.dev

  2. Build the workflow above in n8n

  3. Test with a horizontal video

  4. Watch it become a TikTok-ready 9:16 vertical

Automating TikTok video processing? The Growth plan at $29/mo covers 1,000 commands -- enough for most automation workflows. See the full n8n integration guide or get your API key to start building your workflow.