Skip to main content
The 2024 Developer Survey results are live! See the results

Questions tagged [android-mediarecorder]

MediaRecorder is the Android class used for recording Audio and Video available since API Level 1.

android-mediarecorder
0 votes
1 answer
21 views

Using Android's MediaRecorder with a Bluetooth Microphone

Problem I am unable to get Android's MediaRecorder to record audio from a connected Bluetooth microphone. Instead audio recordings use the device's inbuilt microphone Question Has anyone found a ...
RatherBeSailing's user avatar
0 votes
1 answer
43 views

MediaRecorder incorrect bitrate in output file?

I'm trying to understand how bitrate works in MediaRecorder I have set for example 192 kbps: MediaRecorder.setAudioEncodingBitRate(192000) but when I retrieve the bitrate from MediaStore (or from any ...
user924's user avatar
  • 11.1k
0 votes
0 answers
63 views

OpenGL + MediaRecorder.VideoEncoder.AV1 - a freezing video (like very low fps)

Android declares that AV1 video encoder is supported for Android 14+ Before I pass frames to MediaRecorder I process them with OpenGL: recorderWindowSurface = WindowSurface(eglCore, recorderSurface, ...
user924's user avatar
  • 11.1k
0 votes
0 answers
38 views

Writing the Android application which can access the camera and create the streaming video instated of storage

i can see some info abut the rtsp server But what i was looking is some mediaCodec API that i can use for my application. So app will open the camera and start streaming, do we have API supported in ...
Mohan's user avatar
  • 1,901
0 votes
1 answer
55 views

MEDIA_RECORDER_INFO_MAX_FILESIZE_APPROACHING not being triggered when using MediaRecorder's setMaxFileSize

The MediaRecorder has an API that lets you automatically chunk the output stream into equally sized files. For that you have to: Call setMaxFileSize before calling prepare with the maximum size that ...
Juan Andrés Diana's user avatar
1 vote
0 answers
324 views

MediaRecorder - java.io.IOException: prepare failed - for 4K resolutions on some devices

So I noticed the following exception on some devices (usually Chinese-brand devices only, especially Realme and Vivo but also Motorola as well and some Samsung devices of A serires) when using 4K ...
user924's user avatar
  • 11.1k
1 vote
1 answer
37 views

How can I record the custom class that is extended from the SurfaceView class?

I'm trying to record my custom class that is extended from the SurfaceView class. I'm using MediaRecorder for the purpose of recording. I'm trying to record my custom class that is extended from the ...
Adnan Aslam's user avatar
0 votes
0 answers
169 views

How do I remove internal mic sound from the mic when recording audio in android studio?

I want to play a sound file and then record the audio coming out of my phone's mic right after, but the sound file keeps getting caught in the actual recording. Currently I'm having to set a 750 ms ...
swaroop bappanad's user avatar
0 votes
1 answer
242 views

MediaRecorder.prepare() keeps failing and throwing an exception

I have the following function below for my start record button to record audio on my Samsung S20 FE: private fun startRecording (button: Button) { recorder = MediaRecorder().apply { ...
swaroop bappanad's user avatar
0 votes
1 answer
211 views

Problem implementation MediaRecorder and Shazam API through RapidApi

I'm currently working on a school project, where I'm creating a sort of clone of Shazam. I'm at the point where I can successfully record audio, and decode it into a base64string, just like the api ...
Thibault Verlinde's user avatar
0 votes
1 answer
374 views

Microphone usage priority / Google Assistant / Navigator app (UI/Background)

So there are some differences how the Android works with microphone for multiple apps: Android 9 https://developer.android.com/guide/topics/media/sharing-audio-input#pre-behavior and https://source....
user924's user avatar
  • 11.1k
0 votes
0 answers
163 views

Cannot change number of audio channels field for mediarecorder

For an application, I'm setting up the MediaRecorder using the following: mediaRecorder.setAudioSource(AudioSource.MIC); mediaRecorder.setVideoSource(VideoSource.SURFACE); CamcorderProfile cpHigh = ...
Matin Kh's user avatar
  • 5,178
4 votes
1 answer
5k views

Deprecated: mediaRecorder = new MediaRecorder();

Running Xlint:deprecated in android studio on my (java) application tells me that mediaRecorder = new MediaRecorder(); is deprecated! What should I do?
dlw's user avatar
  • 275
0 votes
1 answer
134 views

Android media recording and unhandled events

Hi I am using android with java. I have set up a very simple button which when held down records audio and when released stops recording. I have two questions: When I run the following implementation ...
dlw's user avatar
  • 275
1 vote
1 answer
3k views

Audio recording in Android (with kotlin)

I am working on a trial app to do audio recording in Android (with kotlin). Here is the problem I currently hit on the way. In the following code: recordBtn.setOnClickListener { if (...
Michel's user avatar
  • 11.4k

15 30 50 per page
1
2 3 4 5
47