javacv icon indicating copy to clipboard operation
javacv copied to clipboard

How can we split the stereo(two channels) audio file into two separate mono file

Open raha007 opened this issue 3 years ago • 4 comments

Hi @saudet Can you please give me guidance how can we split the stereo file into mono channel using javacv library in java

raha007 avatar Apr 12 '22 13:04 raha007

We can easily do that with the FFmpeg program I'm sure: http://bytedeco.org/javacpp-presets/ffmpeg/apidocs/org/bytedeco/ffmpeg/ffmpeg.html

saudet avatar Apr 12 '22 13:04 saudet

@saudet Here is the requirements like we have stereo file containing agent as well as customer voice here I want to split the agent and customer channel separately using ffmpeg. If you have any reference or code snippet please share it here. It will be helpful. Thanks

raha007 avatar Apr 12 '22 18:04 raha007

There appears to be a lot of examples of that on the web, try them and pick one that works for your case: https://www.google.com/search?client=firefox-b-d&q=ffmpeg+split+stereo+to+mono

saudet avatar Apr 13 '22 00:04 saudet

I find a way which can split a stereo(2 channels) into two mono audios just using FFmpegFrameRecorder and FFmpegFrameGrabber. But before apply my method, you should tell me that whether your stereo audio is in format of 's16le' or in format of 's16lep'

steeveen avatar May 30 '23 01:05 steeveen