Wajid Posted February 22 Share Posted February 22 We have a use case to read the WebRTC stream from python, is there any specific libraries?. Our objective is to read live stream from python which is required for some AI modules Link to comment Share on other sites More sharing options...
0 lastpeony Posted February 24 Share Posted February 24 https://github.com/chrippa/python-librtmp this can be useful Link to comment Share on other sites More sharing options...
0 Connessione Posted March 4 Share Posted March 4 On 2/22/2023 at 1:02 PM, Wajid said: We have a use case to read the WebRTC stream from python, is there any specific libraries?. Our objective is to read live stream from python which is required for some AI modules You won't be able to read through webrtc because the server assisted webrtc uses special proprietary handshake and other things behind the scene. This is not pure p2p. Your best bet will be to use the plugin architecture and read the stream data through in Java and then pass it to python for processing. Link to comment Share on other sites More sharing options...
0 Wajid Posted March 4 Author Share Posted March 4 1 hour ago, Connessione said: You won't be able to read through webrtc because the server assisted webrtc uses special proprietary handshake and other things behind the scene. This is not pure p2p. Your best bet will be to use the plugin architecture and read the stream data through in Java and then pass it to python for processing. When you say with plugin any idea how to pass the stream from java to python? Link to comment Share on other sites More sharing options...
0 Tim Posted March 6 Share Posted March 6 @Wajid Have you checked the sample plugin here https://github.com/ant-media/Plugins/tree/master/SamplePlugin/src/main/java/io/antmedia/app which has a sample frame listener and sample packet listener which should be able to kickstart what you need? Link to comment Share on other sites More sharing options...
0 Connessione Posted March 6 Share Posted March 6 (edited) On 3/4/2023 at 12:22 PM, Wajid said: When you say with plugin any idea how to pass the stream from java to python? So as pointed by tim you use framelistener to capture data from java then pass it to python by serialising or through a socket service. If you search on the internet i am sure you will find some examples of sharing data between python and Java. Edited March 6 by Connessione 1 Link to comment Share on other sites More sharing options...
0 lastpeony Posted March 7 Share Posted March 7 sounds like you need to do interprocess communication between java process and python process. https://jj09.net/interprocess-communication-python-java/ 1 Link to comment Share on other sites More sharing options...
Question
Wajid
We have a use case to read the WebRTC stream from python, is there any specific libraries?. Our objective is to read live stream from python which is required for some AI modules
Link to comment
Share on other sites
Top Posters For This Question
2
2
2
1
Popular Days
Mar 4
2
Mar 6
2
Mar 7
1
Feb 22
1
Top Posters For This Question
Connessione 2 posts
lastpeony 2 posts
Wajid 2 posts
Tim 1 post
Popular Days
Mar 4 2023
2 posts
Mar 6 2023
2 posts
Mar 7 2023
1 post
Feb 22 2023
1 post
Popular Posts
Connessione
So as pointed by tim you use framelistener to capture data from java then pass it to python by serialising or through a socket service. If you search on the internet i am sure you will find some
lastpeony
sounds like you need to do interprocess communication between java process and python process. https://jj09.net/interprocess-communication-python-java/
6 answers to this question
Recommended Posts