Giter VIP home page Giter VIP logo

video-encoder-bot-updated's Introduction

Video Encoder Bot

A telegram bot to convert and compress videos into x265/x264 format via ffmpeg.

Configuration

Basics

Authorization Every Var can have space as seperator for multiple user/chat.

  • OWNER_ID - A user can have full access to bot throught this var.
  • SUDO_USERS - Chat identifier of the sudo user.
  • EVERYONE_CHATS - Chat identifier of the user who can't touch bot code.

Log Channel

  • LOG_CHANNEL - for bot logs (user and group id will also work!)

Database

  • SESSION_NAME
  • MONGO_URI - A mongo db url for settings, addchat etc.

Google Drive

  • INDEX_URL - Index url for drive uploads
  • DRIVE_DIR - Google Drive folder id where uploads will be placed.

Optional

  • DOWNLOAD_DIR - (Optional) Temporary download directory to keep downloaded files.
  • ENCODE_DIR - (Optional) Temporary encode directory to keep encoded files.

Configuring Encoding Format

To change the ffmpeg profile edit them in ffmpeg.py

Installing Requirements

Install the required Python Modules and Latest FFMPEG in your machine.

apt update && apt-get install software-properties-common -y && apt-get update && add-apt-repository -y ppa:savoury1/ffmpeg4 && apt-get install -y ffmpeg && add-apt-repository -y ppa:savoury1/ffmpeg5 && apt-get install -y ffmpeg && pip3 install -r requirements.txt

Deployment

With python 3.9.2 or later. first make repo folder workdir then

apt update && apt install -y --no-install-recommends git wget aria2 curl busybox python3 python3-pip p7zip-full p7zip-rar unzip mkvtoolnix ffmpeg
pip3 install --no-cache-dir -r requirements.txt
chmod +x extract
bash run.sh

For Drive

Place token.pickle and credentials.json on workdir

Deployment via Docker

Install docker

sudo apt install apt-transport-https ca-certificates curl software-properties-common -y && curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - && sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic nightly" && apt-cache policy docker-ce && sudo apt install docker-ce -y

Start docker build

  • restart always
  • docker name is encoder
sudo docker build . --no-cache -t encoder && sudo docker run --restart always --name encoder encoder

Stop Docker for Major Change

  • this only need if update docker file or requirements only or else use update in bot
sudo docker stop encoder && sudo docker rm encoder

Credits

Copyright & License

video-encoder-bot-updated's People

Contributors

weebzoneindia avatar dakshy 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.