Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Merging Sound and Video

843802Apr 1 2010 — edited Apr 7 2010
Hi,

I am recording my voice using mic plugged in PC using following format.

AudioFormat format = new AudioFormat(16000, 16, 1, true, false);

and saved the recorded sound as below

AudioFileFormat.Type fileType = AudioFileFormat.Type.WAVE;
File file = new File("c://temp//mysound.wav");
AudioSystem.write(new AudioInputStream(line), fileType, file);


I am able to hear the generated mysound.wav file from VLC player, but when I use this .wav file as input to Merge.java that merges video(.mov) and audio(.wav) the program unable to recognize wave file. However when I use wave file generated from Window sound recorder as input to Merge.java it produce desired output.

Let me know how to fix this.

Thanks
Sanjay Ujjainkar
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 5 2010
Added on Apr 1 2010
6 comments
390 views