Git Product home page Git Product logo

youtube-video-maker's Introduction

YouTube Video Maker

A tool for automatic video creation and uploading on YouTube.

Result:

Getting Started

These instructions will show you how this tool works and how to have the project up and running on your local machine.

Prerequisites

FFmpeg (version used to build this tool: 4.1.1-1)

$ sudo apt-get install ffmpeg   # on Debian based systems
$ sudo yum install ffmpeg       # on Red Hat based systems

Python libraries:

$ sudo pip3 install google_images_download      # 2.5.0
$ sudo pip3 install wikipedia                   # 1.4.0
$ sudo pip3 install nltk                        # 3.4
$ sudo pip3 install watson_developer_cloud      # 2.8.0
$ sudo pip3 install google-api-python-client    # 1.7.8
$ sudo pip3 install oauth2client                # 4.1.3

You will need to use the NLTK Downloader to obtain punkt:

$ python3
>>> import nltk
>>> nltk.download("punkt")
>>> exit()

Download this repository:

$ git clone https://github.com/crhenr/youtube-video-maker.git

Add your API keys

You will need to put your Watson API keys in the searchrobot.py file:

...
iam_apikey = "YOUR_API_KEY_HERE",
url = "YOUR_URL_HERE"
...

And your Google API keys in the clients_secret.json file:

...
"client_id": "YOUR_CLIENT_ID_HERE",
"client_secret": "YOUR_CLIENT_SECRET_HERE",
...

Run the main file

After completing all the settings, just run the main file:

$ cd youtube-video-maker/src
$ python3 yvm.py

How it works?

The program behaves as follows:

    1. Get the Wikipedia search term and the prefix;
    1. Get the first sentences from the Wikipedia summary which corresponds to the search term;
    1. Remove unnecessary information;
    1. Send each sentence to Watson to get the corresponding keywords;
    1. Download some images from Google Images based on the keywords;
    1. Rename and convert the images to JPG;
    1. Make the video, add the sentences as subtitles and add a music;
    1. Send the final video to YouTube with title, description and tags.

NOTE: All the files (images, videos and subtitles) are saved in the user's folder, in a directory with the search term name.

Example: final_video.mp4

Bugs to fix:

  • Get better images;
  • Correct the error that causes the fifth subtitle to be skipped.

Other information

Project inspired by video-maker, by filipedeschamps

Music extracted from: https://www.youtube.com/watch?v=LeV4u5Y-3ac

Original video upload code: https://developers.google.com/youtube/v3/guides/uploading_a_video?hl=en

youtube-video-maker's People

Contributors

cristianzsh avatar sxigames avatar

Watchers

James Cloos 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.