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

switching between displayService and rtspFromFile with continuous timestamp #1357

Open
lchy12345 opened this issue Dec 1, 2023 · 4 comments

Comments

@lchy12345
Copy link

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.

@pedroSG94
Copy link
Owner

pedroSG94 commented Dec 1, 2023

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.

@lchy12345
Copy link
Author

lchy12345 commented Dec 1, 2023

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;
}

@pedroSG94
Copy link
Owner

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

@lchy12345
Copy link
Author

ic and thank you for your response

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