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

Streaming from WIFI Camera #123

Open
mariomoureperez opened this issue Jul 10, 2024 · 3 comments
Open

Streaming from WIFI Camera #123

mariomoureperez opened this issue Jul 10, 2024 · 3 comments

Comments

@mariomoureperez
Copy link

Hello, I currently have a WIFI camera that I connect to my app and display its content on a SurfaceView.

Is there any way to create an RTSP server to stream the content of the SurfaceView instead of the camera's feed?

App Purpose: Any device on the same network as the smartphone should be able to view what is displayed on my SurfaceView via rtsp://ip-smartphone/

Thanks

@pedroSG94
Copy link
Owner

pedroSG94 commented Jul 10, 2024

Hello,

Yes, this is possible but no directly your SurfaceView.
You need use RtspServerStream class, create a new VideoSource and bind your library used to render that SurfaceView in the VideoSource.

To do it I recommend you read this related posts (the concept is the same but instead of use an external usb camera library you are using a library that get the stream from a rtsp ip):
#121
#110

If you need more help I will need know the way you connect that rtsp stream with your SurfaceView

@mariomoureperez
Copy link
Author

Thank you for the quick response,

If what you suggested doesn't work, could I stream my smartphone screen instead?

I saw that there is a similar issue, #111, but the example link https://github.com/pedroSG94/RootEncoder/tree/master/app/src/main/java/com/pedro/streamer/displayexample is no longer available.

@pedroSG94
Copy link
Owner

This is the updated link:
https://github.com/pedroSG94/RootEncoder/tree/master/app/src/main/java/com/pedro/streamer/screen
You only need replace GenericStream with RtspServerStream and use startStream method without url

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