Giter Club home page Giter Club logo

chj85 / youtube-playlist-generator Goto Github PK

View Code? Open in Web Editor NEW
3.0 1.0 0.0 8 KB

Generate an M3U playlist using yt-dlp or youtube-dl, which retrieves video URLs from YouTube playlists, channels, and live streams. The script prompts the user to enter YouTube playlist IDs, channel IDs, and live stream URLs through a either a text-based version or a GUI version.

License: MIT License

Shell 100.00%
bash generator gui m3u playlist youtube youtube-dl yt-dlp zenity linux

youtube-playlist-generator's Introduction

YouTube Playlist Generator

These two Bash scripts generates an M3U playlist using yt-dlp or youtube-dl, which retrieves video URLs from YouTube playlists, channels, and live streams. The script prompts the user to enter YouTube playlist IDs, channel IDs, and live stream URLs through teither a text based version, or a GUI version created with Zenity. Additionally, the GUI version includes options to enable playlist shuffling and choose whether to add videos to an existing playlist or overwrite it.

You can add as many playlist IDs, Channels and livestreams as you want.

GUI version (ytpg-gui.sh)

Separate the Playlist IDs, Channels and Livestreams with a space. Once you provide the necessary input and clicks "Generate Playlist," the script fetches the video URLs using yt-dlp (optionally you can replace yt-dlp with youtube-dl) and stores them in an array. It then combines the video URLs into a single string and shuffles them if the shuffle option is enabled. The script creates a playlist file (either a new file or overwrites an existing one) and writes the shuffled video URLs to it in the M3U format.

Text-based version (ytpg.sh)

In the text version, separate them with double quotes and a space (Ex. "playlist1" "playlist2" "playlist3").
Shuffle mode is enabled by default. Comment it out if you don't want a shuffled playlist.

After the playlist is successfully built, a dialog message appears to notify the user. The script utilizes zenity for GUI elements and interaction.

By default, the playlist will be saved to $HOME/playlist.m3u.

youtube-playlist-generator's People

Contributors

chj85 avatar

Stargazers

 avatar  avatar  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.