[jitsi-dev] Recording in WAV or Playing MP3


#1

Hi All,

It would be great if you can give me directions on how to do the following:

1) I tried recording the call as a "WAV" file. The file gets created, but
there is no content in there. I couldn't figure it out.
2) I tried to play the recorded audio inside Jitsi, but the SCAudioClip
code doesn't play MP3 code.
3) I added mp3plugin.jar and it works when I run it as a simple Java
application like this:

* Format input1 = new AudioFormat(AudioFormat.MPEGLAYER3);*
* Format input2 = new AudioFormat(AudioFormat.MPEG);*
* Format output = new AudioFormat(AudioFormat.LINEAR);*
* PlugInManager.addPlugIn(*
* "com.sun.media.codec.audio.mp3.JavaDecoder",*
* new Format[]{input1, input2},*
* new Format[]{output},*
* PlugInManager.CODEC*
* );*

* player = Manager.createPlayer(mediaLocator);*
* player.start();*

This works when I run as a sample app, but when I try to do the same inside
OSGI app, it doesn't work.

Can you give me directions on either how to record in WAV or how to run
MP3, that would be greatly helpful.

Thanks,
Paramesh


#2

Hi All,

It would be great if you can give me directions on how to do the following:

1) I tried recording the call as a "WAV" file. The file gets created,
but there is no content in there. I couldn't figure it out.

That's a known issue, and because of it recording in WAV has been
disabled for some time.

I have a patch adding a new WAV multiplexer, because the FMJ one fails
for an unknown reason. I have yet to test it and clean it up before
committing, but I'm attaching it here in case you want to try it out
(feedback would be welcome). You need to register it in
FMJPlugInConfiguration.java.

2) I tried to play the recorded audio inside Jitsi, but the SCAudioClip
code doesn't play MP3 code.
3) I added mp3plugin.jar and it works when I run it as a simple Java
application like this:

/ Format input1 = new AudioFormat(AudioFormat.MPEGLAYER3);/
/ Format input2 = new AudioFormat(AudioFormat.MPEG);/
/ Format output = new AudioFormat(AudioFormat.LINEAR);/
/ PlugInManager.addPlugIn(/
/ "com.sun.media.codec.audio.mp3.JavaDecoder",/
/ new Format[]{input1, input2},/
/ new Format[]{output},/
/ PlugInManager.CODEC/
/ );/
/
/
/player = Manager.createPlayer(mediaLocator);/
/player.start();/

This works when I run as a sample app, but when I try to do the same
inside OSGI app, it doesn't work.

Possibly a problem with packages missing from the manifest, but there's
no way to tell without more information about how it fails.

Regards,
Boris

BasicWavMux.java (1.59 KB)

ยทยทยท

On 28/04/14 14:02, Parameswaran M wrote: