Skip to content

nedsion/capcut-auto

Repository files navigation

CapCut Automation Tool

A PyQt5-based desktop application for automating CapCut video creation and TikTok sharing across multiple Android devices using ADB and UI Automator.

Features

  • 🎬 Automated Video Creation: Create multiple videos from templates automatically
  • 📱 Multi-Device Support: Manage and control multiple Android devices simultaneously
  • 🔄 TikTok Integration: Automatically share created videos to TikTok
  • 🌐 Proxy Support: Use proxies for each device connection
  • 🤖 Captcha Solving: Integrated AchiCaptcha service for automatic captcha resolution
  • 📊 Real-time Monitoring: Track device status and logs in a GUI interface
  • ⚙️ Configurable Settings: JSON-based configuration for easy customization

Prerequisites

  • Windows OS with PowerShell
  • Python 3.7+
  • ADB (Android Debug Bridge) installed and accessible
  • Android devices with USB debugging enabled
  • CapCut app installed on target devices
  • TikTok app installed on target devices (if sharing videos)

Installation

  1. Clone the repository:
git clone <repository-url>
cd capcut
  1. Install required dependencies:
pip install -r requirements.txt
  1. Ensure ADB is properly configured and devices are connected:
adb devices

Configuration

config.json

Edit config.json to customize the application behavior:

{
    "NUM_OF_VIDEO_CREATE_PER_ACCOUNT": 10,
    "SHARE_VIDEO_TO_TIKTOK": true,
    "SPLIT_SYMBOL": "|",
    "LINK_TEMPLATE_PATH": "link_template.txt",
    "PROXY_FILE_PATH": "proxy.txt",
    "TIKTOK_ACCOUNT_PATH": "account.txt",
    "ACHICAPTCHA_KEY": "your_key_here"
}

Configuration Options:

  • NUM_OF_VIDEO_CREATE_PER_ACCOUNT: Number of videos to create per TikTok account
  • SHARE_VIDEO_TO_TIKTOK: Enable/disable automatic sharing to TikTok
  • SPLIT_SYMBOL: Delimiter for parsing account credentials
  • LINK_TEMPLATE_PATH: Path to template links file
  • PROXY_FILE_PATH: Path to proxy list file
  • TIKTOK_ACCOUNT_PATH: Path to TikTok accounts file
  • ACHICAPTCHA_KEY: Your AchiCaptcha API key for captcha solving

Input Files

account.txt

TikTok account credentials (one per line):

username|password
username2|password2

proxy.txt

Proxy server list (one per line):

http://proxy1:port
http://proxy2:port
socks5://proxy3:port

link_template.txt

CapCut template links (one per line):

https://capcut-yt.onelink.me/ch/template1
https://capcut-yt.onelink.me/ch/template2

Usage

Starting the Application

Run the main application:

python main.py

GUI Features

  1. Device List: View all connected Android devices
  2. Account Management: Load and manage TikTok accounts
  3. Proxy Configuration: Assign proxies to devices
  4. Template Selection: Choose CapCut templates for video creation
  5. Start/Stop Controls: Begin or halt automation process
  6. Real-time Logs: Monitor device activities and status updates

Workflow

  1. Connect Android devices via ADB
  2. Load TikTok accounts from account.txt
  3. Configure proxies in proxy.txt
  4. Add CapCut template links to link_template.txt
  5. Click "Start" to begin automation
  6. Monitor progress in the GUI

Project Structure

capcut/
├── main.py                  # Main GUI application
├── worker.py                # Worker thread for device automation
├── helper.py                # CapCut automation helper functions
├── config.py                # Configuration constants
├── xpaths.py                # UI element XPath selectors
├── achicaptcha_helper.py    # Captcha solving integration
├── log_updater.py           # Log and table update handlers
├── config.json              # User configuration
├── account.txt              # TikTok accounts
├── proxy.txt                # Proxy list
├── link_template.txt        # Template links
├── requirements.txt         # Python dependencies
├── temp/                    # Temporary files
└── __pycache__/             # Python cache

Dependencies

Key libraries used:

  • PyQt5: GUI framework
  • uiautomator2: Android UI automation
  • adbutils: ADB wrapper
  • requests: HTTP client
  • Pillow: Image processing
  • beautifulsoup4: HTML parsing

See requirements.txt for complete list.

How It Works

  1. Device Connection: Uses ADB to connect to Android devices
  2. UI Automation: uiautomator2 controls app interfaces
  3. Template Processing: Opens CapCut with template links
  4. Video Creation: Automates the video editing process
  5. Captcha Handling: AchiCaptcha API solves challenges automatically
  6. TikTok Sharing: Logs into TikTok and uploads videos
  7. Multi-threading: Each device runs on a separate worker thread

Troubleshooting

Common Issues

ADB not found:

  • Ensure ADB is installed and in system PATH
  • Verify with adb version

Devices not detected:

  • Enable USB debugging on Android devices
  • Run adb devices to verify connection
  • Check USB cables and ports

App crashes:

  • Check logs in the GUI console
  • Verify all input files are properly formatted
  • Ensure CapCut and TikTok apps are installed

Captcha solving fails:

  • Verify AchiCaptcha API key is valid
  • Check internet connection
  • Review captcha service status

Safety & Ethics

⚠️ Important Notes:

  • This tool is for educational purposes
  • Respect TikTok's Terms of Service
  • Use responsibly and ethically
  • Avoid spam or abusive behavior
  • Be aware of rate limits and account restrictions

License

[Specify your license here]

Support

For issues, questions, or contributions, please [contact information or issue tracker].

Acknowledgments

  • uiautomator2 for Android automation
  • AchiCaptcha for captcha solving services
  • PyQt5 for the GUI framework

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages