Code Monkey home page Code Monkey logo

yt_downloader's Introduction

Dependencies

This program is based on :

  • PyTube (Downloading YouTube videos)
  • FFmpeg (Combining video and audio files, converting audio files to .mp3 and video files to .mp4)

Getting Started

  1. Download and install FFmpeg on your computer and make sure to add it to your system's PATH variable
  2. Install pytube using the following command :
python -m pip install --upgrade pytube

Sometimes, the pypi release becomes slightly outdated. So you can install pytube from the source using this command :

python -m pip install git+https://github.com/pytube/pytube

Usage

  1. Run the main.py file.
  2. Type the url of the video/playlist.
  3. Type V or v to for MP4 video format, and A or a for MP3 audio format.
  4. Wait for the video(s) to get loaded.
  5. If you're downloading a single video in MP4 mode, choose from the available resolutions (e.g. 1080p). Else, your video will start downloading automatically.
  6. Wait for the program to finish working, then hit Enter to exit.
  7. Your downloaded files are within the same directory the main.py file is currently located.

yt_downloader's People

Contributors

itsachrafmansari avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

doctorvargaz

yt_downloader's Issues

"Protocol not found" error

Hi! I'm encountering this error when I'm downloading this video. I still get a .webm file, but there is no sound in it.

[Menna@linux Downloads]$ python main.py
What yo want to download ? [v] for video and [p] for playlist : v
______________________________________________________________________
In what format you want to download it ? [v] for video and [a] for audio : v
______________________________________________________________________
Write the link : youtube.com/watch?v=gqMxf52CCmk
______________________________________________________________________
Loading, please wait...
______________________________________________________________________
Here's the available resolutions :

144p
240p
360p
480p
720p
1080p
1440p
2160p
Choose a reso [e.g. 1440]: 1080p
Video titled [โ„๏ธ๐Ÿ‡ฌ๐Ÿ‡ง London Snow Day ๐Ÿ‡ฌ๐Ÿ‡งโ„๏ธ] started downloading
ffmpeg version n4.3.1 Copyright (c) 2000-2020 the FFmpeg developers
  built with gcc 10.2.0 (GCC)
  configuration: --prefix=/usr --disable-debug --disable-static --disable-stripping --enable-amf --enable-avisynth --enable-cuda-llvm --enable-lto --enable-fontconfig --enable-gmp --enable-gnutls --enable-gpl --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libdav1d --enable-libdrm --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libiec61883 --enable-libjack --enable-libmfx --enable-libmodplug --enable-libmp3lame --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librav1e --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libtheora --enable-libv4l2 --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxcb --enable-libxml2 --enable-libxvid --enable-nvdec --enable-nvenc --enable-shared --enable-version3
  libavutil      56. 51.100 / 56. 51.100
  libavcodec     58. 91.100 / 58. 91.100
  libavformat    58. 45.100 / 58. 45.100
  libavdevice    58. 10.100 / 58. 10.100
  libavfilter     7. 85.100 /  7. 85.100
  libswscale      5.  7.100 /  5.  7.100
  libswresample   3.  7.100 /  3.  7.100
  libpostproc    55.  7.100 / 55.  7.100
C:\Users\Menna\Downloads/โ„๏ธ๐Ÿ‡ฌ๐Ÿ‡ง London Snow Day ๐Ÿ‡ฌ๐Ÿ‡งโ„๏ธ.mp4: Protocol not found
Did you mean file:C:\Users\Menna\Downloads/โ„๏ธ๐Ÿ‡ฌ๐Ÿ‡ง London Snow Day ๐Ÿ‡ฌ๐Ÿ‡งโ„๏ธ.mp4?
Traceback (most recent call last):
  File "/home/Menna/Downloads/main.py", line 156, in <module>
    dl_a_vid(video)
  File "/home/Menna/Downloads/main.py", line 91, in dl_a_vid
    ffmpeg.output(audio_stream, video_stream, final_file).run()
  File "/home/Menna/.local/lib/python3.9/site-packages/ffmpeg/_run.py", line 325, in run
    raise Error('ffmpeg', out, err)
ffmpeg._run.Error: ffmpeg error (see stderr output for detail)

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.