Info about my editing bot for twitter (@editvideobot)

Follow @editvideobot

Yes, this edits both photos and videos (gifs are converted to videos then edited).

Coded in mainly Python using various libraries and ffmpeg, run off my laptop.


Inspired by @VideoEditBot on Twitter - However this is all my own original code - I've just taken the concept.


A bit of background....

Before Coronavirus and lockdown happened, I probably never would have done this. I didn't have the time or have a reason to do it, but during quarantine I just decided to pick it up. I've run servers in the past, but none as complicated as this one, and in terms of my complex programming knowledge, I probably couldn't even tell you what an API is (maybe exaggerating a bit, but you get the idea).

Around the same time, I became interested in a ton of different application's APIs, including Snapchat's (now shut down because it wasn't official), Cloudflare's and Twitter's. No other platform accepted bots like Twitter did, so I decided to give creating a bot of my own a go.

It wasn't a VideoEditBot straight away. At the very start, I just used my personal account (@pigeonburger) as my bot account. If you scroll down really far, you'll eventually find my first bot's Tweets. All it did was reply to a list of accounts whenever they tweeted with a random text phrase or image/gif.

To be honest, that got pretty boring after a while, so I switched to setting up a web and mail server (rip mail server 27/11/2020). That was this website (pigeonburger.xyz). I didn't really use it for much, and it looked very different to how it does now, but it was rly fun to set up. Basically at this point, I just put random stuff on it for me and my friends.

Around June/July (I think), the original VideoEditBot was born. This was maybe a month or two since I created my first bot (not exactly sure), but I just randomly decided to try and make my own VideoEditBot. The original code for it was used from the start of August 2020, to the 16th November 2020 (I've started keeping better records of what I've done now).

The old code was extremely inefficient - around 60,000 lines of code for every outcome (probably the worst code you'd ever see). I was at the start of my actual proper Python programming (which has dramatically improved now)

Anyway, around the 10th November 2020, the original VideoEditBot was suspended for some idiotic reason Twitter came up with, and I saw my bot gain a lot of users. I redesigned the bot's code, and here I am now.

I doubt my bot will even ever get 1000 followers, but an increase from 11 to 360 in less than 2 weeks is a win in my book.

Update 19th December 2020: Well, 22 days later and my bot is at 4250 followers! I have high hopes for this, as long as Twitter keep treating my account well and I don't get banned. I also made a backup account, in case it ever does. I think 10k followers is acheivable, but time will tell.


My computer specs:

This is my server

My program isn't very CPU intensive, processing the video itself takes less than 2 seconds, I used to upload to Imgur using their crappy API, which was really slow but now, since I have my own web server, I don't need to worry about this anymore. The bot should reply back to you within 10-20 seconds.



Here's a complete list of everything I used to make this:

Although eventually I'm probably gonna have to change a lot of what I use because Twitter is going to phase out the current API I'm using :(



Supported file types:

Here are the file types my bot supports (I have no idea why or where anyone would use any of the other ones but you never know):

Supported video types Supported photo types Unsupported formats
mp4, avi, mkv, webm, mov, hevc jpg, jpeg, png, heic, gif mpg, any audio file on it's own, apng, tiff, probably anything else not really sure. I don't even think Twitter itself even supports these but oh well just take note.

My bot will always convert the output file to an mp4, or for photos, as a jpg.









Follow @editvideobot