Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: TJMediaRecorder record in pcm format


This question is not answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 0
madammar ellias

Posts: 111
Registered: 8/17/17
TJMediaRecorder record in pcm format  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 24, 2018 7:29 PM
i am trying to play a recorded mp3 file that been recorder with this jmediarecorder format
procedure TAndroidAudioCaptureDevice.DoStartCapture;
begin
  FRecorder := TJMediaRecorder.JavaClass.init;
  FRecorder.setAudioSource(TJMediaRecorder_AudioSource.JavaClass.MIC);
  FRecorder.setOutputFormat(TJMediaRecorder_OutputFormat.JavaClass.AAC_ADTS);
  FRecorder.setAudioEncoder(TJMediaRecorder_AudioEncoder.JavaClass.AAC);
  FRecorder.setOutputFile(StringToJString(FileName));
  FRecorder.prepare;
  FRecorder.start;
end;


i have tried to play this mp3 file on vcl windows but the file does not supported by the player encoder
which the player read only mp3 files with pcm format
i have tried to play it with Tmediaplayer i got no mci device open

this is the file property that been recorded with jmediarecorder

Bitrate - 0
samplerate - 8000hz
channel - 1 channel

i think bitrate 0 is the main problem to this audio to be played with pcm player

can i record mp3 file in 16bit 8000 hz format on android without using TJMediaRecorder or any other alternative ?
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02