-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Audio recording with FrameRecorder #17
Comments
Hi, |
Increasing the sampleRate, i.e. although received microphone sampling is with 44100, making it for Frame.java .as frame.sampleRate = 88200 has solved this issue. i.e. Audio is recorded correctly. |
I'm not sure why increasing the sample rate to 88200 works (a value which I think is unsupported by FFmpeg, so that should throw an error AFAIK). But AFAIK, FFmpeg expects LITTLE_ENDIAN samples, so BIG_ENDIAN is probably not going to work according to
|
Hello Samuel, thank you for this response. Unfortunately it did not bring me any To be honest, I have had already searched for a way to convert a Ok, here I am blocked. Why does FFmpegGrabber gets the correct Best regards, Am 19.07.2014 16:56, schrieb Samuel Audet:
|
The AAC decoder outputs as floats, while the MP3 decoder outputs at shorts, that's all. We can do the conversion with But that does not seem to be your problem. I'm not sure I understand what is the problem from the discussion above. Please explain more clearly, thank you. |
Hello Samuel, many thanks for this support. I definitively owe you. my problem was simply to play an Mp4 file via FFmpegFrameGrabber. I
given reference, one needs to use the low byte too. By me, it does Any way, it works for me now. And I am very happy to have your Am 24.07.2014 14:42, schrieb Samuel Audet:
|
Hi,
Reading an mp4 file and an mp3 with FFmpegFrameGrabber and then recording these in a new mp4 file with FrameRecorder functions well.
However reading an mp4 video file and sound from microphone to record seems to have some problems. With the code below, although the sound seems to be "without noise", but it is extreme delayed and not recognizable. Soundbytes read from TargetDataLine are ok.
Not sure, if this is simply an error in Buffer handling or a bug. I appreciate it if you could have a look.
// int buffSize = defBuffSize/5;
int buffSize = defBuffSize/10; // = 4410
byte[] soundData = new byte[buffSize];
int numBytesRead = captureLine.read(soundData, 0, buffSize);
playLine.write(soundData, 0, numBytesRead); // <<< OK, sound is played correctly...
...........................................
I can email the mp4 file if required.
Thanks,
Taskin
The text was updated successfully, but these errors were encountered: