switching between displayService and rtspFromFile with continuous timestamp
Hi, pedro
I am doing a rtsp stream with audio streaming continuously, but the video stream will switch between displayService and rtspFromFile.
I found that the timestamp of the video frame is not align with the audio stream causing ffmpeg to drop most of the video frame (ffmpeg_log.txt). Because when the rtspFromFile stream start the timestamp seems to start from beginning, also when switch back to displayService, the timestamp seems to recount. May i know if there is a way to make the timestamp continuous no matter doing any switching?
Here is how I write the switching ( code.txt ). It would be grateful if you could give a hand. Many thanks in advance.
Hello,
This is the expected behavior. You can do a little trick for it. You can use a SurfaceFilterRender reproducing a video instead of use rtspFromFile. To avoid see that display screen, you can use BlackFilterRender and then SurfaceFilterRender (2 filters). This way you will hide display screen.
But is this way the displayService screen capture is not stop? can I stop the screen capture part and then apply the filter
I mean stopping this if (mediaProjection != null) { mediaProjection.stop(); mediaProjection = null; }
Hello,
No, the screen capture is not stopped but you haven't other way to do it for now. Visually you haven't problems this way
ic and thank you for your response