• Stars
    star
    249
  • Rank 162,987 (Top 4 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created over 10 years ago
  • Updated over 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Automatically create an animated gif with the latest goal at the world cup

ReplayLastGoal

Automatically create and tweet a video with the latest goal at the world cup.

Notice: It is your responsiblity to make sure that you stay within the limits of "Fair Use". Laws might be different in your country. The author and contributors of this project decline all responsibility. For reference: Copyright Disclaimer Under Section 107 of the Copyright Act 1976, allowance is made for "fair use" for purposes such as criticism, comment, news reporting, teaching, scholarship, and research. Fair use is a use permitted by copyright statute that might otherwise be infringing. Non-profit, educational or personal use tips the balance in favor of fair use.

Try it!

Just follow @ReplayLastGoal on Twitter.

Webhooks

You can add webhooks to automatically receive a notification when a goal is scored along with the animated gif and a link to the video replay. We support classic webhooks, Hipchat and Slack. Go to http://ReplayLastGoal.com/hooks/add to configure them.

ReplayLastGoal notification in Slack

How does it work?

It connects to a video live stream (that you need to provide) and keeps a buffer of about one minute worth of video. When a given twitter account tweets (by default @GoalFlash), it uses the buffer to generate a video of the goal and then tweets it. Videos are saved in the videos/ directory.

Press & testimonials

Requirements

A live video stream

There are a few public television channels in Europe who are live streaming the world cup. The only caveat is that your server needs to be in that country (but it's not too complicated to work around it using the cloud.)

Live streaming works either with Flash which is hard to reverse engineer or with HTML5 for mobile devices. So open the web page with the live stream with Safari and change your user agent to the iPad and you will be able to get the HTML5 version of the live stream. Then you can inspect network traffic to identify the URL of the live stream. It should end with the extension .m3u8. Use that URL in settings.json.

Audio Video Converter

You need to have ffmpeg 2.2x installed on your machine. On a Mac, it's a piece of cake. Install brew and then do brew install ffmpeg and you are done. On Ubuntu, it's a pain. This bash script should help you.

Install

git clone https://github.com/xdamman/ReplayLastGoal.git
npm install

Edit settings.json and save it as settings.development.json (or settings.production.json for production environment as set by the NODE_ENV variable.)

You are now ready to start the application:

npm start

Like it? Love it?

Share the love by tweeting or favoriting this repo! Oh, and pull requests are more than welcome! :-)

Contributors

Special thanks to Benjamin Goering (@bengo) for his help.

TODO

(Pull requests welcome)

  • Better pin point when the goal happens in the 20s window to trim down the duration of the video and gif (we could use a VU meter to identify when the sound level peaks)
  • Support for multichannels when there is more than one match at once
  • Better test coverage
  • Interface to manage webhooks and allow anyone to add their own webhook
  • Hipchat Add On
  • Slack add on
  • Generate image to send with the tweet (finding the right one might be tricky)
  • Refactoring to start streaming the video of the goal as soon as we start recording
  • Automatically turn on/off the input stream when there is a match
  • Automatically create a video summary with all the goals after the game ends

More Repositories

1

selection-sharer

Medium like popover menu to share on Twitter or by email any text selected on the page
JavaScript
510
star
2

mediumexporter

Export your stories published on medium.com to markdown for easy import
JavaScript
234
star
3

js-line-wrap-detector

Detect where the text wraps in Javascript
JavaScript
44
star
4

TweetWall

iPad app #iosdevcamp
Objective-C
20
star
5

tipbox

Share a unique URL to get feedback & tips anonymously
JavaScript
20
star
6

readability-cli

Read any web page from the command line using readability.js
JavaScript
13
star
7

TypingMyFirstWords

iPad app for 2-3 year old kids to learn to type their first words.
JavaScript
8
star
8

tvpodcasts

RTBF 19h30 Video Podcast for iTunes
JavaScript
4
star
9

blogdown

A NodeJS blogging server that uses markdown files in a dedicated github repo
JavaScript
4
star
10

blog

Using github to manage all the content on xdamman.com
HTML
3
star
11

node-pastie

Wrapper to create new paste on http://pastie.org
JavaScript
3
star
12

NativeArticle

Twitter bot to tweet a screenshot of an article shared (to save bandwidth)
JavaScript
2
star
13

pourquellelistevoter

Pour quelle liste voter pour les Γ©lections communales 2018 en Belgique?
JavaScript
2
star
14

SavedYouAClick

Help save your followers a click by tweeting directly the right information or image
JavaScript
1
star
15

RightToBeUnforgotten

Any resemblance to any EU law is purely coincidental
JavaScript
1
star
16

drone-tracker

AR Drone 2.0 nodejs hackathon
JavaScript
1
star
17

TweetStorm

Get rid of the 140 characters limit on Twitter.com
JavaScript
1
star
18

regenjournal

Journaling for Regens
JavaScript
1
star
19

camelVoice

HackForEgypt project
1
star