android-mediarecorder

Keeping preview callback while recording video?

ⅰ亾dé卋堺 提交于 2019-12-03 06:25:54
问题 I'm currently using onPreviewCallback so I can capture frames from camera when in preview and stream them via http. That works but then I issue a command to start recording and, it seems, I do not have a preview callback anymore. So, how do I keep the preview callback so I can both send the frames from the surface to my server AND record the video on the device? 回答1: I didn't work for quite long time with Android Camera. However, as I remember 1) onPreviewCallback isn't called while you are

Call recording - make it work on Nexus 5X (rooting or custom ROM possible)

依然范特西╮ 提交于 2019-12-03 04:16:30
I'm attempting to use AudioRecord with AudioSource.VOICE_DOWNLINK on Nexus 5X, Android 7.1 (my own build from AOSP). I'm already past the permissions stage - moved my APK to privileged apps, made an adjustment to AudioRecord in Android source to stop throwing an exception about this source. Now I'm getting empty recording buffers during a phone call. I know that there are a lot of call recording apps, and they work on other devices. I've also seen certain apps that can perform some hack on a rooted N5 and make it work. I wish to achieve the same on Nexus 5X - ANY adjustment is OK for me,

Record with high volume in android

旧街凉风 提交于 2019-12-03 03:42:06
I am doing audio recording using MediaRecorder, but unfortunately when I playback the recorded audio, I have media with a very low volume. I don't hear anything (almost anything). Is there any possibility to increase recording volume? Like setVolume() when we record? I try to see in MediaRecorder API but i can't find setVolume or something like that.. Is there any work around? Thanks. Well after some r&d and googling i found is there is no specific volume for mic. when you are recording that takes media volume as mic volume. So to set it, Goto Settings->Sound->Volume-> and check Media volume.

Low performance when execute eglSwapBuffer and eglMakeCurrent

独自空忆成欢 提交于 2019-12-03 03:00:09
I'm developing an Android Unity Plugin that allows user to record his/her gameplay Overview of my solution: Using OpenGl FrameBufferObject (FBO) to make Unity render offscreen to this FBO Get the offscreen texture of this FBO then using for 2 purposes: Render to video surface Redraw to device screen Execute flow per frame: bind my FBO render scene to FBO (Unity code) unbind my FBO set up video surface configure surface size (execute first time only) save egl state make video surface current draw to video surface using offscreen texture of my FBO restore to default surface set presentation time

Is It Possible to Record Audio Through Android Emulator?

不打扰是莪最后的温柔 提交于 2019-12-02 16:11:20
问题 I am Working On a Medical Project and the app can able to record the conversation between doctor and patient and send it for Transcription. Assignment : Basically App is for Recording and Playing the recorded audio. Problem : When ever recording starts, it records 10-20 seconds after that LogCat Shows: 05-07 11:42:52.502: W/MediaProfiles(6321): could not find media config xml file 05-07 11:42:52.522: I/MPEG4Writer(6321): limits: 2147483647/0 bytes/us, bit rate: 12200 bps and the estimated

Android video recording - IllegalStateException on mediaRecorder.start

我与影子孤独终老i 提交于 2019-12-02 06:00:09
问题 I am following the tutorial on https://developer.android.com/guide/topics/media/camera.html#capture-video As such I follow the below order when trying to start the camera: Camera.open camera.unlock mediaRecorder.setCamera mediaRecorder.setAudioSource mediaRecorder.setVideoSource mediaRecorder.setProfile mediaRecorder.setOutputFile mediaRecorder.prepare mediaRecorder.start <- this is where I get the IllegalStateException I can figure out what could be going wrong since I'm following the guide,

Android video recording - IllegalStateException on mediaRecorder.start

拟墨画扇 提交于 2019-12-01 22:48:55
I am following the tutorial on https://developer.android.com/guide/topics/media/camera.html#capture-video As such I follow the below order when trying to start the camera: Camera.open camera.unlock mediaRecorder.setCamera mediaRecorder.setAudioSource mediaRecorder.setVideoSource mediaRecorder.setProfile mediaRecorder.setOutputFile mediaRecorder.prepare mediaRecorder.start <- this is where I get the IllegalStateException I can figure out what could be going wrong since I'm following the guide, running 5.0.2 private Camera mCamera; private MediaRecorder mMediaRecorder; public CameraActivity() {

Recording the tapped button with the audio

假如想象 提交于 2019-12-01 11:57:17
I am creating an instrument. I want that the record button can record the audio and what was tapped. But when I tap the record button, it only record the audio. I want to record the audio and what was tapped by the user. Here it my code for record. public void startRecord() throws Exception { record = new MediaRecorder(); record.setAudioSource(MediaRecorder.AudioSource.MIC); record.setOutputFormat(MediaRecorder.OutputFormat.THREE_GPP); record.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB); record.setOutputFile(FILE); record.prepare(); record.start(); } 来源: https://stackoverflow.com

How to change MediaCodec encoding bitrate on the fly while streaming in Android?

半腔热情 提交于 2019-12-01 10:38:10
I want to change the encoding bitrate including H264 and AAC by Android MediaCodec dynamically , according to the current network. How to update the encoding bitrate in Android MediaCodec dynamically ? PS: I found PARAMETER_KEY_VIDEO_BITRATE and setParameters is available on API 19 PARAMETER_KEY_VIDEO_BITRATE Change a video encoder's target bitrate on the fly. The value is an Integer object containing the new bitrate in bps. Constant Value: "video-bitrate" setParameters Communicate additional parameter changes to the component instance. Throws IllegalStateException if in the Uninitialized

How to change MediaCodec encoding bitrate on the fly while streaming in Android?

亡梦爱人 提交于 2019-12-01 08:46:54
问题 I want to change the encoding bitrate including H264 and AAC by Android MediaCodec dynamically , according to the current network. How to update the encoding bitrate in Android MediaCodec dynamically ? PS: I found PARAMETER_KEY_VIDEO_BITRATE and setParameters is available on API 19 PARAMETER_KEY_VIDEO_BITRATE Change a video encoder's target bitrate on the fly. The value is an Integer object containing the new bitrate in bps. Constant Value: "video-bitrate" setParameters Communicate additional