Jump to content

python script to convert m3u file to strm files with emby folder structure (free)


Recommended Posts

Posted
1 hour ago, afogleson said:

 

 

What if my vod have more than 5000 movies? It's possible to do this?

Posted

Emby will easily handle 5000 strm files. I've tested 500,000 strm files on a Celeron NAS with 8GB memory running off an NVMe and I could have kept adding more files. These were a mix of Movies and TV Show Episodes.

 

Posted
5 hours ago, cayars said:

Emby will easily handle 5000 strm files. I've tested 500,000 strm files on a Celeron NAS with 8GB memory running off an NVMe and I could have kept adding more files. These were a mix of Movies and TV Show Episodes.

 

Hi, I mean how to do this at once? Not to convert every single file because it make not sense for me.

Posted
14 hours ago, Przemek said:

Hi, I mean how to do this at once? Not to convert every single file because it make not sense for me.

Not sure I follow your question. STRM file can point to media offsite so there is an endless amount of strm file you can generate. Most people I think use them only for VOD files that are part of an m3u subscription used for TV channels.  But you can generate strm files to access cloud accounts (as long as you can download the file), you can generate them from RSS sources for things like podcasts or even to video files on archive.net that are in the public domain.

You could generate these a bit every day and keep adding to your libraries or creating new libs for different content or you could generate all your STRM files and add them all at once and let Emby process them for hours to days depending on the amount you add at one time.

You mentioned "convert every single file" but you typically wouldn't use strm files for local media as you can add them direct.  Instead most people use strm files pointed to media on the Internet. There is nothing to convert as an strm file simple holds a single text line which is the URL of the media file.

  • Agree 1
Posted
20 hours ago, cayars said:

 

 

Hi, @cayarsthanks for Your answer but meybe I'm too stupid to understand what do You mean. I have IPTV subscription with live tv and VOD movies and series. I just want to know it's possible to add that vod tags from tv section to separate library on Emby. To get them on start page.

It's possible to do that with single command not to use script for every movie and episode because it will took too much time.

Posted

Emby is going to load the m3u file into the TV section the way you give it to it. The best thing you can do is to edit the m3u file to remove countries or languages you don't want loaded.  If you don't want VOD TV Shows or VOD Movies loaded ,then you want to remove them from the file.  Same with radio stations or all the CBS, NBC, ABC, FOX channels you probably have.

The key to good TV is to reduce the m3u file down to the information you want loaded. There are playlist editors you can use locally or a few online services that you can use to do this that will reprocess the feed every day.

If you want to send me a private message (hover over my avatar) I can get more specific with you if you let me know the provider, you are using.

Carlo

Posted

Hi @cayarsI know how to reduce my playlist. I use iptveditor. I just want to put vod from my tv library in Emby to start page.

Anielarias
Posted (edited)
11 hours ago, Przemek said:

Hi, @cayarsthanks for Your answer but meybe I'm too stupid to understand what do You mean. I have IPTV subscription with live tv and VOD movies and series. I just want to know it's possible to add that vod tags from tv section to separate library on Emby. To get them on start page.

It's possible to do that with single command not to use script for every movie and episode because it will took too much time.

Yes you can do it. here are some of the projects u can use to do this task, u can also automate this, however all of this is outside of my skillset for the time being. https://emby.media/community/index.php?/topic/116344-m3u-movies-and-tv-shows-as-regular-movies-and-tv-shows-emby-libraries/

Edited by Anielarias
  • Like 1
afogleson
Posted
On 3/10/2023 at 5:35 PM, Przemek said:

What if my vod have more than 5000 movies? It's possible to do this?

yes. should be no problem  my VOD has 14K movies and probably a few hundred thousand tv episodes. once the stream files are created then there is some time  to load them all into libraries  but they will work fine

Posted
27 minutes ago, hooray4me said:

If anyone is interested, I created added a compare_and_update function to m3u2strm with a couple more variables.

This cuts down on re-writing the strm files on every run when nothing has changed about the existing file.

Read Me and code -> https://github.com/hooray4me/m3u2strm

image.thumb.png.2139c8bfa7cb5ea86ab6bf11e9feddf0.png

image.png.58a38f655c4b81565ec14446f7edf7a5.png

Hi, can You tell me how to do with that script? It's possible in my case. I have one link from my IPTV provider with channels and vod.

hooray4me
Posted

Did read the setup instructions in the read me?

Posted (edited)
3 hours ago, hooray4me said:

Did read the setup instructions in the read me?

Yes I read but I want to know if I have to make list only for movies and series in iptveditor? What if I don't ont have any Apollo account? What if I cannot install ensurepip in Debian 11? Do I need this?

Edited by Przemek
afogleson
Posted
1 hour ago, Przemek said:

Yes I read but I want to know if I have to make list only for movies and series in iptveditor? What if I don't ont have any Apollo account? What if I cannot install ensurepip in Debian 11? Do I need this?

So i am confused since you said you have one file that has channels and vod... so can you attach a sanitized (user/pass removed) copy of that file. im not sure that will work at all easily as stream files it sounds more like something for the live tv aspect of emby

Posted
15 minutes ago, afogleson said:

So i am confused since you said you have one file that has channels and vod... so can you attach a sanitized (user/pass removed) copy of that file. im not sure that will work at all easily as stream files it sounds more like something for the live tv aspect of emby

I have link for m3u file but I add it and edit in iptveditor to have EPG and auto update. I can make playlist for only live channels and second playlist for vod. I I can get url like that:

`https://opop.pro/wRHAsgijbEV`

or

`http://iptv.com:80/get.php?username=AggtkuEvjud&password=gukgg&type=m3u_plus&output=mpegts`

So I don't use that m3u file.

I cannot add it here because almost every row have address, username and password.

 

hooray4me
Posted

I'm almost done with a docker image that should simplify useage. I'll post a link as soon as i'm done.

  • Like 1
Posted
Just now, hooray4me said:

I'm almost done with a docker image that should simplify useage. I'll post a link as soon as i'm done.

Thanks, but can You tell me if this will work for me? If I don't use that m3u file. I use urls that I generate in iptveditor. It work if I don't have that Apollo subscription?

Regards.

 

hooray4me
Posted

I use iptveditor for my live tv stuff...but not VOD content. In theory it should work. in the python code its wget... might need some modification depending on the output from iptveditor.

Posted

OK I will try this docker. Thanks.

hooray4me
Posted

Can attach the output you get from doing a

wget https://opop.pro/xxxxxxx

or just downloading the file from iptveditor ( sanitized first or course)?

Anielarias
Posted
7 hours ago, hooray4me said:

If anyone is interested, I created added a compare_and_update function to m3u2strm with a couple more variables.

This cuts down on re-writing the strm files on every run when nothing has changed about the existing file.

Read Me and code -> https://github.com/hooray4me/m3u2strm

image.thumb.png.2139c8bfa7cb5ea86ab6bf11e9feddf0.png

image.png.58a38f655c4b81565ec14446f7edf7a5.png

i will definity will give this a go, since i wanted to do this more elegantly. unfortunately idk bash scripting or programming for that matter yet to automate this. is the docker image ready?

hooray4me
Posted (edited)

I have not done extensive testing yet and there are some additional failsafes I need to put in. I only tested the docker-compose method.

When the container starts up it will immediately pull all tvshows and then movies. It will also create a job that runs at an interval you specify, to pull the latest content. Make sure you have the correct tv and movie paths... DON'T point it at your existing movies and tv shows... make new folders first!

Readme has basic info. It's work in progress

https://hub.docker.com/r/hooray4rob/ustreamgen

As always no refunds 😂

Edited by hooray4me
Anielarias
Posted
5 minutes ago, hooray4me said:

I have not done extensive testing yet and there are some additional failsafes I need to put in. I only tested the docker-compose method.

When the container starts up it will immediately pull all tvshows and then movies. It will also create a job that runs at an interval you specify, to pull the latest content. Make sure you have the correct tv and movie paths... DON'T point it at your existing movies and tv shows... make new folders first!

Readme has basic info. It's work in progress

https://hub.docker.com/r/hooray4rob/streamgenerator

As always no refunds 😂

lol understood, i will give this a try for sure thanks.

Posted

@hooray4meso it's not possible to change that docker-compose for other providers?

`PROVIDER=apollo #ONLY SUPPORTED PROVIDER ATM`

Anielarias
Posted
1 minute ago, Przemek said:

@hooray4meso it's not possible to change that docker-compose for other providers?

`PROVIDER=apollo #ONLY SUPPORTED PROVIDER ATM`

ohh wait this only works with a specific provider?

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...