martinbjeldbak / acestream-http-proxy

Stream AceStream sources on macOS and other systems without needing to install AceStream player
https://hub.docker.com/r/martinbjeldbak/acestream-http-proxy
33 stars 8 forks source link

Compatibility TVHeadend #27

Closed Euskalgaming closed 2 months ago

Euskalgaming commented 2 months ago

There are no problems playing these links with vlc. But I was wondering if there is a way to add them to tvheadend.

iercan commented 2 months ago

@Euskalgaming I've included pychromecast in the image here but haven't had the chance to test it. Could you try it out and let me know if it works?

martinbjeldbak commented 2 months ago

Hi @Euskalgaming I'm also unable to test this, can you try pulling down a release candidate image we just pushed to see if this enables the feature?

Something like this should work:

docker run -t -p 6878:6878 ghcr.io/martinbjeldbak/acestream-http-proxy:2.4.0-rc.1
Euskalgaming commented 2 months ago

Hola@EuskalgamingTampoco puedo probar esto, ¿puedes intentar descargar una imagen candidata a lanzamiento que acabamos de enviar para ver si esto habilita la función?

Algo como esto debería funcionar:

docker run -t -p 6878:6878 ghcr.io/martinbjeldbak/acestream-http-proxy:2.4.0-rc.1

no problem, I'm going to try it and comment

Euskalgaming commented 2 months ago

It works fine. I leave you here the log that it generates, the pychrome error is removed.

2024-09-02 15:17:29,583|MainThread|acestream|init segmenter done: log_path=/root/.ACEStream/logs/segmenter.log 2024-09-02 15:17:29,584|MainThread|acestream|Start Ace Stream 3.2.3 2024-09-02 15:17:29,584|MainThread|acestream|platform=linux 2024-09-02 15:17:29,584|MainThread|acestream|app=acestream 2024-09-02 15:17:29,584|MainThread|acestream|version=3.2.3 code=3020300 revision=be4471a date=2024-04-22 2024-09-02 15:17:29,584|MainThread|acestream|use_local_db=True 2024-09-02 15:17:29,584|MainThread|acestream|is_gui_mode=0 2024-09-02 15:17:29,584|MainThread|acestream|user_agent=Mozilla/5.0 (Linux) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.50 Safari/537.36 AceStream/3.2.3 2024-09-02 15:17:29,584|MainThread|acestream|python_version=3.10.12-final-0 2024-09-02 15:17:29,585|MainThread|acestream|enable debug: 0 2024-09-02 15:17:29,585|MainThread|acestream|set debug level: 0 2024-09-02 15:17:29,590|MainThread|acestream.coreapp|pid=10 2024-09-02 15:17:29,590|MainThread|acestream.coreapp|process monitor initialized 2024-09-02 15:17:29,591|MainThread|acestream|get_default_api_version: 2 2024-09-02 15:17:29,591|MainThread|acestream.coreapp|use fixed i2i_port: 62062 2024-09-02 15:17:29,592|MainThread|acestream.coreapp|state_dir='/root/.ACEStream' 2024-09-02 15:17:29,700|MainThread|acestream.coreapp|set_debug_from_ui: level=0 2024-09-02 15:17:29,701|MainThread|acestream|enable debug: 0 2024-09-02 15:17:29,701|MainThread|acestream|set debug level: 0 2024-09-02 15:17:29,716|MainThread|acestream.SocketHandler.InterruptSocket|bound on 127.0.0.1:50077 2024-09-02 15:17:29,716|MainThread|acestream.SocketHandler.SocketHandler|bind: socket bound: host=0.0.0.0 port=8621 2024-09-02 15:17:29,716|MainThread|acestream.LM|listen on 8621 2024-09-02 15:17:29,786|MainThread|acestream.httpserver|start: addr= port=6878 allow_remote=1 allow_intranet=1 2024-09-02 15:17:29,786|MainThread|acestream.httpserver|start: bound on ('0.0.0.0', 6878) 2024-09-02 15:17:29,844|MainThread|acestream.SocketHandler.InterruptSocket|bound on 127.0.0.1:52595 2024-09-02 15:17:29,844|MainThread|acestream.SocketHandler.SocketHandler|bind: socket bound: host=0.0.0.0 port=62062 2024-09-02 15:17:29,845|Instance2InstanceThread-31|acestream.APIServer|run: ready to receive remote commands on 62062 2024-09-02 15:17:29,845|PlaylistTaskManagerThread-32 (_run)|acestream.TaskManager|started

Euskalgaming commented 2 months ago

Regarding the post, I use streamlink and tvhlink to export muxed to a tvheadend server.

Mpeg-ts links don't seem to work with streamlink.

root@jellyfin:~# streamlink http://127.0.0.1:6878/ace/getstream?id=cc9b7f5fe416069a2110da0909b0f915043c468b [cli][info] streamlink is running as root! Be careful! error: No plugin can handle URL: http://127.0.0.1:6878/ace/getstream?id=cc9b7f5fe416069a2110da0909b0f915043c468b

However, streamlink is able to read hls.

root@jellyfin:~# streamlink http://127.0.0.1:6878/ace/manifest.m3u8?id=cc9b7f5fe416069a2110da0909b0f915043c468b [cli][info] streamlink is running as root! Be careful! [cli][info] Found matching plugin hls for URL http://127.0.0.1:6878/ace/manifest.m3u8?id=cc9b7f5fe416069a2110da0909b0f915043c468b Available streams: live (worst, best)

But I'm not able to add them to tvheadend

iercan commented 2 months ago

Since there is no error with ace stream engine, our part is complete. Please contact the streamlink team for further assistance.

Euskalgaming commented 2 months ago

I managed to get the proxy working with tvheadend. To be able to add muxes with acestream channels to tvheaend. You have to put the url in the muxes with this structure:

http://(IP acestream-http-proxy installed):6878/ace/manifest.m3u8?id=cc9b7f5fe416069a2110da0909b0f915043c468b&.m3u

Example:

http://168.140.140.30:6878/ace/manifest.m3u8?id=cc9b7f5fe416069a2110da0909b0f915043c468b&.m3u

&.m3u in the end

iercan commented 2 months ago

Glad to hear you made it work. FYI, enabling remote access can pose security risks. I recommend adding a firewall rule to allow only specific IP addresses to access the engine.

Euskalgaming commented 2 months ago

I am seeing that for tvheadend to maintain access to the acestream channels they must be running on the engine. Is there a way to open several channels and leave them open inside the engine? Maybe creating an acestream list?

iercan commented 2 months ago

API have some playlist functions. You can take a look

https://docs.acestream.net/developers/api-reference

Euskalgaming commented 2 months ago

When trying to add channels to the list this happens:

2024-09-04 20:52:09,094|Thread-45 (process_request_thread)|acestream.webui|api error: APIError('webui_playlist_add_item() failed')