Git Product home page Git Product logo

cliptalk's Introduction

ClipTalk

forthebadge made-with-go

Build Status License GitHub stars

简体中文版

ClipTalk is a tool designed for removing watermarks from TikTok videos and converting video content into text. It is now compatible with TikTok.

Table of Contents

Installation

Clone the Repository

git clone https://github.com/disingn/cliptalk.git

Build the Application

Note: I assume that you have already installed ffmpeg and the go environment locally or on your server. If these are not installed, please install them first!!! Otherwise, it won't run.

cd cliptalk
export GOOS=linux
export GOARCH=amd64
go build -o cliptalk

Configuration File

Copy the example configuration file and modify it:

cp config.yaml.example config.yaml

Edit the config.yaml file and fill in the necessary configuration information:

App:
  # Gemini's apikey
  GeminiKey:
    - key1
    - key2
  # Custom Gemini URL, you can use https://zhile.io/2023/12/24/gemini-pro-proxy.html#more-587 as a proxy
  # PS: Do not include a trailing slash in the proxy address
  # If you configure a GeminiUrl, you do not need to configure a Proxy
  GeminiUrl: https://gemini.baipiao.io
  # Browser UserAgent for parsing TikTok links
  UserAgents:
    - Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.6 Safari/605.2.15
    - Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.104 Safari/537.66
  # Note: Do not include a trailing slash in the OpenaiUrl. You can also change it to your own reverse proxy address or a compatible OpenAI address
  OpenaiUrl: https://api.openai.com
  OpenaiKey:
    - key1
    - key2
# Server Configuration
Sever:
  Port: 3100
  Host: localhost
  # Maximum file size for uploads in MB, default is 10MB, do not write 0
  MaxFileSize: 10
# # Proxy Configuration, use a proxy (http|https|socks5://ip:port)
# Proxy:
#     Protocol: socks5://192.168.1.10:3200

# Proxy Configuration, no proxy 
Proxy:
  Protocol: 

If you find the configuration process cumbersome, you can directly use the example configuration file.

Start the Application

./cliptalk

Configure Nginx Reverse Proxy

Please refer to the official Nginx documentation for configuration or use tools like Baota or 1panel.

Usage

API Endpoints

TikTok Watermark Removal API

Method: POST Endpoint: /remove

Example:

curl --location --request POST 'localhost:3100/remove' \
--header 'Content-Type: application/json' \
--data-raw '{
    "url":"https://v.douyin.com/iLYNG8vA/"
}'

Returned JSON parameters:

{
  "finalUrl": "Watermark-free video link",
  "message": "success",
  "title": "Video title"
}

TikTok Video to Text API

Method: POST Endpoint: /video

Example:

curl --location --request POST 'localhost:3100/video' \
--header 'Content-Type: application/json' \
--data-raw '{
    "url":"https://v.douyin.com/iLYnjXbA/",
    "model":"openai" // The 'model' here can be 'openai' or 'gemini'
}'

Returned JSON parameters:

{
  "finalUrl": "Watermark-free video link",
  "message": "success",
  "title": "Video title",
  "content": "Video text"
}

Local Video to Text API

Method: POST Endpoint: /video-file

Example:

curl --location --request POST 'localhost:3100/video-file' \
--form 'file=@"/test.mp4"' \
--form 'model="openai"'

Returned JSON parameters:

{
  "content": "Video text"
}

Public Testing Interfaces:

Please note that the key must correspond to the selected model's API key, otherwise an error will occur. For the openai model, the default interface is the official OpenAI API: https://api.openai.com, so please use the official API key for the openai model.

TikTok Video Watermark Removal Interface

Request Method: POST Request URL: /remove

Example:

curl --location --request POST 'https://gpts.nbai.chat/remove' \
--header 'Content-Type: application/json' \
--data-raw '{
    "url":"https://v.douyin.com/iLYNG8vA/"
}'

Returned JSON Parameters:

{
  "finalUrl": "Link to the video without watermark",
  "message": "success",
  "title": "Video title"
}

TikTok Video to Text Interface

Request Method: POST Request URL: /video

Example:

curl --location --request POST 'https://gpts.nbai.chat/video' \
--header 'Authorization: key1,key2' \
--header 'Content-Type: application/json' \
--data-raw '{
    "url":"https://v.douyin.com/iLYnjXbA/",
    "model":"gemini"
}'

Returned JSON Parameters:

{
  "finalUrl": "Link to the video without watermark",
  "message": "success",
  "title": "Video title",
  "content": "Text from the video"
}

Local Video to Text Interface

Request Method: POST Request URL: /video-file

Example:

curl --location --request POST 'https://gpts.nbai.chat/video-file' \
--header 'Authorization: key1,key2' \
--form 'file=@"/path/to/test.mp4"' \
--form 'model="openai"'

Returned JSON Parameters:

{
  "content": "Text from the video"
}

Docker Deployment

Prerequisites

Make sure Docker and Docker Compose are installed.

Deployment

cd cliptalk
docker-compose up -d

Local Development

Some experience with writing Go code is required

Required Environment (assuming you already have it)

  • Install Go
  • Install ffmpeg

Development

cd cliptalk
go mod tidy
go run main.go

The code directory is also written in a simple and clear manner, no further explanation is needed.

Miscellaneous

For further assistance or if you have any questions, feel free to join our Telegram group.

cliptalk

Contact Us

If you have any questions or need support, please contact us through the following means:

Contact Us!

cliptalk's People

Contributors

disingn avatar corcton avatar mingyue0094 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.