Giter VIP home page Giter VIP logo

video-downloader's Introduction

video-downloader

video-downloader is a simple script to download videos from YouTube and Facebook.

Getting started

In order to use the project, python3 and the libraries in requirements.txt are needed.

The requirements can be installed as follows:

pip install -r requirements.txt

Usage

Getting help

You can ask for help by running either of the following options:

python3 video_downloader.py -h
python3 video_downloader.py --help
usage: video_downloader.py [-h] [-o [OUTPUT]] [-r RESOLUTION] {fb,yt} url

Downloads videos from some platforms on the internet.

positional arguments:
  {fb,yt}               Selects the platform to download videos from.
  url                   The URL of the video to be downloaded.

optional arguments:
  -h, --help            show this help message and exit
  -o [OUTPUT], --output [OUTPUT]
                        Output file
  -r RESOLUTION, --resolution RESOLUTION
                        Quality of the video.

Default values

Every flag has a default value but the url.

  • The output file, if not given, will follow the following pattern: video_YYYY_MM_DD_mmmmmm (m stands for microseconds).
  • The resolution will always be the maximum available resolution for the given video.

YouTube

In order to download videos from YouTube, only the positional arguments are needed. The pytube library has been used to interact with this platform.

By default, the maximum quality is selected (or by setting max in resolution), but any resolution can be selected (e.g. 480p, 1080p). However, there might be issues with the codecs (both audio and video codecs are needed), and an error message will be printed if they are not available. Thus, it's recommended to select max (or don't select anything), since always selects the video of maximum resolution with both codecs available.

Examples (substitute <url> with the url of the video, and <output file> with the path and name to the desired file):

python3 video_downloader.py yt <url> -o <output file>
python3 video_downloader.py yt <url> -o <output file> -r max
python3 video_downloader.py yt <url> -o <output file> -r 720p

Facebook

Downloading videos from Facebook is similar to the YouTube approach. The difference here is the available quality options given in the resolution flag, only sd and hd (default choice) are possible.

Examples (substitute with the url of the video, and with the path and name to the desired file):

python3 video_downloader.py fb <url> -o <output file>
python3 video_downloader.py fb <url> -o <output file> -r hd

video-downloader's People

Contributors

iker-barriocanal avatar

Stargazers

 avatar

Watchers

 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.