Jellyfin Forum
split m3u with tv channels - Printable Version

+- Jellyfin Forum (https://forum.jellyfin.org)
+-- Forum: Off Topic (https://forum.jellyfin.org/f-off-topic)
+--- Forum: General Discussion (https://forum.jellyfin.org/f-general-discussion)
+--- Thread: split m3u with tv channels (/t-split-m3u-with-tv-channels)



split m3u with tv channels - goerdi - 2025-05-14

Hi !

I have a m3u playlist (128 channels)  and i want split it in 128 files with the channel name.

the m3 looks like
Code:
#EXTM3U
#EXTINF:-1 tvg-logo="http://192.168.66.254:9981/imagecache/19" tvg-id="45a0ee6c8f6c8001f207e5c1d7d1d152" tvg-chno="41",ORF1 HD
http://192.168.66.254:9981/stream/channelid/1827577925?profile=vaapi_x265
#EXTINF:-1 tvg-logo="http://192.168.66.254:9981/imagecache/18" tvg-id="3ae7ba457807e9a49defffa7076c1fdf" tvg-chno="42",ORF2T HD
http://192.168.66.254:9981/stream/channelid/1169876794?profile=vaapi_x265

so in this case i would like to have 2 files
with
e.g. 2nd  file
Code:
#EXTM3U
#EXTINF:-1 tvg-logo="http://192.168.66.254:9981/imagecache/18" tvg-id="3ae7ba457807e9a49defffa7076c1fdf" tvg-chno="42",ORF2T HD
http://192.168.66.254:9981/stream/channelid/1169876794?profile=vaapi_x265

and the name of the file should be ORF2T HD.m3u
How can i mange it with a bash script ?

Ciao Gerd


RE: split m3u with tv channels - conor - 2025-05-14

Just put your post above into Grok/ chatgpt and it'll spit something out that will probably work.


RE: split m3u with tv channels - goerdi - 2025-05-14

Hi !

This is exaxct what i do not want to do.. manual work...
the list can change day by day so to have a bash script called by cron is the best/only solution...
if i had to do it only once i also could do it manually...

Ciao Gerd


RE: split m3u with tv channels - conor - 2025-05-15

Grok will write the bash script for you.


RE: split m3u with tv channels - goerdi - 2025-05-15

Hi !

Ah thanks...
Co-Pilot finally did :-)

Ciao Gerd