[jitsi-dev] Running libjitsi on the server side


#1

I have a need to run libjitsi on my server and I do not want any playback,
notify, nor video rendering to be instanced or configured (consider it
headless and i suppose earless). I created my own audio and video devices
to pass to MediaStreams; similar to whats done with IVFMediaDevice and the
old hammer class for AudioSilenceDevice. I ran my app and I'm getting
errors with the jitsi trying to instance / configure PulseAudio (which I
dont need nor use). So to counter that I created my
own AudioNotifierService and set it using the system property. Heres the
source for that:

public class CustomAudioNotifierService implements AudioNotifierService {

public boolean audioOutAndNotificationsShareSameDevice() {
return true;
}

public SCAudioClip createAudio(String uri) {
return null;
}

public SCAudioClip createAudio(String uri, boolean playback) {
return null;
}

public boolean isMute() {
return true;
}

public void setMute(boolean isMute) {
}

}

Once I ran the app again, I see PulseAudio again and also an error with the
AWT renderer; see below: http://pastebin.com/nPAiv4k3

After all that when my bundled stream class tries to pass what is supposed
to be an opus audio format to my audio media stream it gets an NPE.
http://pastebin.com/qV87avAp

If anyone has a moment or knows how to run the library in a server-mode,
please let me know. Lastly, here are the first things I do only once when
my app starts:

  // register our pseudo devices
  FMJPluginInConfiguration.registerCustomPackages();
  // init libjitsi without OSGI
  jitsi = new LibJitsiImpl();
  LibJitsiImpl.start();

And this is in my bundled stream setup:

  // get the media service
  MediaService mediaService = LibJitsi.getMediaService();
    MediaFormatFactory factory = mediaService.getFormatFactory();
  // create our a/v MediaDevice instances
  MediaDevice audioDevice = new MyCustomAudioDevice();
  MediaDevice videoDevice = new MyCustomVideoDevice();
  // create the MediaFormat for each stream
  MediaFormat audioFormat = factory.createMediaFormat("opus");
    MediaFormat videoFormat = factory.createMediaFormat("vp8");

Thanks in advance..
Paul

···

--
http://gregoire.org/
http://code.google.com/p/red5/


#2

Hello,

I have a need to run libjitsi on my server and I do not want any
playback, notify, nor video rendering to be instanced or configured
(consider it headless and i suppose earless). I created my own audio and
video devices to pass to MediaStreams; similar to whats done with
IVFMediaDevice and the old hammer class for AudioSilenceDevice. I ran my
app and I'm getting errors with the jitsi trying to instance / configure
PulseAudio (which I dont need nor use). So to counter that I created my
own AudioNotifierService and set it using the system property. Heres the
source for that:

public class CustomAudioNotifierService implements AudioNotifierService {

public boolean audioOutAndNotificationsShareSameDevice() {
return true;
}

public SCAudioClip createAudio(String uri) {
return null;
}

public SCAudioClip createAudio(String uri, boolean playback) {
return null;
}

public boolean isMute() {
return true;
}

public void setMute(boolean isMute) {
}

}

Once I ran the app again, I see PulseAudio again and also an error with
the AWT renderer; see below: http://pastebin.com/nPAiv4k3

These should be harmless.

After all that when my bundled stream class tries to pass what is
supposed to be an opus audio format to my audio media stream it gets an
NPE. http://pastebin.com/qV87avAp

Looks like you are passing null to setFormat().

If anyone has a moment or knows how to run the library in a server-mode,
please let me know.

Videobridge also runs headless. It sets some system properties for libjitsi, see here:
https://github.com/jitsi/jitsi-videobridge/blob/master/src/org/jitsi/videobridge/osgi/OSGi.java#L163

Lastly, here are the first things I do only once

when my app starts:

// register our pseudo devices
FMJPluginInConfiguration.registerCustomPackages();
// init libjitsi without OSGI
jitsi = new LibJitsiImpl();
LibJitsiImpl.start();

And this is in my bundled stream setup:

// get the media service
MediaService mediaService = LibJitsi.getMediaService();
     MediaFormatFactory factory = mediaService.getFormatFactory();
// create our a/v MediaDevice instances
MediaDevice audioDevice = new MyCustomAudioDevice();
MediaDevice videoDevice = new MyCustomVideoDevice();
// create the MediaFormat for each stream
MediaFormat audioFormat = factory.createMediaFormat("opus");

That explains the exception above. Use org.jitsi.service.neomedia.codec.Constants.OPUS_RTP (or "opus/rtp") to create an opus MediaFormat.

Regards,
Boris

···

On 22/08/14 00:55, Mondain wrote:


#3

Thank you for the quick response and tips, Boris. You all have created a
great resource for media streaming.

Paul

···

On Thu, Aug 21, 2014 at 6:16 PM, Boris Grozev <boris@jitsi.org> wrote:

Hello,

On 22/08/14 00:55, Mondain wrote:

I have a need to run libjitsi on my server and I do not want any
playback, notify, nor video rendering to be instanced or configured
(consider it headless and i suppose earless). I created my own audio and
video devices to pass to MediaStreams; similar to whats done with
IVFMediaDevice and the old hammer class for AudioSilenceDevice. I ran my
app and I'm getting errors with the jitsi trying to instance / configure
PulseAudio (which I dont need nor use). So to counter that I created my
own AudioNotifierService and set it using the system property. Heres the
source for that:

public class CustomAudioNotifierService implements AudioNotifierService {

public boolean audioOutAndNotificationsShareSameDevice() {
return true;
}

public SCAudioClip createAudio(String uri) {
return null;
}

public SCAudioClip createAudio(String uri, boolean playback) {
return null;
}

public boolean isMute() {
return true;
}

public void setMute(boolean isMute) {
}

}

Once I ran the app again, I see PulseAudio again and also an error with
the AWT renderer; see below: http://pastebin.com/nPAiv4k3

These should be harmless.

After all that when my bundled stream class tries to pass what is
supposed to be an opus audio format to my audio media stream it gets an
NPE. http://pastebin.com/qV87avAp

Looks like you are passing null to setFormat().

If anyone has a moment or knows how to run the library in a server-mode,
please let me know.

Videobridge also runs headless. It sets some system properties for
libjitsi, see here:
https://github.com/jitsi/jitsi-videobridge/blob/master/
src/org/jitsi/videobridge/osgi/OSGi.java#L163

Lastly, here are the first things I do only once

when my app starts:

// register our pseudo devices
FMJPluginInConfiguration.registerCustomPackages();
// init libjitsi without OSGI
jitsi = new LibJitsiImpl();
LibJitsiImpl.start();

And this is in my bundled stream setup:

// get the media service
MediaService mediaService = LibJitsi.getMediaService();
     MediaFormatFactory factory = mediaService.getFormatFactory();
// create our a/v MediaDevice instances
MediaDevice audioDevice = new MyCustomAudioDevice();
MediaDevice videoDevice = new MyCustomVideoDevice();
// create the MediaFormat for each stream
MediaFormat audioFormat = factory.createMediaFormat("opus");

That explains the exception above. Use org.jitsi.service.neomedia.codec.Constants.OPUS_RTP
(or "opus/rtp") to create an opus MediaFormat.

Regards,
Boris

_______________________________________________
dev mailing list
dev@jitsi.org
Unsubscribe instructions and other list options:
http://lists.jitsi.org/mailman/listinfo/dev

--
http://gregoire.org/
http://code.google.com/p/red5/


#4

I made the changes and ran into two issues -
1. When I use Constants.OPUS_RTP and Constants.VP8, I get a null audio
format
2014-08-22 13:37:43,245 [pool-9-thread-2] TRACE
c.b.m.s.RTCBundledBroadcastStream - MediaFormat
audio: null
video: rtpmap:-1 VP8/90000
Which causes the NPE I got originally upon setting the audio format on the
media stream.

2. When I use Constants.OPUS_RTP and Constants.VP8_RTP, I get a null video
format and then this method fires and NPE
videoMediaStream.addDynamicRTPPayloadType((byte) 100, videoFormat);

Is there something wrong with my MediaFormatFactory? Can I bypass these
null formats by creating them in the code manually?

Thanks,
Paul

···

On Fri, Aug 22, 2014 at 8:35 AM, Mondain <mondain@gmail.com> wrote:

Thank you for the quick response and tips, Boris. You all have created a
great resource for media streaming.

Paul

On Thu, Aug 21, 2014 at 6:16 PM, Boris Grozev <boris@jitsi.org> wrote:

Hello,

On 22/08/14 00:55, Mondain wrote:

I have a need to run libjitsi on my server and I do not want any
playback, notify, nor video rendering to be instanced or configured
(consider it headless and i suppose earless). I created my own audio and
video devices to pass to MediaStreams; similar to whats done with
IVFMediaDevice and the old hammer class for AudioSilenceDevice. I ran my
app and I'm getting errors with the jitsi trying to instance / configure
PulseAudio (which I dont need nor use). So to counter that I created my
own AudioNotifierService and set it using the system property. Heres the
source for that:

public class CustomAudioNotifierService implements AudioNotifierService {

public boolean audioOutAndNotificationsShareSameDevice() {
return true;
}

public SCAudioClip createAudio(String uri) {
return null;
}

public SCAudioClip createAudio(String uri, boolean playback) {
return null;
}

public boolean isMute() {
return true;
}

public void setMute(boolean isMute) {
}

}

Once I ran the app again, I see PulseAudio again and also an error with
the AWT renderer; see below: http://pastebin.com/nPAiv4k3

These should be harmless.

After all that when my bundled stream class tries to pass what is
supposed to be an opus audio format to my audio media stream it gets an
NPE. http://pastebin.com/qV87avAp

Looks like you are passing null to setFormat().

If anyone has a moment or knows how to run the library in a server-mode,
please let me know.

Videobridge also runs headless. It sets some system properties for
libjitsi, see here:
https://github.com/jitsi/jitsi-videobridge/blob/master/
src/org/jitsi/videobridge/osgi/OSGi.java#L163

Lastly, here are the first things I do only once

when my app starts:

// register our pseudo devices
FMJPluginInConfiguration.registerCustomPackages();
// init libjitsi without OSGI
jitsi = new LibJitsiImpl();
LibJitsiImpl.start();

And this is in my bundled stream setup:

// get the media service
MediaService mediaService = LibJitsi.getMediaService();
     MediaFormatFactory factory = mediaService.getFormatFactory();
// create our a/v MediaDevice instances
MediaDevice audioDevice = new MyCustomAudioDevice();
MediaDevice videoDevice = new MyCustomVideoDevice();
// create the MediaFormat for each stream
MediaFormat audioFormat = factory.createMediaFormat("opus");

That explains the exception above. Use org.jitsi.service.neomedia.codec.Constants.OPUS_RTP
(or "opus/rtp") to create an opus MediaFormat.

Regards,
Boris

_______________________________________________
dev mailing list
dev@jitsi.org
Unsubscribe instructions and other list options:
http://lists.jitsi.org/mailman/listinfo/dev

--
http://gregoire.org/
http://code.google.com/p/red5/

--
http://gregoire.org/
http://code.google.com/p/red5/


#5

I worked around this by not using the MediaFormatFactory and simply
creating the formats by-hand.

audio: rtpmap:-1 opus/48000/2
video: rtpmap:-1 VP8/90000

My latest issue is with libvpx, but hopefully google will help with with:

java.lang.UnsatisfiedLinkError: /usr/xxx/lib/linux-64/libjnvpx.so:
libvpx.so.1: cannot open shared object file: No such file or directory

···

On Fri, Aug 22, 2014 at 9:46 AM, Mondain <mondain@gmail.com> wrote:

I made the changes and ran into two issues -
1. When I use Constants.OPUS_RTP and Constants.VP8, I get a null audio
format
2014-08-22 13:37:43,245 [pool-9-thread-2] TRACE
c.b.m.s.RTCBundledBroadcastStream - MediaFormat
audio: null
video: rtpmap:-1 VP8/90000
Which causes the NPE I got originally upon setting the audio format on the
media stream.

2. When I use Constants.OPUS_RTP and Constants.VP8_RTP, I get a null video
format and then this method fires and NPE
videoMediaStream.addDynamicRTPPayloadType((byte) 100, videoFormat);

Is there something wrong with my MediaFormatFactory? Can I bypass these
null formats by creating them in the code manually?

Thanks,
Paul

On Fri, Aug 22, 2014 at 8:35 AM, Mondain <mondain@gmail.com> wrote:

Thank you for the quick response and tips, Boris. You all have created a
great resource for media streaming.

Paul

On Thu, Aug 21, 2014 at 6:16 PM, Boris Grozev <boris@jitsi.org> wrote:

Hello,

On 22/08/14 00:55, Mondain wrote:

I have a need to run libjitsi on my server and I do not want any
playback, notify, nor video rendering to be instanced or configured
(consider it headless and i suppose earless). I created my own audio and
video devices to pass to MediaStreams; similar to whats done with
IVFMediaDevice and the old hammer class for AudioSilenceDevice. I ran my
app and I'm getting errors with the jitsi trying to instance / configure
PulseAudio (which I dont need nor use). So to counter that I created my
own AudioNotifierService and set it using the system property. Heres the
source for that:

public class CustomAudioNotifierService implements AudioNotifierService
{

public boolean audioOutAndNotificationsShareSameDevice() {
return true;
}

public SCAudioClip createAudio(String uri) {
return null;
}

public SCAudioClip createAudio(String uri, boolean playback) {
return null;
}

public boolean isMute() {
return true;
}

public void setMute(boolean isMute) {
}

}

Once I ran the app again, I see PulseAudio again and also an error with
the AWT renderer; see below: http://pastebin.com/nPAiv4k3

These should be harmless.

After all that when my bundled stream class tries to pass what is
supposed to be an opus audio format to my audio media stream it gets an
NPE. http://pastebin.com/qV87avAp

Looks like you are passing null to setFormat().

If anyone has a moment or knows how to run the library in a server-mode,
please let me know.

Videobridge also runs headless. It sets some system properties for
libjitsi, see here:
https://github.com/jitsi/jitsi-videobridge/blob/master/
src/org/jitsi/videobridge/osgi/OSGi.java#L163

Lastly, here are the first things I do only once

when my app starts:

// register our pseudo devices
FMJPluginInConfiguration.registerCustomPackages();
// init libjitsi without OSGI
jitsi = new LibJitsiImpl();
LibJitsiImpl.start();

And this is in my bundled stream setup:

// get the media service
MediaService mediaService = LibJitsi.getMediaService();
     MediaFormatFactory factory = mediaService.getFormatFactory();
// create our a/v MediaDevice instances
MediaDevice audioDevice = new MyCustomAudioDevice();
MediaDevice videoDevice = new MyCustomVideoDevice();
// create the MediaFormat for each stream
MediaFormat audioFormat = factory.createMediaFormat("opus");

That explains the exception above. Use org.jitsi.service.neomedia.codec.Constants.OPUS_RTP
(or "opus/rtp") to create an opus MediaFormat.

Regards,
Boris

_______________________________________________
dev mailing list
dev@jitsi.org
Unsubscribe instructions and other list options:
http://lists.jitsi.org/mailman/listinfo/dev

--
http://gregoire.org/
http://code.google.com/p/red5/

--
http://gregoire.org/
http://code.google.com/p/red5/

--
http://gregoire.org/
http://code.google.com/p/red5/


#6

Ok ez fix for that last "issue" is to make a static link..

ln -s libvpx.so libvpx.so.1

···

On Fri, Aug 22, 2014 at 6:13 PM, Mondain <mondain@gmail.com> wrote:

I worked around this by not using the MediaFormatFactory and simply
creating the formats by-hand.

audio: rtpmap:-1 opus/48000/2
video: rtpmap:-1 VP8/90000

My latest issue is with libvpx, but hopefully google will help with with:

java.lang.UnsatisfiedLinkError: /usr/xxx/lib/linux-64/libjnvpx.so:
libvpx.so.1: cannot open shared object file: No such file or directory

On Fri, Aug 22, 2014 at 9:46 AM, Mondain <mondain@gmail.com> wrote:

I made the changes and ran into two issues -
1. When I use Constants.OPUS_RTP and Constants.VP8, I get a null audio
format
2014-08-22 13:37:43,245 [pool-9-thread-2] TRACE
c.b.m.s.RTCBundledBroadcastStream - MediaFormat
audio: null
video: rtpmap:-1 VP8/90000
Which causes the NPE I got originally upon setting the audio format on
the media stream.

2. When I use Constants.OPUS_RTP and Constants.VP8_RTP, I get a null
video format and then this method fires and NPE
videoMediaStream.addDynamicRTPPayloadType((byte) 100, videoFormat);

Is there something wrong with my MediaFormatFactory? Can I bypass these
null formats by creating them in the code manually?

Thanks,
Paul

On Fri, Aug 22, 2014 at 8:35 AM, Mondain <mondain@gmail.com> wrote:

Thank you for the quick response and tips, Boris. You all have created a
great resource for media streaming.

Paul

On Thu, Aug 21, 2014 at 6:16 PM, Boris Grozev <boris@jitsi.org> wrote:

Hello,

On 22/08/14 00:55, Mondain wrote:

I have a need to run libjitsi on my server and I do not want any
playback, notify, nor video rendering to be instanced or configured
(consider it headless and i suppose earless). I created my own audio
and
video devices to pass to MediaStreams; similar to whats done with
IVFMediaDevice and the old hammer class for AudioSilenceDevice. I ran
my
app and I'm getting errors with the jitsi trying to instance /
configure
PulseAudio (which I dont need nor use). So to counter that I created my
own AudioNotifierService and set it using the system property. Heres
the
source for that:

public class CustomAudioNotifierService implements
AudioNotifierService {

public boolean audioOutAndNotificationsShareSameDevice() {
return true;
}

public SCAudioClip createAudio(String uri) {
return null;
}

public SCAudioClip createAudio(String uri, boolean playback) {
return null;
}

public boolean isMute() {
return true;
}

public void setMute(boolean isMute) {
}

}

Once I ran the app again, I see PulseAudio again and also an error with
the AWT renderer; see below: http://pastebin.com/nPAiv4k3

These should be harmless.

After all that when my bundled stream class tries to pass what is
supposed to be an opus audio format to my audio media stream it gets an
NPE. http://pastebin.com/qV87avAp

Looks like you are passing null to setFormat().

If anyone has a moment or knows how to run the library in a
server-mode,
please let me know.

Videobridge also runs headless. It sets some system properties for
libjitsi, see here:
https://github.com/jitsi/jitsi-videobridge/blob/master/
src/org/jitsi/videobridge/osgi/OSGi.java#L163

Lastly, here are the first things I do only once

when my app starts:

// register our pseudo devices
FMJPluginInConfiguration.registerCustomPackages();
// init libjitsi without OSGI
jitsi = new LibJitsiImpl();
LibJitsiImpl.start();

And this is in my bundled stream setup:

// get the media service
MediaService mediaService = LibJitsi.getMediaService();
     MediaFormatFactory factory = mediaService.getFormatFactory();
// create our a/v MediaDevice instances
MediaDevice audioDevice = new MyCustomAudioDevice();
MediaDevice videoDevice = new MyCustomVideoDevice();
// create the MediaFormat for each stream
MediaFormat audioFormat = factory.createMediaFormat("opus");

That explains the exception above. Use org.jitsi.service.neomedia.codec.Constants.OPUS_RTP
(or "opus/rtp") to create an opus MediaFormat.

Regards,
Boris

_______________________________________________
dev mailing list
dev@jitsi.org
Unsubscribe instructions and other list options:
http://lists.jitsi.org/mailman/listinfo/dev

--
http://gregoire.org/
http://code.google.com/p/red5/

--
http://gregoire.org/
http://code.google.com/p/red5/

--
http://gregoire.org/
http://code.google.com/p/red5/

--
http://gregoire.org/
http://code.google.com/p/red5/