Code Monkey home page Code Monkey logo

m3u-from-youtube's Introduction

m3u-from-Youtube

Bash script to create m3u playlists from Youtube playlists or Youtube channels.
also works for the 'Mix - Subject Matter' generated by Youtube.
This allows you to record a playlist to a text file, to be inspected later at your leisure.

Requires youtube-dl

Usage: m3ufromyt ./out.m3u

Create a nice m3u file from an youtube url.
a SINGLE youtube url will be prompted for..
please don't redirect output.
you should enter a youtube url at the prompt.
Youtube urls to a playlist, or to channel/videos have been tested
this script is slow on big channels.  about 1000 videos per hour
option -r allows you to reverse the .m3u playlist
option -q allows you to make this program quiet

All .m3u files output will have these features:

For each video, an INFO line containing duration, date (U.S. order), and title of the youtube video.
For each video, location of the content (as a url like http://www.youtube.com/watch?v=KViumtPd5RE ) 

What this script doesn't do is download videos, or give an .mp4 link to content like youtube-dl --get-url

I've mucked around with only creating output for new videos, while halting when older content is reached. It works fine, but it's not in a shape to publish at this time.

requires Bash, etc. should run on any Linux.

An alternative solution

pukkandan on reddit points out that

yt-dlp -O "#EXTINF:%(duration)s,%(upload_date>%d/%m/%Y)s %(title)s" -O webpage_url --playlist-end 10 https://www.youtube.com/c/somechannel/videos    

will work pretty much the same as this script, with the benefit of being a one-liner, and not requiring bash.

m3u-from-youtube's People

Contributors

kanliot avatar

Stargazers

Harpreet Singh Gulati avatar Andrew Spoda avatar  avatar  avatar Akash avatar  avatar ddddddddddp avatar Micheal Espinola avatar  avatar  avatar  avatar  avatar Taylan Tatlı avatar Qiutum avatar Notuff 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.