GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - o0Zz/xtreamcodeserver: XtreamCode Server python library - Add ability to create an XTreamCode server in python

BranchesTags
Open more actions menu

Latest commit

 

History

23 Commits
23 Commits

Folders and files

NameName
Last commit message
Last commit date
.vscode
.vscode
 
 
xtreamcodeserver
xtreamcodeserver
 
 
.gitignore
.gitignore
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
pyproject.toml
pyproject.toml
 
 
uv.lock
uv.lock
 
 

Repository files navigation

XTreamCode Server

XTreamCodeServer is a simple API to expose media over XTreamCode API

from xtreamcodeserver import *

#Create credentials test/test
credentials_provider = XTreamCodeCredentialsMemoryProvider()
credentials_provider.add_or_update_credentials(XTreamCodeCredentials("test", "test"))

#Add MyMovie.mkv to CategoryName
entry_provider = XTreamCodeEntryMemoryProvider()
category1 = XTreamCodeCategory(name="CategoryName", category_type=XTreamCodeType.VOD)
category1.add_entry(XTreamCodeVod(name="MyMovie", extension=".mkv", stream=XTreamCodeFileSystemStream("./MyMovie.mkv"), description="This is the description for MyMovie"))
entry_provider.add_category(category1)

#Start server
server_xtreamcode = XTreamCodeServer(entry_provider, None, credentials_provider)
server_xtreamcode.setup("0.0.0.0", 8081, "http://127.0.0.1")
server_xtreamcode.start()

print("Server started, it will stop automatically after 10s...")

time.sleep(10)
server_xtreamcode.stop()

Compatibility

This library has been tested with various applications (Box, TV, FireStick, ....)

Quick start

You can test it by streaming your local media with below line

python -m xtreamcodeserver -vod /my/media/path -serie /my/media/serie

This command line will search for "mkv, avi, mp4" movies and expose them on your network.

  • Credentials: username=test&password=test
  • Port: 8081

For more option refer you to the help

python -m xtreamcodeserver -h

How to access my media

Below are some usefull URLs

Server/User informations

http://127.0.0.1:8081/player_api.php?username=test&password=test

Download playlist.m3u

http://127.0.0.1:8081/get.php?username=test&password=test&type=m3u_plus&output=ts

Get JSON information

http://127.0.0.1:8081/player_api.php?username=test&password=test&action=get_live_categories
http://127.0.0.1:8081/player_api.php?username=test&password=test&action=get_vod_categories
http://127.0.0.1:8081/player_api.php?username=test&password=test&action=get_series_categories
http://127.0.0.1:8081/player_api.php?username=test&password=test&action=get_live_streams
http://127.0.0.1:8081/player_api.php?username=test&password=test&action=get_vod_streams
http://127.0.0.1:8081/player_api.php?username=test&password=test&action=get_series
http://127.0.0.1:8081/player_api.php?username=test&password=test&action=get_series_info
http://127.0.0.1:8081/player_api.php?username=test&password=test&action=get_vod_info
http://127.0.0.1:8081/player_api.php?username=test&password=test&action=get_short_epg&stream_id=1984029872
http://127.0.0.1:8081/player_api.php?username=test&password=test&action=get_simple_data_table

Stream live content

http://127.0.0.1:8081/live/test/test/1594066936.m3u8
http://127.0.0.1:8081/live/test/test/1594066936.ts

Where 1594066936 is the ID of the media to stream

Stream vod content

http://127.0.0.1:8081/movie/test/test/7511585546.mkv

Not supported

  • tmdb cannot be provided
  • video and audio information cannot be provided
  • cover_big and movie_image are same

Additional link/features supported by this server (And not officially supported by XTreamCode)

  • username= password= can be replace by u= p= (Kind of shortcut)
  • m3u playlist can be filter:
http://127.0.0.1:8081/get.php?u=test&p=test&filter=serie
http://127.0.0.1:8081/get.php?u=test&p=test&filter=vod
http://127.0.0.1:8081/get.php?u=test&p=test&filter=live
http://127.0.0.1:8081/get.php?u=test&p=test&category_id=1111

Documentation

https://xtream-ui.org/api-xtreamui-xtreamcode/

About

XtreamCode Server python library - Add ability to create an XTreamCode server in python

Topics

pythonserverxtreamcode

Resources

Readme
MIT license
Activity

Stars

8 stars

Watchers

2 watching

Forks

2 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.