EladBar 2 Posted August 19, 2024 Posted August 19, 2024 Xtream2Emby Convert Xtream lists to STRM files and Live TV (including EPG), support multiple providers. https://gitlab.com/elad.bar/xtream2emby How to install Prerequisites Xtream IPTV account Docker Compose version: "3" services: xtream2emby: image: "registry.gitlab.com/elad.bar/xtream2emby:latest" container_name: "xtream2emby" hostname: "xtream2emby" restart: "unless-stopped" environment: - EXPORTER_PORT=9563 - DEBUG=False volumes: - $PWD/config/config.json:/app/config/config.json - $PWD/media:/app/media - $PWD/cache:/app/cache Image tags per architecture latest: linux/amd64 arm32v7: linux/arm32/v7 arm64v8: linux/arm64/v8 Environment Variables Variable Default Required Description EXPORTER_PORT 9563 - Port for Prometheus exporter DEBUG false - Enable debug log messages Configuration file Configuration file must be located at /config/config.json { "IPTVProviderName": { "url": "http://provider.domain.com", "username": "username", "password": "password", "interval": 360, "category_name_regex": { "^[^\\|]*.[\\|].": "", "^[^\\-]*.[\\-].": "" }, "settings": { "live": { "enabled": true, "use_server_info": false, "name_regex": { "^[^\\|]*.[\\|].": "", "^[^\\-]*.[\\-].": "" }, "exclude_categories": null }, "movie": { "enabled": true, "use_server_info": false, "category_folder": true, "name_regex": { "[A-Z]{2}.\\s": "", "\\s*$": "", "^[^\\|]*.[\\|].": "", "^[^\\-]*.[\\-].": "" }, "exclude_categories": [] }, "series": { "enabled": true, "use_server_info": false, "category_folder": true, "name_regex": { "[A-Z]{2}.\\s": "", "\\s*$": "", "^[^\\|]*.[\\|].": "", "^[^\\-]*.[\\-].": "" }, "exclude_categories": [] } } } } Vendor configuration Key Description url URL provided by the IPTV provider username Account's username password Account's password interval Interval in minutes between scans category_name_regex Regex matches for replacing text for category name as key (find) value (replace) Per stream type (live, movie, series) configuration Key Description enabled Extracting streams is active or not use_server_info Should the base url for stream taken from server info (data from authentication), default is False which will make the stream base url as configuration in url name_regex Regex matches for replacing text for stream (live, movie, series) name as key (find) value (replace) exclude_categories List of categories comma separated to exclude from fetching process, format: ["1", "2", "3"] category_folder Create media within category folder or media type root folder, default is True, will create the media within category
zaHrecsohbiw 13 Posted September 3, 2024 Posted September 3, 2024 Hey this is pretty neat. I just wanted to comment and say good job. I had to solve this problem as well, and wrote a python script that presents the xtream content as folders/files via FUSE mount, so it isn't really portable like yours. I have had tons of trouble with Emby struggling to transcode a lot of the remote files, however. ffmpeg command strings will fail when invoked directly from emby, but if I take the command string and run it manually after exec'ing into the container, it works
grizlyadams 19 Posted October 19, 2024 Posted October 19, 2024 hi- trying to get this to work on an unraid server with docker-compose-manager but just get the following in the log file when I start the docker... initializing xtream2emby <timestamp> xtream2emby stopped <tomestamp> where <timestamp> are the same (with millseconds between them) and those two events fill the log file with the same two lines about 8 or 10secs apart each time.
EladBar 2 Posted October 20, 2024 Author Posted October 20, 2024 Did you set up the configuration file? Thanks
grizlyadams 19 Posted October 21, 2024 Posted October 21, 2024 (edited) On 20/10/2024 at 05:48, EladBar said: Did you set up the configuration file? Thanks Hi, yes I did and i know the docker is working correctly because I see it create the directories when I start the docker. Then I put the config file in the config directory. I'll re-check the config file once I'm back at the server. I'm also a bit unsure of the volume: directive in the composer files volumes: - $PWD/config/config.json:/app/config/config.json I have it as (for docker on unraid) /mnt/user/appdata/xtream2emby/config/config.json:/config/config.json Can the "volumes:" directives point to files, not volumes? Also, when working correctly, how does xtream2emby present the m3u and EPG files? It is via a URL? Edited October 21, 2024 by grizlyadams Spelling
grizlyadams 19 Posted October 21, 2024 Posted October 21, 2024 19 minutes ago, grizlyadams said: Hi, yes I did and i know the docker is working correctly because I see it create the directories when I start the docker. Then I put the config file in the config directory. I'll re-check the config file once I'm back at the server. I'm also a bit unsure of the volume: directive in the composer files volumes: - $PWD/config/config.json:/app/config/config.json I have it as (for docker on unraid) /mnt/user/appdata/xtream2emby/config/config.json:/config/config.json Can the "volumes:" directives point to files, not volumes? Also, when working correctly, how does xtream2emby present the m3u and EPG files? It is via a URL? Just re-checked the config.json file and it is the same as your sample file here, but with my IPTV provider details in the first 3 lines.
iamronr 0 Posted October 21, 2024 Posted October 21, 2024 Forgive me for asking a bit of a noob question... What's the benefit of using this over the Xtream url when setting up Emby? I'd be using this exclusively got Live TV, which doesn't have an "on-demand" library attached.
grizlyadams 19 Posted October 21, 2024 Posted October 21, 2024 2 minutes ago, iamronr said: Forgive me for asking a bit of a noob question... What's the benefit of using this over the Xtream url when setting up Emby? I'd be using this exclusively got Live TV, which doesn't have an "on-demand" library attached. Emby does not support xtream, it only supports m3u. 1
EladBar 2 Posted October 21, 2024 Author Posted October 21, 2024 2 minutes ago, iamronr said: What's the benefit of using this over the Xtream url when setting up Emby? I used it to filter just channels relevant to what we watch and adjust their name, Today I have different vendor for live tv snd using the direct link 1
iamronr 0 Posted October 21, 2024 Posted October 21, 2024 2 minutes ago, grizlyadams said: Emby does not support xtream, it only supports m3u. 1 minute ago, EladBar said: I used it to filter just channels relevant to what we watch and adjust their name, Today I have different vendor for live tv snd using the direct link Good point, it is only m3u, and then a separate link to the epg. So I get this up and going in docker, get the config going as well. Do I got to the port to customize the channels? Just trying to get a general idea before I get the container going...
grizlyadams 19 Posted October 21, 2024 Posted October 21, 2024 (edited) @EladBaris your man on how to set it up - I haven't got it working yet so I'm of little help, sorry. Edited October 21, 2024 by grizlyadams 1
iamronr 0 Posted October 21, 2024 Posted October 21, 2024 Ah I think I got it. It extracts and creates a file that you can edit, etc.
grizlyadams 19 Posted October 21, 2024 Posted October 21, 2024 I have no idea what it does as I can't get it to run...
EladBar 2 Posted October 22, 2024 Author Posted October 22, 2024 (edited) @grizlyadamscan you pls enable the DEBUG environment variable and share the log? It seems that volume mapping is correct Thanks Edited October 22, 2024 by EladBar
grizlyadams 19 Posted October 22, 2024 Posted October 22, 2024 5 hours ago, EladBar said: @grizlyadamscan you pls enable the DEBUG environment variable and share the log? It seems that volume mapping is correct Thanks I have debug enabled with "- debug=True" but this is all the log has in it.... 2024-10-21 15:42:34,925 INFO __main__ Initializing Xtream2Emby 2024-10-21 15:42:34,927 INFO __main__ Xtream2Emby stopped 2024-10-21 15:42:36,957 INFO __main__ Initializing Xtream2Emby 2024-10-21 15:42:36,959 INFO __main__ Xtream2Emby stopped 2024-10-21 15:42:38,616 INFO __main__ Initializing Xtream2Emby 2024-10-21 15:42:38,617 INFO __main__ Xtream2Emby stopped 2024-10-21 15:42:40,324 INFO __main__ Initializing Xtream2Emby 2024-10-21 15:42:40,326 INFO __main__ Xtream2Emby stopped 2024-10-21 15:42:42,287 INFO __main__ Initializing Xtream2Emby 2024-10-21 15:42:42,290 INFO __main__ Xtream2Emby stopped 2024-10-21 15:42:44,968 INFO __main__ Initializing Xtream2Emby 2024-10-21 15:42:44,970 INFO __main__ Xtream2Emby stopped 2024-10-22 11:49:24,150 INFO __main__ Initializing Xtream2Emby 2024-10-22 11:49:24,221 INFO __main__ Xtream2Emby stopped 2024-10-22 11:49:27,419 INFO __main__ Initializing Xtream2Emby 2024-10-22 11:49:27,421 INFO __main__ Xtream2Emby stopped 2024-10-22 11:49:30,285 INFO __main__ Initializing Xtream2Emby 2024-10-22 11:49:30,286 INFO __main__ Xtream2Emby stopped 2024-10-22 11:49:32,949 INFO __main__ Initializing Xtream2Emby 2024-10-22 11:49:32,954 INFO __main__ Xtream2Emby stopped 2024-10-22 11:49:35,631 INFO __main__ Initializing Xtream2Emby 2024-10-22 11:49:35,633 INFO __main__ Xtream2Emby stopped 2024-10-22 11:49:39,894 INFO __main__ Initializing Xtream2Emby 2024-10-22 11:49:39,897 INFO __main__ Xtream2Emby stopped 2024-10-22 11:49:44,995 INFO __main__ Initializing Xtream2Emby 2024-10-22 11:49:44,997 INFO __main__ Xtream2Emby stopped 2024-10-22 11:49:52,678 INFO __main__ Initializing Xtream2Emby 2024-10-22 11:49:52,679 INFO __main__ Xtream2Emby stopped 2024-10-22 11:50:07,181 INFO __main__ Initializing Xtream2Emby 2024-10-22 11:50:07,183 INFO __main__ Xtream2Emby stopped 2024-10-22 11:50:34,689 INFO __main__ Initializing Xtream2Emby 2024-10-22 11:50:34,691 INFO __main__ Xtream2Emby stopped
EladBar 2 Posted October 23, 2024 Author Posted October 23, 2024 I think that there is a bug in documentation, config file should be in: /app/config/config.json 1
grizlyadams 19 Posted October 23, 2024 Posted October 23, 2024 ok - I changed the location of the config.json file and now I get more in the logfile when I start the docker. I've attached the log. xtream2emby.log
irPhunky 3 Posted October 30, 2024 Posted October 30, 2024 Just stumbled on this and wanted to give it a go, but it looks like the build pipeline is failing I couldn't get this running either, the container would just crash - i've attached log files xtream2emby.html 2
navy12 1 Posted February 10 Posted February 10 On 10/30/2024 at 5:49 PM, irPhunky said: Just stumbled on this and wanted to give it a go, but it looks like the build pipeline is failing I couldn't get this running either, the container would just crash - i've attached log files xtream2emby.html 36.94 kB · 6 downloads @irPhunky @grizlyadams@EladBar I fixed the request error that others show and the missing emby config that needs to be there. I will post the changes here later today now that I got it fully working.
ullms 0 Posted July 19 Posted July 19 Trying to build this docker in Unraid, it errors in the log with: Traceback (most recent call last): File "/app/entrypoint.py", line 21, in <module> from managers.xtream_provider import XtreamProvider File "/app/managers/xtream_provider.py", line 7, in <module> import requests ModuleNotFoundError: No module named 'requests' Any help would be great. Thanks.
bruor 42 Posted September 28 Posted September 28 On 2/10/2025 at 2:47 PM, navy12 said: @irPhunky @grizlyadams@EladBar I fixed the request error that others show and the missing emby config that needs to be there. I will post the changes here later today now that I got it fully working. Any chance you can post those changes?
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now