Skip to content

Bash script to create m3u playlists from Youtube playlists or Youtube channels

License

Notifications You must be signed in to change notification settings

kanliot/m3u-from-Youtube

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 

Repository files navigation

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.

About

Bash script to create m3u playlists from Youtube playlists or Youtube channels

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages