pedroSG94 / RTSP-Server

Plugin of rtmp-rtsp-stream-client-java to stream directly to RTSP player.
Apache License 2.0
212 stars 65 forks source link

Feature Request: Display Battery and Timestamp Information in RTSP Stream #133

Open C0sm0cats opened 1 month ago

C0sm0cats commented 1 month ago

Dear Pedro,

I hope this message finds you well. I am currently using the RTSP server from your repository for streaming video from Android devices, and I would like to suggest a feature enhancement.

Would it be possible to implement a feature that allows the display of battery status and the current date and time directly in the RTSP stream? This functionality would be incredibly useful for applications that require real-time monitoring and context alongside the video feed.

Thank you for considering this request. I appreciate the hard work you put into maintaining this project and look forward to any updates.

Best regards

pedroSG94 commented 1 month ago

Hello,

This is already possible using filters. In rootencoder app example you have an Android view filter that allows you to create an XML and send it to stream.

You can use it for this case

C0sm0cats commented 1 month ago

Hello,

I'm currently using the app from this repository CamStreamAndroidToPython to stream video, which utilizes your RTSP server and encoder. However, I have no idea how to implement the feature of adding battery status and timestamp directly into the RTSP stream.

Could you please provide guidance or examples on how to achieve this? Your help would be greatly appreciated!

Thank you!

pedroSG94 commented 1 month ago

You have multiple changes to do in that project. Currently that project is using a texture view in the XML layout and you need to use openglview.

After that, you can set filters like this: https://github.com/pedroSG94/RootEncoder/blob/master/app/src/main/java/com/pedro/streamer/utils/FilterMenu.kt#L309

This filter allows you to set text to stream. This filter is easier to use than the Android view filter and maybe is enough for you.

If you don't know anything about Android programming then you should learn about it or ask the owner for this implementation.

C0sm0cats commented 1 month ago

Thank you so much for your detailed explanation and the references! This definitely puts me on the right track. I’ll try to understand more about the implementation and see how I can make the necessary changes.

Thanks again for your help, I really appreciate it!