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

Is there any code sample to use it with android audio recording and broadcast to RTSP server #1456

Open
rescue1155 opened this issue Apr 16, 2024 · 1 comment

Comments

@rescue1155
Copy link

Hey there,

Is there any code sample in JAVA
to use it with android audio recording and broadcast to RTSP server ?

thanks

@pedroSG94
Copy link
Owner

pedroSG94 commented Apr 16, 2024

Hello,

If you only want audio you can try this way:

        int bitrate = 128 * 1000;
        int samplerate = 44100;
        boolean isStereo = true;
        RtspOnlyAudio rtspOnlyAudio = new RtspOnlyAudio(connectChecker);
       //start stream
        if (rtspOnlyAudio.prepareAudio(bitrate, samplerate, isStereo)) {
            rtspOnlyAudio.startStream(url);
        }
       //stop stream
        rtspOnlyAudio.stopStream();

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