### Listen to music online using this repo's github page
all of the streams can be listen to using their own page, just click on the one you want and hit the play button, click on the left and right arrow keys to change stations, this was made possible by using javascript code from [this page](https://www.draketo.de/software/m3u-player.html), thank you

i've also added a simple audio visualizer to the stream pages, code was taken from [this repo](https://github.com/wayou/audio-visualizer-with-controls), thank you

<div align="left">

| [60s](https://junguler.github.io/m3u-radio-music-playlists/stuff/60s.html) | [70s](https://junguler.github.io/m3u-radio-music-playlists/stuff/70s.html) | [80s](https://junguler.github.io/m3u-radio-music-playlists/stuff/80s.html) | [90s](https://junguler.github.io/m3u-radio-music-playlists/stuff/90s.html) | [acid_jazz](https://junguler.github.io/m3u-radio-music-playlists/stuff/acid_jazz.html) | [african](https://junguler.github.io/m3u-radio-music-playlists/stuff/african.html) | [alternative](https://junguler.github.io/m3u-radio-music-playlists/stuff/alternative.html) | [ambient](https://junguler.github.io/m3u-radio-music-playlists/stuff/ambient.html) |
|---|---|---|---|---|---|---|---|
| [americana](https://junguler.github.io/m3u-radio-music-playlists/stuff/americana.html) | [anime](https://junguler.github.io/m3u-radio-music-playlists/stuff/anime.html) | [arabic](https://junguler.github.io/m3u-radio-music-playlists/stuff/arabic.html) | [asian](https://junguler.github.io/m3u-radio-music-playlists/stuff/asian.html) | [big band](https://junguler.github.io/m3u-radio-music-playlists/stuff/big_band.html) | [bluegrass](https://junguler.github.io/m3u-radio-music-playlists/stuff/bluegrass.html) | [blues](https://junguler.github.io/m3u-radio-music-playlists/stuff/blues.html) | [breakbeat](https://junguler.github.io/m3u-radio-music-playlists/stuff/breakbeat.html) |
| [chillout](https://junguler.github.io/m3u-radio-music-playlists/stuff/chillout.html) | [christian](https://junguler.github.io/m3u-radio-music-playlists/stuff/christian.html) | [classical](https://junguler.github.io/m3u-radio-music-playlists/stuff/classical.html) | [club](https://junguler.github.io/m3u-radio-music-playlists/stuff/club.html) | [college](https://junguler.github.io/m3u-radio-music-playlists/stuff/college.html) | [comedy](https://junguler.github.io/m3u-radio-music-playlists/stuff/comedy.html) | [country](https://junguler.github.io/m3u-radio-music-playlists/stuff/country.html) | [dance](https://junguler.github.io/m3u-radio-music-playlists/stuff/dance.html) |
| [deutsch](https://junguler.github.io/m3u-radio-music-playlists/stuff/deutsch.html) | [disco](https://junguler.github.io/m3u-radio-music-playlists/stuff/disco.html) | [discofox](https://junguler.github.io/m3u-radio-music-playlists/stuff/discofox.html) | [downtempo](https://junguler.github.io/m3u-radio-music-playlists/stuff/downtempo.html) | [drum & bass](https://junguler.github.io/m3u-radio-music-playlists/stuff/drum_and_bass.html) | [easy listening](https://junguler.github.io/m3u-radio-music-playlists/stuff/easy_listening.html) | [ebm](https://junguler.github.io/m3u-radio-music-playlists/stuff/ebm.html) | [electronic](https://junguler.github.io/m3u-radio-music-playlists/stuff/electronic.html) |
| [eurodance](https://junguler.github.io/m3u-radio-music-playlists/stuff/eurodance.html) | [film](https://junguler.github.io/m3u-radio-music-playlists/stuff/film.html) | [folk](https://junguler.github.io/m3u-radio-music-playlists/stuff/folk.html) | [france](https://junguler.github.io/m3u-radio-music-playlists/stuff/france.html) | [funk](https://junguler.github.io/m3u-radio-music-playlists/stuff/funk.html) | [goa](https://junguler.github.io/m3u-radio-music-playlists/stuff/goa.html) | [gospel](https://junguler.github.io/m3u-radio-music-playlists/stuff/gospel.html) | [gothic](https://junguler.github.io/m3u-radio-music-playlists/stuff/gothic.html) |
| [greek](https://junguler.github.io/m3u-radio-music-playlists/stuff/greek.html) | [hardcore](https://junguler.github.io/m3u-radio-music-playlists/stuff/hardcore.html) | [hardrock](https://junguler.github.io/m3u-radio-music-playlists/stuff/hardrock.html) | [hip hop](https://junguler.github.io/m3u-radio-music-playlists/stuff/hip_hop.html) | [house](https://junguler.github.io/m3u-radio-music-playlists/stuff/house.html) | [india](https://junguler.github.io/m3u-radio-music-playlists/stuff/india.html) | [indie](https://junguler.github.io/m3u-radio-music-playlists/stuff/indie.html) | [industrial](https://junguler.github.io/m3u-radio-music-playlists/stuff/industrial.html) |
| [instrumental](https://junguler.github.io/m3u-radio-music-playlists/stuff/instrumental.html) | [italian](https://junguler.github.io/m3u-radio-music-playlists/stuff/italian.html) | [jazz](https://junguler.github.io/m3u-radio-music-playlists/stuff/jazz.html) | [jpop](https://junguler.github.io/m3u-radio-music-playlists/stuff/jpop.html) | [jungle](https://junguler.github.io/m3u-radio-music-playlists/stuff/jungle.html) | [latin](https://junguler.github.io/m3u-radio-music-playlists/stuff/latin.html) | [lounge](https://junguler.github.io/m3u-radio-music-playlists/stuff/lounge.html) | [metal](https://junguler.github.io/m3u-radio-music-playlists/stuff/metal.html) |
| [mixed](https://junguler.github.io/m3u-radio-music-playlists/stuff/mixed.html) | [musical](https://junguler.github.io/m3u-radio-music-playlists/stuff/musical.html) | [oldies](https://junguler.github.io/m3u-radio-music-playlists/stuff/oldies.html) | [opera](https://junguler.github.io/m3u-radio-music-playlists/stuff/opera.html) | [polish](https://junguler.github.io/m3u-radio-music-playlists/stuff/polish.html) | [polka](https://junguler.github.io/m3u-radio-music-playlists/stuff/polka.html) | [pop](https://junguler.github.io/m3u-radio-music-playlists/stuff/pop.html) | [portugal](https://junguler.github.io/m3u-radio-music-playlists/stuff/portugal.html) |
| [progressive](https://junguler.github.io/m3u-radio-music-playlists/stuff/progressive.html) | [punk](https://junguler.github.io/m3u-radio-music-playlists/stuff/punk.html) | [quran](https://junguler.github.io/m3u-radio-music-playlists/stuff/quran.html) | [rap](https://junguler.github.io/m3u-radio-music-playlists/stuff/rap.html) | [reggae](https://junguler.github.io/m3u-radio-music-playlists/stuff/reggae.html) | [retro](https://junguler.github.io/m3u-radio-music-playlists/stuff/retro.html) | [rnb](https://junguler.github.io/m3u-radio-music-playlists/stuff/rnb.html) | [rock](https://junguler.github.io/m3u-radio-music-playlists/stuff/rock.html) |
| [romanian](https://junguler.github.io/m3u-radio-music-playlists/stuff/romanian.html) | [russian](https://junguler.github.io/m3u-radio-music-playlists/stuff/russian.html) | [salsa](https://junguler.github.io/m3u-radio-music-playlists/stuff/salsa.html) | [schlager](https://junguler.github.io/m3u-radio-music-playlists/stuff/schlager.html) | [ska](https://junguler.github.io/m3u-radio-music-playlists/stuff/ska.html) | [smooth jazz](https://junguler.github.io/m3u-radio-music-playlists/stuff/smooth_jazz.html) | [soul](https://junguler.github.io/m3u-radio-music-playlists/stuff/soul.html) | [soundtrack](https://junguler.github.io/m3u-radio-music-playlists/stuff/soundtrack.html) | [spain](https://junguler.github.io/m3u-radio-music-playlists/stuff/spain.html) | [spiritual](https://junguler.github.io/m3u-radio-music-playlists/stuff/spiritual.html) | [sport](https://junguler.github.io/m3u-radio-music-playlists/stuff/sport.html) | [swing](https://junguler.github.io/m3u-radio-music-playlists/stuff/swing.html) | [symphonic](https://junguler.github.io/m3u-radio-music-playlists/stuff/symphonic.html) | [talk](https://junguler.github.io/m3u-radio-music-playlists/stuff/talk.html) | [techno](https://junguler.github.io/m3u-radio-music-playlists/stuff/techno.html) | [top 40](https://junguler.github.io/m3u-radio-music-playlists/stuff/top_40.html) |
| [trance](https://junguler.github.io/m3u-radio-music-playlists/stuff/trance.html) | [turk](https://junguler.github.io/m3u-radio-music-playlists/stuff/turk.html) | [urban](https://junguler.github.io/m3u-radio-music-playlists/stuff/urban.html) | [usa](https://junguler.github.io/m3u-radio-music-playlists/stuff/usa.html) | [various](https://junguler.github.io/m3u-radio-music-playlists/stuff/various.html) | [wave](https://junguler.github.io/m3u-radio-music-playlists/stuff/wave.html) | [world](https://junguler.github.io/m3u-radio-music-playlists/stuff/world.html) | |

<br>

if you are on a chromium based web browser (chrome, vivaldi, opera, edge etc ...) you are not able to listen to the most of the streams, here is an explanation from [chrome support](https://support.google.com/chrome/thread/29505473?hl=en&msgid=29673696) which tells you why this happens and how to fix it

> Usually this error occurs because the radio station you are trying to listen to is running on an unencrypted port (not 443). This is quite common and it's not technically necessary for radio stations to be encrypted but nowadays web browsers like Chrome have started disallowing unencrypted content to be shown in an otherwise encrypted websites. There is a few solutions for you right now:

- Use a different browser like Firefox. For the moment they haven't blocked unencrypted content on an otherwise encrypted page web page.

- Open Chrome (or other chromium web browsers), go to the website and then click on the padlock icon to the left of the URL box and then from the drop down menu select the 'Site Settings' option, you can then scroll down to the 'Insecure content' option at the bottom of the page and select 'Allow', this will create an exception for the website and allow you to continue using the player as before.

- download the stream files and play them locally on your pc or other devices which i've talked about further down in this markdown file

<div>

<br>

### Shortcuts
 * [How to listen](https://github.com/junguler/m3u-radio-music-playlists#how-to-listen-to-these)
 * [How to download a stream](https://github.com/junguler/m3u-radio-music-playlists#how-to-download-a-live-stream-to-my-computer)
 * [How to save songs indivudally](https://github.com/junguler/m3u-radio-music-playlists#how-to-save-songs-indivudally-by-title-from-a-live-stream)
 * [Audio visualization](https://github.com/junguler/m3u-radio-music-playlists#mpv-only-shows-a-black-window-when-listening-to-music-how-to-make-it-pretty)
 * [Normilizing audio](https://github.com/junguler/m3u-radio-music-playlists#normilize-audio)
 * [Customize keybinds](https://github.com/junguler/m3u-radio-music-playlists#i-really-like-mpv-how-do-i-customize-keybinds)
 * [Easier m3u consumption](https://github.com/junguler/m3u-radio-music-playlists#isnt-there-an-easier-way-to-use-and-control-these-using-mpv)
 * [How to download](https://github.com/junguler/m3u-radio-music-playlists#how-to-download-all-of-the-files)
 * [Git stats](https://github.com/junguler/m3u-radio-music-playlists#git-stats)

<br>

### Extra Streams
this repo now includes 4 extra streams made by me

`---everything-full.m3u` combines all of the streams sorted by names that are shown in this repo

`---everything-lite.m3u` is exactly like the everything-full stream but cover images and extra info was removed

`---randomized.m3u` is exactly like the everything-lite stream but every line was shuffled and randomized

`---sorted.m3u` is exactly like the everything-lite stream but the links themselves are sorted alphabetically/numerically, it's good for when you have found a good radio station with many different genres of music to listen to all of them in order

every time i push an update these 4 files will also get updated and the randomized stream will also get shuffled again

<br>

### How to listen to these?
in the terminal, do this:
```
mpv https://raw.githubusercontent.com/junguler/m3u-radio-music-playlists/main/trance.m3u
```
or add/change `m3u` file association in your os to mpv and double click on any of `.m3u` files in your file manager

<br>

### how to download a live-stream to my computer?
<details>
  <summary>click me to read</summary>

<br>
  
downloading from these m3u files is not possible as far as i know since they contain multiple streams, but if you want to download from a particular stream you can achieve this by using ffmpeg, i use the most popular (first stream) in the `trance.m3u` to showcase this, in your terminal change directory to where you want this file to be at (note that lines starting with # are not actual streams and are there for embedding extra info to your media player)
```
ffmpeg -y -i http://stream.dancewave.online:8080/dance.mp3 -c copy dancewave.mp3
```
change the filename at the end to what you like, as ffmpeg suggests when you feel happy with the length/size of this file press `q` in your terminal emulator to finish the process and save the file

because these are online streams there is no way to download the whole thing as they are constantly changing, but you can set a hard limit to when recording stops using the timeout command on bash/zsh shells
```
timeout 60 ffmpeg -y -i http://stream.dancewave.online:8080/dance.mp3 -c copy dancewave.mp3
```
the above command saves about one minute of the audio live-stream, you can specify longer times using `-m` for minutes `-h` for hours and `-d` for days, these can also be used with decimals for more control, so one and half minute can be set with 1.5m or 3 hour and 45 minutes can be set with 3.75h
```
timeout 1h ffmpeg -y -i http://stream.dancewave.online:8080/dance.mp3 -c copy dancewave.mp3
```

another more elegant way to do this is to use ffmpeg to segment these files with your desired time and add a timestamp at the end as filenames, code was copied from [here](https://write.corbpie.com/ffmpeg-saving-stream-in-intervals-with-date-time-as-filename/)

```
ffmpeg -i http://stream.dancewave.online:8080/dance.mp3 -c copy -f segment -strftime 1 -segment_time 60 %Y-%m-%d-%H-%M-%S.mp3
```
this will save a new mp3 file every minute, if you want to make this longer change `-segment_time 60` and multiply the number of minutes you want for each file by 60, so if i want my mp3 files to each be 5 minutes i do `-segment_time 300`  this process goes on forever unless you run out of disk space or if you are not connected to the internet for some reason 

this command can also be stopped using `ctrl + c` shortcut or the timeout command showcased above so adding `timeout 1h` in front of the above command stops the whole process after an hour

</details>

<br>

### How to save songs indivudally by title from a live stream?

<details>
  <summary>click me to read</summary>

<br>

i have been looking for a way to do this for a while, i found this program [streamwriter](https://streamwriter.org/en/downloads/) that does this but unfortunently it's only available on windows, this [winehq page](https://appdb.winehq.org/objectManager.php?sClass=application&iId=19745) lists the program as platinum and it should work with wine without any issues but i have not tested it myself as i'm not on linux at the moment and don't have a virtual machine ready either

download the portable version of the program and extract it somewhere in your hard drive, the first time you open the program it's going to ask a few questions, things like language and where it's going to save downloaded songs, now that you are greeted with the program go to a m3u file of your favorite music genre and copy a stream link to start download, here is mine from the trance.m3u
```
http://51.89.148.171:8022/stream/1/
```
now put it inside the area i've shown and click to button next to it to start recording, after each song is completed it's going to create a new file and put a name on it from the title the stream is broadcasting

![streamwriter](stuff/streamwriter.jpg)

once you are happy with the amount of songs downloaded, right click on the stream and click on `stop recording after current title`

note that in some rare cases a stream does not broadcasts song titles and if you happen to come accross of these there is really nothing else you can and the program is going to continuously record the stream until you manually stop it

</details>

<br>

### Mpv only shows a black window when listening to music, how to make it pretty?
download the [visualizer](https://raw.githubusercontent.com/mfcc64/mpv-scripts/master/visualizer.lua) script for mpv and put it in your scripts folder either on `~/.config/mpv/scripts` on *nix systems 

or `C:\users\USERNAME\AppData\Roaming\mpv\scripts\` on windows

put these in your mpv.conf, this is a auto-profile for all audio files
```
[audio-only]
profile-cond=not vid
profile-restore=copy
vf-add=rgbashift=rh=-4:bv=+4
vf-add=drawbox=w=iw:h=ih:color=00FFFF@0.5
vf-add=drawbox=x=3:y=3:w=iw-6:h=ih-6:color=00FF00@0.5
vf-add=drawbox=x=6:y=6:w=iw-12:h=ih-12:color=FFFF00@0.5
vf-add=hue=H=0.1*PI*t
```

<br>

### Normilize Audio
depending on the stream some music might be too load and others too quiet, thankfully we can use an ffmpeg filter inside mpv to fix the issue and force all music to be played at the same level, put this line inside your `mpv.conf` and it will automatically normalize all audio
```
af=lavfi=[dynaudnorm=f=75:g=25:p=0.55]
```

<br>

### I really like mpv, how do i customize keybinds?
make a file called input.conf either at the folder your mpv.exe is on windows or on ~/.config/mpv/ if you are *nix systems, put these inside it for using page-up and page-down for changing radio stations
```
PGUP playlist-prev ; show-text "${playlist-pos-1}/${playlist-count}"
PGDWN playlist-next ; show-text "${playlist-pos-1}/${playlist-count}"
```

<br>

### Isn't there an easier way to use and control these using mpv?
yes there is, use the [IPTV script](https://github.com/gthreepw00d/mpv-iptv) which comes with fuzzy finding stations, better keybinds and ...

<br>

### How to download all of the files?
use the [auto-generated zip](https://github.com/junguler/m3u-radio-music-playlists/archive/refs/heads/main.zip) 

you can also run a git clone on this repo
```
git clone https://github.com/junguler/m3u-radio-music-playlists.git
```
for further updates cd into the folder and do ``git pull``

<br>

### Git Stats
since the traffic section of the insight tab is hidden to other viewers of this repo i'm going to include them and update them every two weeks so you can have feel for how this repo is doing

![](stuff/stats_1.jpg)

![](stuff/stats_2.jpg)

![](stuff/stats_3.jpg)

<br>

### Current and potential sources

here is a list of websites i've scraped from already and included m3u streams for in this repo

| website | folder | script |
|--|--|--|
| http://radio.pervii.com/en/online-playlists-m3u.htm | [root](https://github.com/junguler/m3u-radio-music-playlists) | [scrape-radio.pervii-auto.sh](https://github.com/junguler/m3u-radio-music-playlists/blob/main/stuff/scrape-radio.pervii-auto.sh) |
| http://www.radio.pervii.com/ | [/radio.pervii](https://github.com/junguler/m3u-radio-music-playlists/tree/main/radio.pervii) | [scrape-radio.pervii-manual.sh](https://github.com/junguler/m3u-radio-music-playlists/blob/main/stuff/scrape-radio.pervii-manual.sh) |
| https://www.internet-radio.com/ | [/internet-radio](https://github.com/junguler/m3u-radio-music-playlists/tree/main/internet-radio) | [scrape-internet-radio-manual.sh](https://github.com/junguler/m3u-radio-music-playlists/blob/main/stuff/scrape-internet-radio-manual.sh) |
| https://liveonlineradio.net/ | [/live_online_radio](https://github.com/junguler/m3u-radio-music-playlists/tree/main/live_online_radio) | [scrape-live_online_radio-manual.sh](https://github.com/junguler/m3u-radio-music-playlists/blob/main/stuff/scrape-live_online_radio-manual.sh) |
| https://onlineradiobox.com/ | [/online_radio_box](https://github.com/junguler/m3u-radio-music-playlists/tree/main/online_radio_box) | [scrape-online_radio_box-manual.sh](https://github.com/junguler/m3u-radio-music-playlists/blob/main/stuff/scrape-online_radio_box-manual.sh) |
| https://www.radio.net/ | [/radio.net](https://github.com/junguler/m3u-radio-music-playlists/tree/main/radio.net) | [scrape-radio.net-manual.sh](https://github.com/junguler/m3u-radio-music-playlists/blob/main/stuff/scrape-radio.net-manual.sh) |
| https://www.radioguide.fm/ | [/radio_guide.fm](https://github.com/junguler/m3u-radio-music-playlists/tree/main/radio_guide.fm) | [scrape-radio_guide.fm-manual.sh](https://github.com/junguler/m3u-radio-music-playlists/blob/main/stuff/scrape-radio_guide.fm-manual.sh) |
| https://streema.com/ | [/streema](https://github.com/junguler/m3u-radio-music-playlists/tree/main/streema) | [scrape-streema-manual.sh](https://github.com/junguler/m3u-radio-music-playlists/blob/main/stuff/scrape-streema-manual.sh) |
| http://www.hit-tuner.net/ | [/hit_tuner.net](https://github.com/junguler/m3u-radio-music-playlists/tree/main/hit_tuner.net) | [scrape-hit_tuner.net-manual.sh](https://github.com/junguler/m3u-radio-music-playlists/blob/main/stuff/scrape-hit_tuner.net-manual.sh) |
| https://online-radio.eu/ | [/online_radio.eu](https://github.com/junguler/m3u-radio-music-playlists/tree/main/online_radio.eu) | [scrape-online_radio.eu-manual.sh](https://github.com/junguler/m3u-radio-music-playlists/blob/main/stuff/scrape-online_radio.eu-manual.sh) |

my future plans for this repo is to keep scraping online radio websites and here are a few i'm looking at in the moment, this is not by any means a promise, just want to mention the names of these as a way of motivating myself to try them

| https://internetradiouk.com/ | https://tunein.com/radio/music/ | http://radio.garden/  |
|--|--|--|
| https://www.accuradio.com/ | n/a | n/a |
