An Android automation that bulk-resizes, crops, and pads videos to Threads-ready aspect ratios (1:1, 4:5, 9:16, 16:9) before posting or scheduling. It eliminates manual editing across devices by applying human-like workflows on real phones or emulators with proxy and multi-account support. The result: consistent, on-brand video outputs that upload cleanly to Instagram Threads at scale.
Created by Appilot, built to showcase our approach to Automation!
If you are looking for custom Threads Video Resizer Bot, you've just found your team — Let’s Chat.👆👆
This project automates the tedious workflow of preparing videos for Instagram Threads: detecting source dimensions, resizing/cropping, adding safe padding, re-encoding, and handing off to your posting flow. It removes repetitive mobile editing and inconsistent outputs between devices or editors. Teams gain repeatable quality, batch throughput, and production-grade logging while keeping operations on real Android devices.
- Automatically normalizes any input video to Threads-friendly formats with safe area guides to avoid UI overlays and crop issues.
- Uses device-side hardware acceleration and FFmpeg bindings for fast, consistent re-encodes.
- Runs across device farms (real & emulated) with per-account presets, proxies, and queue-based orchestration.
- Human-like touch/scroll/tap patterns and randomized delays reduce fingerprinting and keep sessions stable.
- Real Devices and Emulators: Operates on physical Android phones and emulators (Bluestacks/Nox) for realistic behavior and high compatibility with Threads.
- No-ADB Wireless Automation: Appilot’s wireless controller drives UI Automator/Accessibility flows without persistent ADB, minimizing detection vectors and cable hassles.
- Mimicking Human Behavior: Randomized dwell times, inertial scrolls, edge-case backtracks, and gesture variance tuned for mobile UX heuristics.
- Multiple Accounts Support: Profile-scoped presets, storage, and cooldown windows; isolated workspaces for cleaner cookies/session artifacts.
- Multi-Device Integration: Queue tasks across 10–1000 devices with parallel workers, retry budgets, and per-device health checks.
- Exponential Growth for Your Account: Faster content readiness means more frequent posts and better consistency—unlocking algorithmic reach.
- Premium Support: Priority onboarding, device-farm sizing help, and custom preset packs for niche content ratios.
- Auto Aspect Ratio & Safe Padding: Detects letterboxing needs, adds blur/solid padding, centers subject, and honors safe areas.
- Smart Presets for Threads: One-tap 1:1, 4:5, 9:16, 16:9; bitrate and CRF templates per channel/tier; watermark lanes optional.
- On-Device FFmpeg Acceleration: Hardware codec paths (when available) with fallback, two-pass encode, and audio stream normalization.
Additional Feature Set
| Feature | Description |
|---|---|
| Batch Queue Orchestrator | Ingests folders or URLs, chunks jobs, parallelizes by device capacity, and persists state for resumable runs. |
| Preset & Profile Manager | JSON/YAML presets per brand/account with versioned changes and rollback. |
| Safe Area Visual Guides | Overlay guides during preview to ensure captions/UI won’t cover key content on Threads. |
| Adaptive Bitrate Control | Targets size caps and network conditions; automatically re-tries with tiered settings. |
| Frame-Accurate Trimming | Optional pre-cut with start/end timecodes before resize, preserving audio sync. |
| Audit Logs & Artifacts | Stores input/output hashes, duration/size deltas, and thumbnails for QA and compliance. |
- Input or Trigger — Start from the Appilot dashboard: select source folder/ingest URL, choose Threads presets (e.g., 4:5 feed, 9:16 vertical), assign devices, and set scheduling options.
- Core Logic — Appilot drives the device/emulator via UI Automator/Accessibility to open the editor pipeline; device-side FFmpeg bindings perform crop/scale/pad; metadata is updated; optional watermark lane applied.
- Output or Action — The processed video is saved to device storage/cloud bucket and (optionally) handed off to your Threads posting/scheduler bot.
- Other functionalities — Automatic retries on codec errors, structured logging, per-device cooldowns, and parallel processing—configurable from the dashboard with alerting on failures.
Language: Kotlin, Java, Python, JavaScript
Frameworks: Appium, UI Automator, Espresso, Robot Framework, Cucumber
Tools: Appilot, Android Debug Bridge (ADB), Appium Inspector, Bluestacks, Nox Player, Scrcpy, Firebase Test Lab, MonkeyRunner, Accessibility
Infrastructure: Dockerized device farms, Cloud-based emulators, Proxy networks, Parallel Device Execution, Task Queues, Real device farm
threads-video-resizer-bot/
│
├── src/
│ ├── main.py
│ ├── automation/
│ │ ├── device_controller.py
│ │ ├── ffmpeg_pipeline.py
│ │ ├── presets.py
│ │ ├── scheduler.py
│ │ └── utils/
│ │ ├── logger.py
│ │ ├── safe_area.py
│ │ ├── storage.py
│ │ └── fingerprint.py
│ ├── android/
│ │ ├── accessibility_service/
│ │ │ ├── build.gradle
│ │ │ └── src/main/java/appilot/threadsresizer/Service.kt
│ │ └── uiautomator/
│ │ └── ResizerTest.java
│ └── workers/
│ ├── ingest_worker.py
│ ├── encode_worker.py
│ └── handoff_worker.py
│
├── config/
│ ├── presets.yaml
│ ├── devices.yaml
│ ├── scheduler.yaml
│ └── proxies.yaml
│
├── media/
│ ├── threads-video-resizer-bot-banner.png
│ └── samples/.keep
│
├── logs/
│ └── run.log
│
├── output/
│ ├── artifacts/
│ │ ├── thumbnails/
│ │ └── manifests/
│ └── results.json
│
├── docker/
│ ├── Dockerfile
│ └── docker-compose.yml
│
├── tests/
│ ├── test_ffmpeg_pipeline.py
│ └── test_safe_area.py
│
├── .env.example
├── requirements.txt
└── README.md
- Agencies use it to convert mixed-format client videos into Threads-ready outputs, so they can post consistently across accounts without manual edits.
- Creators use it to batch-prepare Shorts/Reels for Threads, so they can maintain daily posting cadences with minimal effort.
- Social Ops Teams use it to normalize UGC submissions, so they can avoid crop issues and protect brand typography within safe areas.
- Growth Marketers use it to A/B test aspect-ratio presets, so they can improve watch time and CTR on Threads.
How do I configure this for multiple accounts?
Create per-account profiles in config/presets.yaml with target ratios, bitrates, and watermarks. The scheduler assigns jobs by profile and applies device-level cooldowns.
Does it support proxy rotation or anti-detection?
Yes—set proxies in config/proxies.yaml. Device fingerprints are isolated, with randomized gesture timings and backoff windows to mimic human use.
Can I schedule it to run periodically?
Use scheduler.yaml to define cron-like windows, batch sizes, and max concurrency. The orchestrator will pick up new files from watched folders/buckets.
What about quality and file size limits?
Adaptive bitrate control targets your size threshold first, then re-tries with a lower tier if needed while preserving perceptual quality.
- Execution Speed: ~12–35s per 15s clip for crop/scale/pad + encode on mid-range devices; batch mode sustains 80–150 clips/hour per 10-device pod.
- Success Rate: 95% end-to-end success across heterogeneous inputs with automatic re-try tiers and fallback codecs.
- Scalability: Horizontally scales from 10 to 300–1000 Android devices with queue-based sharding and per-pod autoscaling.
- Resource Efficiency: Uses hardware decoders when available; stream-based IO avoids temp bloat; throttles to maintain device thermals.
- Error Handling: Structured logs, artifact manifests, screenshot-on-failure, exponential backoff, circuit breakers, and alert hooks (webhooks/Telegram).