Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

implement python lib for decode and display the video #425

Open
eaphone opened this issue Mar 1, 2024 · 2 comments
Open

implement python lib for decode and display the video #425

eaphone opened this issue Mar 1, 2024 · 2 comments

Comments

@eaphone
Copy link

eaphone commented Mar 1, 2024

hi, this project is awesome with its low latency.
i am wondering if it is possible to use python to decode and display the video stream locally instead of using js(web)

do you have any idea or suggestion?

@eaphone
Copy link
Author

eaphone commented Mar 1, 2024

i am using the whole project for showing the stream at web.
additionally, i also want to display the streaming with python to integrate with my exist python automation script.
my python script is able to communicate to the websocket-relay server and got raw stream data. however, i got trouble at decoding the stream.

@phoboslab
Copy link
Owner

I don't write much python, but I believe you could use pl_mpeg via FFI in python to decode the video and audio packets.

pl_mpeg doesn't come with an MPEG-TS demuxer (only MPEG-PS), so you'd have to write this part yourself. The MPEG-TS demuxer here is only 200 lines; TS shitty format, but not too complicated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants