Giter VIP home page Giter VIP logo

yt_downloader_gui's Introduction

YT Downloader

Techie Stack 💻:

Status : Blocked

TODO: Put the current gui of the application here

Objectives with this side project 🎯

  • Learning about the integration of libraries (Pytube & Tkinter)
  • Learning how library works (Pytube)
  • Learning about GUIs
  • Learning how Asynchrony works in Python
  • Learning about threading module
  • Learning good practices (PEP8 - Style Guide for Python Code)
  • Reading libraries documentation (yep, I'm not hiding gurl)

Why it was blocked? ⛔

The main reason is because Pytube is an obsolete library (not updates since 2021) Every time YouTube updates its API, things break (logically). One day it works fine, the next it doesn't

What has been the biggest challenge? 🗿

Boxing against Pytube ...

clideo_editor_3b3d8be796cb4196ad87cbec8cfdbaab

[Context]

I wanted the user could a choose a video resolution, the thing is, the Progressive streams are video-audio joined but never have the highest resolution (720p instead 1080p), so I had to work with DASH (separate video and audio).

photo_2024-07-16_21-40-23

Downloading the video and audio per separate, is no problem because then they can be merged with a module called ffmpeg.

[Status of my app on that point]

I had 2 threads :

  1. To download the stream itself
  2. To update the progress bar as the stream download progresses

That worked well 👍

[THE PROBLEM]

image

Pytube is not «thread-safe», because of this, it would not be able to make a third thread which unloads a second stream in parallel to the other 2.

What have you learned? 💡

  • How to design and set up an GUI (Tkinter)
  • How streams works
  • Difference between Progressive vs DASH (Dynamic Adaptive Streaming over HTTP)
  • Threading and Asynchronous process (well ... something ... around 1%, I hate it)
  • Events
  • Buffering
  • Lambdas function
  • How the progress bar works and synchronizes with a downloading stream

Next steps or ideas 🚀

  1. Find alternatives to Pytube (yt-dlp is popular, but its api ... no)
  2. Choose the directory where to save the content
  3. Download only audio from videos
  4. Download playlists

yt_downloader_gui's People

Contributors

thaishdz avatar

Stargazers

Gabs García 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.