Skip to content

This Python script calculates the total duration of a list of YouTube videos provided in a text file. It utilizes the pytube library to fetch the duration of each video and then sums them up to provide the total duration.

License

Notifications You must be signed in to change notification settings

fatihpurtas/YoutubeDurationCounter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Video Duration Calculator

Video Duration Calculator is a Python script that calculates the total duration of a list of YouTube videos provided in a text file. It utilizes the pytube library to fetch the duration of each video and then sums them up to provide the total duration.

Features

  • Video Duration Retrieval: Retrieves the duration of each YouTube video using the pytube library.
  • Total Duration Calculation: Calculates the total duration of all videos in the list.
  • Input from Text File: Accepts a list of YouTube video links from a text file.
  • Graphical User Interface (GUI): Provides a simple GUI for selecting the input file and displaying the result.
  • Error Handling: Handles errors gracefully and continues processing the remaining videos.

Usage

  1. Run the script (python video_duration_calculator.py).
  2. Click the "Select" button to choose a text file containing the list of YouTube video links.
  3. Click the "Process" button to calculate the total duration.
  4. The total video time will be displayed in the GUI.

Requirements

  • Python 3.x
  • pytube library

Example

Suppose the input text file (video_links.txt) contains the following list of YouTube video links:

        
https://www.youtube.com/watch?v=dQw4w9WgXcQ
https://www.youtube.com/watch?v=3GwjfUFyY6M
...
        
    

After running the script and selecting video_links.txt, the GUI will display the total duration of all videos combined.

About

This Python script calculates the total duration of a list of YouTube videos provided in a text file. It utilizes the pytube library to fetch the duration of each video and then sums them up to provide the total duration.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages