Skip to content

A twitter bot that posts a random frame every hour from a movie, in my case it used frames from the movie Whiplash (2014)

Notifications You must be signed in to change notification settings

Nachrj/whiplash-bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

whiplash-bot

I created a twitter bot that posts a random frame from a selected movie every 6 hour. In my case, it uses frames from the movie Whiplash (2014).

How to use

Setup

  1. Clone the repository
  2. Add to "./frames" all selected frames from the movie
  3. Create .env with credentials for Twitter development with the following format:
APPKEY="..."
APPSECRET="..."
ACCESSTOKEN="..."
ACCESSSECRET="..."
  1. Run to install dependencies:

npm install

  1. Run to start:

node index

Dependencies

Development

I'm writing a mini how-to if someone wants to do something similar with a favourite movie of theirs.

Add subtitles to movie (Optional)

  1. Get VLC, the movie's mp4 and subtitles.
  2. Test the subtitles timing with the movie by (in VLC) pressing Subtitle->Add Subtitle File and select the .srt of your choice. (If the timing isn't right you can use the keybinds G and H to increase or decrease subtitle's delay, I used this page to change the .srt file)
  3. Then on Media->Stream add movie and subtitles and Stream (You'll need to setup output).

Getting the movie's frames

  1. Now, for getting the frames, open VLC, go to Tools->Preferences select "All", click in Filters (Video) and select "Scene video filter". Then open the dropdown for Filter (Video), "Scene video filter" and config.
  2. Open the movie and let it run for the entire runtime.

WIP

I have a problem with the timestamp calculator for each frame, the movie standard fps is 24, by doing (frame number / 24) you get the timestamp in seconds. But testing it I noticed it is 60 seconds behind, so I added 60s in the calculation.

About

A twitter bot that posts a random frame every hour from a movie, in my case it used frames from the movie Whiplash (2014)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published