No simultaneous playback of 2 streams on archlinux and acestream 3.1.75rc4

Hello

On Archlinux, fully updated on 2023-06-06, with kernel 6.3.5-arch1-1 and acestream engine 3.1.75rc4 (acestream_3.1.75rc4_ubuntu_18.04_x86_64_py3.8.tar.gz), I cannot play 2 or more streams at the same time. As soon as I start playback of second stream, the first one stops being cached immediately and playback stops as soon as cache is empty. This happens in any combination of playback streams, either in Chrome or externaly with MPV player, in any starting order, the second stream always kills the first one. Single stream playback is flawless, everlasting with good speed and no pauses.

I have tested on same machine, in VirtualBOX, with host the same Archlinux and guest a Windows 11 x86_64 machine and latest Acestream Media for Windows. Multiple streams playback is flawless.

Is there such a limitation in this python3 rc4 version of acestream for linux?
Is there a way to overcome this?

I provide below config and logs of an example case where I initiate playback of the first stream on https://dvb-p.com and after a while the second stream with MPV player in a terminal.

Thank you in advance.

acestream.conf

–port
8621
–api-port
62062
–http-port
6878
–bind-all
–state-dir
~/.ACEStream
–login
xxxxxxxx
–password
xxxxxxxx
–client-console
–log-file
/opt/acestream/acestream.log
–log-file-mode
w
–log-debug
355
–debug-sentry
–max-file-size
2147483648
–live-cache-type
memory
–vod-cache-type
memory
–vod-drop-max-age
120
–live-buffer
25
–vod-buffer
10
–max-connections
500
–max-peers
50
–max-peers-limit
100
–max-upload-slots
10
–download-limit
0
–upload-limit
0
–stats-report-interval
1
–stats-report-peers
–slots-manager-use-cpu-limit
1
–core-dlr-periodic-check-interval
5
–check-live-pos-interval
5
–refill-buffer-interval
1
–core-skip-have-before-playback-pos
1
–webrtc-allow-outgoing-connections
1

acestream.log

2023-06-07 09:15:32,834|MainThread|acestream|init segmenter done: log_path=/home/acestream/.ACEStream/logs/segmenter.log
2023-06-07 09:15:32,835|MainThread|acestream|Start Ace Stream 3.1.75rc4
2023-06-07 09:15:32,835|MainThread|acestream|platform=linux
2023-06-07 09:15:32,835|MainThread|acestream|app=acestream
2023-06-07 09:15:32,835|MainThread|acestream|version=3.1.75rc4 code=3017500 revision=d7429ec date=2022-10-19
2023-06-07 09:15:32,835|MainThread|acestream|use_local_db=True
2023-06-07 09:15:32,835|MainThread|acestream|use_m2crypto=False
2023-06-07 09:15:32,835|MainThread|acestream|is_gui_mode=0
2023-06-07 09:15:32,835|MainThread|acestream|user_agent=Mozilla/5.0 (Linux) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.50 Safari/537.36 AceStream/3.1.75rc4
2023-06-07 09:15:32,835|MainThread|acestream|python_version=3.8.16-final-0
2023-06-07 09:15:32,835|MainThread|acestream|enable debug: 355
2023-06-07 09:15:32,835|MainThread|acestream|set debug level: 355
2023-06-07 09:15:32,839|MainThread|acestream.coreapp|pid=933239
2023-06-07 09:15:32,839|MainThread|acestream.coreapp|process monitor initialized
2023-06-07 09:15:32,839|MainThread|acestream|get_default_api_version: 2
2023-06-07 09:15:32,991|MainThread|acestream.utils|ensure_dir_writable: error: CannotCreateDirError(PermissionError(13, ‘Permission denied’))
2023-06-07 09:15:32,991|MainThread|acestream.coreapp|state_dir=‘/home/acestream/.ACEStream’
2023-06-07 09:15:33,263|MainThread|acestream.SocketHandler.InterruptSocket|bound on 127.0.0.1:42422
2023-06-07 09:15:33,263|MainThread|acestream.SocketHandler.SocketHandler|bind: socket bound: host=0.0.0.0 port=8621
2023-06-07 09:15:33,263|MainThread|acestream.LM|listen on 8621
2023-06-07 09:15:33,291|Thread-19|acestream.upnp|start __retry_discover()
2023-06-07 09:15:33,295|MainThread|acestream.VideoServer|start: addr= port=6878 allow_remote=1 allow_intranet=1
2023-06-07 09:15:33,309|MainThread|acestream.SocketHandler.InterruptSocket|bound on 127.0.0.1:38957
2023-06-07 09:15:33,310|MainThread|acestream.SocketHandler.SocketHandler|bind: socket bound: host=0.0.0.0 port=62062
2023-06-07 09:15:33,310|Instance2InstanceThread-31|acestream.APIServer|run: ready to receive remote commands on 62062
2023-06-07 09:15:33,310|PlaylistTaskManagerThread-32|acestream.TaskManager|started
2023-06-07 09:15:33,310|PlaylistTaskManagerThread-32|acestream.PlaylistLoadTask|load_playlist: file not found: /home/acestream/.ACEStream/playlist.pickle
2023-06-07 09:15:33,356|PlaylistTaskManagerThread-32|acestream.SyncDataTask|run now
2023-06-07 09:15:33,356|PlaylistTaskManagerThread-32|acestream.SyncDataTask|next run in 3600 seconds
2023-06-07 09:15:41,298|Thread-19|acestream.upnp|Unable to create Port Forward. Error:Success
2023-06-07 09:16:18,893|Timer-Thread-95|acestream.coreapp|update_broadcast_status: fix next report time: seconds_to_next_update=3553.9459035396576 wanted_next=1686122132.8393052 cur_next=1686204965.5133505

segmenter.log

2023-06-07 06:16:10: 0: start segmenter: version=2.7 type=0 input= segment_filename=/home/acestream/.ACEStream/.acestream_cache/_hls_2605c201c8c9cf6684ee1de562d3b4c7e17ac915/%d.ts manifest_path=/home/acestream/.ACEStream/.acestream_cache/_hls_2605c201c8c9cf6684ee1de562d3b4c7e17ac915/index.m3u8 baseurl=/ace/c/2605c201c8c9cf6684ee1de562d3b4c7e17ac915/ seek_ts=0 start_sequence=0 chunk_duration=5 max_segments=18 transcode_audio=1 transcode_mp3=1 transcode_ac3=0 preferred_audio_language=eng

2023-06-07 06:16:10: 0: set analyze duration: 20000000
2023-06-07 06:16:10: 0: avio_seek_func: offset=0 whence=0
2023-06-07 06:16:10: 0: avio_seek_func: missing seek func
2023-06-07 06:16:10: [mpegts @ 0x7f0ea800ab00] Unable to seek back to the start
2023-06-07 06:16:10: [h264 @ 0x7f0ea8008180] non-existing PPS 0 referenced
2023-06-07 06:16:10: [h264 @ 0x7f0ea8008180] non-existing PPS 0 referenced
2023-06-07 06:16:10: [h264 @ 0x7f0ea8008180] decode_slice_header error
2023-06-07 06:16:10: [h264 @ 0x7f0ea8008180] no frame!
2023-06-07 06:16:10: [h264 @ 0x7f0ea8008180] non-existing PPS 0 referenced
2023-06-07 06:16:10: [h264 @ 0x7f0ea8008180] non-existing PPS 0 referenced
2023-06-07 06:16:10: [h264 @ 0x7f0ea8008180] decode_slice_header error
2023-06-07 06:16:10: [h264 @ 0x7f0ea8008180] no frame!
2023-06-07 06:16:10: [h264 @ 0x7f0ea8008180] non-existing PPS 0 referenced
2023-06-07 06:16:10: [h264 @ 0x7f0ea8008180] non-existing PPS 0 referenced
2023-06-07 06:16:10: [h264 @ 0x7f0ea8008180] decode_slice_header error
2023-06-07 06:16:10: [h264 @ 0x7f0ea8008180] no frame!
2023-06-07 06:16:10: [h264 @ 0x7f0ea8008180] non-existing PPS 0 referenced
2023-06-07 06:16:10: [h264 @ 0x7f0ea8008180] non-existing PPS 0 referenced
2023-06-07 06:16:10: [h264 @ 0x7f0ea8008180] decode_slice_header error
2023-06-07 06:16:10: [h264 @ 0x7f0ea8008180] no frame!
2023-06-07 06:16:10: [h264 @ 0x7f0ea8008180] non-existing PPS 0 referenced
2023-06-07 06:16:10: [h264 @ 0x7f0ea8008180] non-existing PPS 0 referenced
2023-06-07 06:16:10: [h264 @ 0x7f0ea8008180] decode_slice_header error
2023-06-07 06:16:10: [h264 @ 0x7f0ea8008180] no frame!
2023-06-07 06:16:10: 0: avio_seek_func: offset=0 whence=65536
2023-06-07 06:16:10: 0: avio_seek_func: missing seek func
2023-06-07 06:16:10: 0: avio_seek_func: offset=-1 whence=2
2023-06-07 06:16:10: 0: avio_seek_func: missing seek func
2023-06-07 06:16:10: 0: avio_seek_func: offset=0 whence=65536
2023-06-07 06:16:10: 0: avio_seek_func: missing seek func
2023-06-07 06:16:10: 0: avio_seek_func: offset=-1 whence=2
2023-06-07 06:16:10: 0: avio_seek_func: missing seek func
2023-06-07 06:16:10: Input #0, mpegts, from ‘input’:
Duration: N/A, start: 61374.490244, bitrate: N/A
Program 1
Metadata:
service_name : BT SPORTS ESPN HD UK
service_provider: FFmpeg
Stream #0:0[0x100]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(progressive), 1920x1080 [SAR 1:1 DAR 16:9], 50 fps, 50 tbr, 90k tbn, 100 tbc
Stream #0:10x101: Audio: aac (HE-AAC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 96 kb/s
2023-06-07 06:16:10: 0: init: ic.name=mpegts duration=-9223372036854
2023-06-07 06:16:10: 0: got video stream: 0->0 codec=27
2023-06-07 06:16:10: 0: got audio stream: 1->1 codec=86018
2023-06-07 06:16:10: 0: lang=eng
2023-06-07 06:16:10: 0: stream map: 0->0
2023-06-07 06:16:10: 0: stream map: 1->1
2023-06-07 06:16:10: 0: on_media_info: container=mpegts duration=-2077252342 bitrate=0 nb_streams=2
2023-06-07 06:16:10: 0: hls_mux_init: map: 0->0
2023-06-07 06:16:10: 0: hls_mux_init: map: 1->1
2023-06-07 06:16:10: Output #0, mpegts, to ‘output’:
Stream #0:0: Unknown: none
Stream #0:1: Unknown: none
2023-06-07 06:16:10: [mpegts @ 0x7f0ea80af780] Using AVStream.codec to pass codec parameters to muxers is deprecated, use AVStream.codecpar instead.
2023-06-07 06:16:10: [mpegts @ 0x7f0ea80af780] Using AVStream.codec to pass codec parameters to muxers is deprecated, use AVStream.codecpar instead.
2023-06-07 06:16:10: 0: segment created: seq=0 duration=5.08
2023-06-07 06:16:11: 0: segment created: seq=1 duration=6.02
2023-06-07 06:16:11: 0: segment created: seq=2 duration=4.02
2023-06-07 06:16:12: 0: segment created: seq=3 duration=6.00
2023-06-07 06:16:12: 0: segment created: seq=4 duration=4.02
2023-06-07 06:16:13: 0: segment created: seq=5 duration=6.02
2023-06-07 06:16:14: 0: segment created: seq=6 duration=4.00
2023-06-07 06:16:15: 0: segment created: seq=7 duration=6.00
2023-06-07 06:16:19: 0: segment created: seq=8 duration=4.02
2023-06-07 06:16:25: 0: segment created: seq=9 duration=6.00
2023-06-07 06:16:25: Invalid return value 0 for stream protocol
2023-06-07 06:16:25: [mpegts @ 0x7f0ea800ab00] PES packet size mismatch
[mpegts @ 0x7f0ea800ab00] Packet corrupt (stream = 0, dts = 5528369722)2023-06-07 06:16:25: .
2023-06-07 06:16:25: 0: got stop flag
2023-06-07 06:16:25: 0: segment created: seq=10 duration=0.72
2023-06-07 06:16:25: 0: segmenter.run() finished
2023-06-07 06:16:25: 0: on_finished: ret=0
2023-06-07 06:17:11: 1: start segmenter: version=2.7 type=0 input= segment_filename=/home/acestream/.ACEStream/.acestream_cache/_hls_19c5c13a8e7273d78d53fdaea3deaf1b80e938fa/%d.ts manifest_path=/home/acestream/.ACEStream/.acestream_cache/_hls_19c5c13a8e7273d78d53fdaea3deaf1b80e938fa/index.m3u8 baseurl=/ace/c/19c5c13a8e7273d78d53fdaea3deaf1b80e938fa/ seek_ts=0 start_sequence=0 chunk_duration=5 max_segments=21 transcode_audio=1 transcode_mp3=1 transcode_ac3=0 preferred_audio_language=eng

2023-06-07 06:17:11: 1: set analyze duration: 20000000

2023-06-07 06:17:11: [h264 @ 0x7f0e94006800] non-existing PPS 0 referenced
2023-06-07 06:17:11: [h264 @ 0x7f0e94006800] non-existing PPS 0 referenced
2023-06-07 06:17:11: [h264 @ 0x7f0e94006800] decode_slice_header error
2023-06-07 06:17:11: [h264 @ 0x7f0e94006800] no frame!
2023-06-07 06:17:11: [h264 @ 0x7f0e94006800] non-existing PPS 0 referenced
2023-06-07 06:17:11: [h264 @ 0x7f0e94006800] non-existing PPS 0 referenced
2023-06-07 06:17:11: [h264 @ 0x7f0e94006800] decode_slice_header error
2023-06-07 06:17:11: [h264 @ 0x7f0e94006800] no frame!
2023-06-07 06:17:11: [h264 @ 0x7f0e94006800] non-existing PPS 0 referenced
2023-06-07 06:17:11: [h264 @ 0x7f0e94006800] non-existing PPS 0 referenced
2023-06-07 06:17:11: [h264 @ 0x7f0e94006800] decode_slice_header error
2023-06-07 06:17:11: [h264 @ 0x7f0e94006800] no frame!
2023-06-07 06:17:11: [h264 @ 0x7f0e94006800] non-existing PPS 0 referenced
2023-06-07 06:17:11: [h264 @ 0x7f0e94006800] non-existing PPS 0 referenced
2023-06-07 06:17:11: [h264 @ 0x7f0e94006800] decode_slice_header error
2023-06-07 06:17:11: [h264 @ 0x7f0e94006800] no frame!
2023-06-07 06:17:11: 1: avio_seek_func: offset=0 whence=65536
2023-06-07 06:17:11: 1: avio_seek_func: missing seek func
2023-06-07 06:17:11: 1: avio_seek_func: offset=-1 whence=2
2023-06-07 06:17:11: 1: avio_seek_func: missing seek func
2023-06-07 06:17:11: 1: avio_seek_func: offset=0 whence=65536
2023-06-07 06:17:11: 1: avio_seek_func: missing seek func
2023-06-07 06:17:11: 1: avio_seek_func: offset=-1 whence=2
2023-06-07 06:17:11: 1: avio_seek_func: missing seek func
2023-06-07 06:17:11: Input #0, mpegts, from ‘input’:
Duration: N/A, start: 78868.380267, bitrate: N/A
Program 1
Metadata:
service_name : BT Sports 1 HD UK
service_provider: FFmpeg
Stream #0:0[0x100]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(progressive), 1920x1080 [SAR 1:1 DAR 16:9], 50 tbr, 90k tbn, 100 tbc
Stream #0:1[0x101]: Audio: aac (HE-AAC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 96 kb/s
2023-06-07 06:17:11: 1: init: ic.name=mpegts duration=-9223372036854
2023-06-07 06:17:11: 1: got video stream: 0->0 codec=27
2023-06-07 06:17:11: 1: got audio stream: 1->1 codec=86018
2023-06-07 06:17:11: 1: stream map: 0->0
2023-06-07 06:17:11: 1: stream map: 1->1
2023-06-07 06:17:11: 1: on_media_info: container=mpegts duration=-2077252342 bitrate=0 nb_streams=2
2023-06-07 06:17:11: 1: hls_mux_init: map: 0->0
2023-06-07 06:17:11: 1: hls_mux_init: map: 1->1
2023-06-07 06:17:11: Output #0, mpegts, to ‘output’:
Stream #0:0: Unknown: none
Stream #0:1: Unknown: none
2023-06-07 06:17:11: [mpegts @ 0x7f0e94040a80] Using AVStream.codec to pass codec parameters to muxers is deprecated, use AVStream.codecpar instead.
2023-06-07 06:17:11: [mpegts @ 0x7f0e94040a80] Using AVStream.codec to pass codec parameters to muxers is deprecated, use AVStream.codecpar instead.
2023-06-07 06:17:12: 1: segment created: seq=0 duration=6.58
2023-06-07 06:17:13: 1: segment created: seq=1 duration=4.01
2023-06-07 06:17:14: 1: segment created: seq=2 duration=6.02
2023-06-07 06:17:14: 1: segment created: seq=3 duration=4.01
2023-06-07 06:17:15: 1: segment created: seq=4 duration=6.01
2023-06-07 06:17:16: 1: segment created: seq=5 duration=4.01
2023-06-07 06:17:16: 1: segment created: seq=6 duration=6.02
2023-06-07 06:17:20: 1: segment created: seq=7 duration=4.01
2023-06-07 06:17:26: 1: segment created: seq=8 duration=6.01
2023-06-07 06:17:30: 1: segment created: seq=9 duration=4.01
2023-06-07 06:17:36: 1: segment created: seq=10 duration=6.02
2023-06-07 06:17:40: 1: segment created: seq=11 duration=4.01
2023-06-07 06:17:43: 1: segment created: seq=12 duration=4.39

Did you try to manually add PID (Engine HTTP API - Ace Stream Wiki) to the end of stream link?
For example, for one stream link may looks like
http://127.0.0.1:6878/ace/getstream?infohash=5e3491cf68d2f282ff6a55414f0d89fc6858de3b&pid=1
for another
http://127.0.0.1:6878/ace/getstream?infohash=349c5fea2c405d955d8eba863b3d0b852390894d&pid=2

1 лайк

I red the Wiki but do not know how to do this with acestream.

I start the acestream engine

/opt/acestream/acestreamengine --client-console @/opt/acestream/acestream.conf

MPV is using the acestream protocol handler

/home/$USER/.config/mpv/scripts/mpv-acestream.lua

I start MPV

mpv acestream://<acestream_id>

I have also confgiured xdg so that chrome automatically opens acestream links with MPV.

Your post led me to the solution, thank you.

I needed acestream-launcher package to handle the http server.
Also the python script playstream.py from docker-acestream-server can be used instead

GitHub - magnetikonline/docker-acestream-server: Ace Stream server Docker image and playback CLI for media players.

I then had to update xdg not to call MPV directly but via any of the above scripts.

Was glad to help you sort it out.
Also you can try this shell-script for launching different AceStream streams in any player (edit “player” and “proxy” variables for your needs) - https://forum.acestream.media/uploads/short-url/ib06P3GZrxzyFMh9xML9t65KKXC.sh

1 лайк

@rvf16g 3.1.75rc4 is for python 3.8

Arch upstream has python 3.11. Even if you resolved, for a more stable experience it’s better if you install python38 from AUR (and related needed modules installed manually).

id is deprecated, use content_id

See documentation.

Mod note: “id” now is alias for “content_id” (legacy reasons mostly), but thanks anyway, script has been updated.

I have same problem. I try to add pid, but it’s not working.
Anyone knows how can i solve the problem??
Im using ubuntu 18.04