Giter VIP home page Giter VIP logo

vogon's Introduction

Vogon

Vogon combines a video creative, a data table(Feed) and a layout specification, generating a copy of the video creative combined with each line of the data table according to the layout specification.

The data can contain text, images and videos. The specification determines the timing, position and font definitions for each piece of text, video and image, referencing data fields through their names. Fixed text can also be used in the layout specification.

The generated videos are (optionally) uploaded to a Youtube channel, and a Google Ads Campaign specification file is generated to be imported in Google Ads for Video, creating keyword/audience/interest/geo-targeted campaigns for each of the videos.

This is not an official Google product.

This tutorial will help you get Vogon up and running on your own infrastructure.

It goes as follows:

  • 1 - Installing the Solution
  • 2 - Accessing the Web-App
  • 3 - User Manual
  • 4 - Frequently Asked Questions (FAQ)

1 - Installing the Solution

We have main steps here:

  1. Install Vogon
  2. Get APIs Access

Installation should cover following packages:

  • Install ffmpeg and imagemagick
  • Install GIT
  • Install Python3 and pip3
  • Install Python libs with pip
    • google-api-python-client
    • oauth2client
    • bottle
    • http.client
    • httplib2
  • Download Vogon codeAfter that

APIS should be:

  • YouTube Data API V3
  • Google SHEETS

1.1 - Installing Vogon

We got two flavors here:

  • Linux (Debian/Ubuntu)
  • Mac OS X

But have fun installing where ever you may seen fit :)

1.1.1 - Linux install (Debian/Ubuntu)

Depending on the distro, the set of commands to install all required dependencies shall look like this:

# install  ffmpeg * imagemagik
sudo apt-get install ffmpeg;
sudo apt-get install imagemagick;

# install GIT
sudo apt-get install git;

# install python3 and pip3
sudo apt-get -y install python3-pip;

# install python libs
pip3 install --upgrade google-api-python-client;
pip3 install --upgrade oauth2client;
pip3 install --upgrade bottle;
pip3 install --upgrade retry;
pip3 install --upgrade http.client;
pip3 install --upgrade httplib2;

# Download Vogon code
cd {YOUR_VOGON_APP_DIR};
git clone https://github.com/google/vogon.git

1.1.2 - Mac OS X Install

Depending on the OS X version, the set of commands to install all required dependencies shall look like this:

# install home brew
xcode-select --install
sudo easy_install pip
sudo pip install --upgrade pip
ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"

# install  ffmpeg * imagemagik
brew install ffmpeg;
brew install imagemagick;

# install GIT
brew install git;

# install python3 and pip3
brew install python
brew install python3

# install python libs
pip3 install --upgrade google-api-python-client;
pip3 install --upgrade oauth2client;
pip3 install --upgrade bottle;
pip3 install --upgrade retry;
pip3 install --upgrade http.client;
pip3 install --upgrade httplib2;

# Download Vogon code
cd {YOUR_VOGON_APP_DIR};
git clone https://github.com/google/vogon.git

1.2 - Get API Access

Vogon uses two main APIs to run smoothly:

  • YouTube API: upload generated videos to YouTube.
  • Google Sheets: Manipulate Vogon on a web interface.

1.2.1 - YouTube DATA V3 API

This API is used to upload Videos generated by Vogon to Youtube, making it possible to run ads on them.

  1. Enable YouTube DATA V3 API API 0. Go to the YT data API Console and enable the api. 0. Visit the Enabled APIs page. In the list of APIs, make sure the status is ON for the YouTube Data API v3.
  2. Create a "SERVER client secret" create oAuth client type OTHER
  3. Download "SERVER client secret" json file
  4. Move downloaded file to app credentials folder as "webserver_client_secret.json".
  5. If you intend to upload more than 3 videos a day to YouTube, you should request more quota for YouTube API v3. Each Vogon upload costs around 1600 quotas, as fo data of publication of this readme file.

1.2.1 - Google Sheets API

This API is used to read and update Vogon feed.

  1. Enable Google Sheets API 0. Go to the Sheets API Console and enable the api. 0. Visit the Enabled APIs page. In the list of APIs, make sure the status is ON for the Sheets API.
  2. Create an "WEB APPLICATION secret": create oAuth client of type WEB_APPLICATION
  3. Download "WEB_APPLICATION client" json file
  4. Move downloaded file to app credentials folder as "oauth_2_client_secret.json"

1.2.3 - When you are done...

Your app credentials folder should look something like this

  • .git
  • base_project
    • ...
  • credentials
    • .keep
    • webserver_client_secret.json
    • oauth_2_client_secret.json
  • ...

2 - Accessing the Web-App

  • Start the web app (Make sure port 8080 is free)
cd {YOUR_VOGON_APP_DIR};
python3 server.py --debug

3 - User Manual

Check User Manual PDF :)

4 - FAQ

  1. What image formats are accepted?

In a nutshell: jpg, gif & png. Animated or not, with transparent background or not.

  1. Does Vogon accept animated gifs?

Yes! you have to set the animated gif overlay FADE-IN and FADE-OUT to zero "0" so that Vogon can understand that your gif might be animated.

  1. Does Vogon accepts images with transparent background/ alpha channel?

Yes. Just add them as any other image.

  1. Does Vogon accepts different audio tracks for each variation?

Kinda... You can add the base video with a MUTED soundtrack(it has to have an audio track) and add other video overlays with the audio track you want for each variation.

  1. Can i put an image or a video on top of a text overlay?

Nope... Text overlays always stay on top of image or video overlays.

  1. Docker ascii erros? Remeber to set ENV LANG C.UTF-8 on your docker file ;)

  2. Imagemagick erros(convert command pointing out erros on your logs)? Try one of the following:

  • APPROACH 1: Try changing imagemagick file policy:
    • Open image magic policy xml
      cd /etc/ImageMagick-6 #might vary a little depending on ImageMagick version)
      sudo nano policy.xml
      • comment line containing the none rights to pattern @*. Should be something like this:
        • From <policy domain="path" rights="none" pattern="@*" />
        • To: ```
  • APPROACH 2: install libfreetype and imagemagick straight from apt:
    sudo apt-get install libfreetype6;
    sudo apt-get install imagemagick;
  • APPROACH 3: Install o imagemagick from SOURCE. with libfreetype.
    • install lib libfreetype, simi;ar to following. find right one for your linnux distro: sudo apt-get install libfreetype6
    • remove imagemagick from your system (if last install was FROM SOURCE, remmber to:
      cd <imagemagick/install/dir>
      make uninstall && make distclean
    • download and install imagemagick from source

vogon's People

Contributors

cbreuel avatar hiroferreira avatar mtborges avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vogon's Issues

Output video quality

All the videos exported are in low res. I had to change the bitrate to fix that.

Perhaps adding an advanced settings on "Video Config" may help users to handle that problem. it can also be used to change other attributes like muted or not.

Getting "Error 4; details: 500: Internal Server Error" after following instructions

Hi. We're testing out Vogon on a fresh installation of the latest version of Ubuntu, 19.10, updated to the latest patches/files.

We've followed all the instructions in the guide on this Github project's front page, and we're getting the following error when we try to "Save & generate a preview for row" or "Save & generate all video variations" in the "Video config" tab:

"Error 4; details: 500: Internal Server Error"

The Google sheet is properly linked, being an upload of feed.csv from the base_project folder.

These are the logs on terminal:

Traceback (most recent call last):
  File "/home/ubuntu/vogon_app/vogon/third_party/bottle/bottle.py", line 862, in _handle
    return route.call(**args)
  File "/home/ubuntu/vogon_app/vogon/third_party/bottle/bottle.py", line 1729, in wrapper
    rv = callback(*a, **ka)
  File "server.py", line 129, in generate_preview
    project_dir=project_folder)
  File "/home/ubuntu/vogon_app/vogon/vogon.py", line 190, in generate_preview
    project_dir)
  File "/home/ubuntu/vogon_app/vogon/vogon.py", line 198, in generate_video
    complex_filters, txt_input_files = filter_strings(image_overlays, text_overlays)
  File "/home/ubuntu/vogon_app/vogon/vogon.py", line 254, in filter_strings
    output_stream)
  File "/home/ubuntu/vogon_app/vogon/vogon.py", line 526, in text_filter
    is_cropped_text)
  File "/home/ubuntu/vogon_app/vogon/vogon.py", line 603, in write_temp_image
    rs = subprocess.check_output(' '.join(args), stderr=subprocess.STDOUT, shell=True)
  File "/usr/lib/python3.7/subprocess.py", line 411, in check_output
    **kwargs).stdout
  File "/usr/lib/python3.7/subprocess.py", line 512, in run
    output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command 'convert -background transparent -colorspace sRGB -font '/home/ubuntu/vogon_app/vogon/projects/hiro/assets/Rye-Regular.ttf' -pointsize 88.0 -fill '#0FAAF0' label:@/tmp/vogon_xdba7yar.txt /tmp/vogon_q3yjlyh0.png' returned non-zero exit status 1.
127.0.0.1 - - [21/Apr/2020 01:47:28] "GET /api/projects/TestProject1/preview/row/1?0.986307353121652 HTTP/1.1" 500 2754```

Any clues on what to do?

confirmation dialog when click on remove uploaded videos from youtube

I was working on the other window and pressed TAB then SPACE, but the Vogon window was focused, not the other window, so I accidentally removed all the videos from youtube.

I figured it out hours later, when I was on Video Config section and did the same thing, so it started generate all the videos.

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.