Video lag 10 seconds

EN
Evgeny Nesterov
Thu, Jul 23, 2020 3:47 PM

Hello,

I build Android application based on pjsip library. For app i use java
and pjsua2 via swig binding.

When i make video call i have strange behaviour: call start normaly,
video showed, audio to with minimal latency. But after about 30 seconds,
video starts to lag relative to audio. This delay grows and reaches 10
seconds. But the sound at the same time there is no delay.

I build sample android app and this app has exactly the same problem.

Can someone tell me which way to look and what is the problem?

--
Evgeny

Hello, I build Android application based on pjsip library. For app i use java and pjsua2 via swig binding. When i make video call i have strange behaviour: call start normaly, video showed, audio to with minimal latency. But after about 30 seconds, video starts to lag relative to audio. This delay grows and reaches 10 seconds. But the sound at the same time there is no delay. I build sample android app and this app has exactly the same problem. Can someone tell me which way to look and what is the problem? -- Evgeny
EN
Evgeny Nesterov
Wed, Jul 29, 2020 10:07 AM

Hey guys!

But in fact, does anyone use the library under Android platform? Has
anyone tried running sample app on the latest versions of the library?

23.07.2020 18:47, Evgeny Nesterov пишет:

Hello,

I build Android application based on pjsip library. For app i use java
and pjsua2 via swig binding.

When i make video call i have strange behaviour: call start normaly,
video showed, audio to with minimal latency. But after about 30
seconds, video starts to lag relative to audio. This delay grows and
reaches 10 seconds. But the sound at the same time there is no delay.

I build sample android app and this app has exactly the same problem.

Can someone tell me which way to look and what is the problem?

--
Evgeny Nesterov

Hey guys! But in fact, does anyone use the library under Android platform? Has anyone tried running sample app on the latest versions of the library? 23.07.2020 18:47, Evgeny Nesterov пишет: > Hello, > > I build Android application based on pjsip library. For app i use java > and pjsua2 via swig binding. > > When i make video call i have strange behaviour: call start normaly, > video showed, audio to with minimal latency. But after about 30 > seconds, video starts to lag relative to audio. This delay grows and > reaches 10 seconds. But the sound at the same time there is no delay. > > I build sample android app and this app has exactly the same problem. > > Can someone tell me which way to look and what is the problem? > -- Evgeny Nesterov
LT
Lobsang tibet
Wed, Jul 29, 2020 11:09 AM

hi Nesterov
i am trying on the latest version of library without success . i am not
able to build openh264 codec library .

Any help would be high

make OS=android
NDKROOT=/home/Username/Downloads/android-ndk-r21d-linux-x86_64/android-ndk-r21d
TARGET=android-28
Error

build/platform-android.mk:51: *** Compiler not found, bad NDKROOT or
ARCH?.  Stop.

On Wed, Jul 29, 2020 at 12:08 PM Evgeny Nesterov home@zbyte.ru wrote:

Hey guys!

But in fact, does anyone use the library under Android platform? Has
anyone tried running sample app on the latest versions of the library?

23.07.2020 18:47, Evgeny Nesterov пишет:

Hello,

I build Android application based on pjsip library. For app i use java
and pjsua2 via swig binding.

When i make video call i have strange behaviour: call start normaly,
video showed, audio to with minimal latency. But after about 30
seconds, video starts to lag relative to audio. This delay grows and
reaches 10 seconds. But the sound at the same time there is no delay.

I build sample android app and this app has exactly the same problem.

Can someone tell me which way to look and what is the problem?

hi Nesterov i am trying on the latest version of library without success . i am not able to build openh264 codec library . Any help would be high make OS=android NDKROOT=/home/Username/Downloads/android-ndk-r21d-linux-x86_64/android-ndk-r21d TARGET=android-28 Error > build/platform-android.mk:51: *** Compiler not found, bad NDKROOT or > ARCH?. Stop. On Wed, Jul 29, 2020 at 12:08 PM Evgeny Nesterov <home@zbyte.ru> wrote: > Hey guys! > > But in fact, does anyone use the library under Android platform? Has > anyone tried running sample app on the latest versions of the library? > > 23.07.2020 18:47, Evgeny Nesterov пишет: > > Hello, > > > > I build Android application based on pjsip library. For app i use java > > and pjsua2 via swig binding. > > > > When i make video call i have strange behaviour: call start normaly, > > video showed, audio to with minimal latency. But after about 30 > > seconds, video starts to lag relative to audio. This delay grows and > > reaches 10 seconds. But the sound at the same time there is no delay. > > > > I build sample android app and this app has exactly the same problem. > > > > Can someone tell me which way to look and what is the problem? > > > -- > Evgeny Nesterov > > > > _______________________________________________ > Visit our blog: http://blog.pjsip.org > > pjsip mailing list > pjsip@lists.pjsip.org > http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org >
EN
Evgeny Nesterov
Wed, Jul 29, 2020 11:31 AM

Im build without problem, but i have strange incoming video lag. And i cant understand problem why lag occurs: wrong sip server? wrong use
library? wrong android? bug in pjsip?

29.07.2020 14:09, Lobsang tibet пишет:

hi Nesterov

 i am trying on the latest version of library without success . i am
not able to build openh264 codec library .

Any help would be high

make OS=android
NDKROOT=/home/Username/Downloads/android-ndk-r21d-linux-x86_64/android-ndk-r21d
TARGET=android-28
Error

build/platform-android.mk:51 http://platform-android.mk:51: ***

Compiler not found, bad NDKROOT or

ARCH?.  Stop.

On Wed, Jul 29, 2020 at 12:08 PM Evgeny Nesterov <home@zbyte.ru
mailto:home@zbyte.ru> wrote:

 Hey guys!

 But in fact, does anyone use the library under Android platform? Has
 anyone tried running sample app on the latest versions of the library?

 23.07.2020 18:47, Evgeny Nesterov пишет:

Hello,

I build Android application based on pjsip library. For app i

 use java

and pjsua2 via swig binding.

When i make video call i have strange behaviour: call start

 normaly,

video showed, audio to with minimal latency. But after about 30
seconds, video starts to lag relative to audio. This delay grows

 and

reaches 10 seconds. But the sound at the same time there is no

 delay.

I build sample android app and this app has exactly the same

 problem.

Can someone tell me which way to look and what is the problem?

 -- 
 Evgeny Nesterov



 _______________________________________________
 Visit our blog: http://blog.pjsip.org

 pjsip mailing list
 pjsip@lists.pjsip.org <mailto:pjsip@lists.pjsip.org>
 http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org

Visit our blog: http://blog.pjsip.org

pjsip mailing list
pjsip@lists.pjsip.org
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org

--
Evgeny Nesterov

I`m build without problem, but i have strange incoming video lag. And i can`t understand problem why lag occurs: wrong sip server? wrong use library? wrong android? bug in pjsip? 29.07.2020 14:09, Lobsang tibet пишет: > hi Nesterov > > > >  i am trying on the latest version of library without success . i am > not able to build openh264 codec library . > > Any help would be high > > make OS=android > NDKROOT=/home/Username/Downloads/android-ndk-r21d-linux-x86_64/android-ndk-r21d > TARGET=android-28 > Error > > build/platform-android.mk:51 <http://platform-android.mk:51>: *** > Compiler not found, bad NDKROOT or > > ARCH?.  Stop. > > On Wed, Jul 29, 2020 at 12:08 PM Evgeny Nesterov <home@zbyte.ru > <mailto:home@zbyte.ru>> wrote: > > Hey guys! > > But in fact, does anyone use the library under Android platform? Has > anyone tried running sample app on the latest versions of the library? > > 23.07.2020 18:47, Evgeny Nesterov пишет: > > Hello, > > > > I build Android application based on pjsip library. For app i > use java > > and pjsua2 via swig binding. > > > > When i make video call i have strange behaviour: call start > normaly, > > video showed, audio to with minimal latency. But after about 30 > > seconds, video starts to lag relative to audio. This delay grows > and > > reaches 10 seconds. But the sound at the same time there is no > delay. > > > > I build sample android app and this app has exactly the same > problem. > > > > Can someone tell me which way to look and what is the problem? > > > -- > Evgeny Nesterov > > > > _______________________________________________ > Visit our blog: http://blog.pjsip.org > > pjsip mailing list > pjsip@lists.pjsip.org <mailto:pjsip@lists.pjsip.org> > http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org > > > _______________________________________________ > Visit our blog: http://blog.pjsip.org > > pjsip mailing list > pjsip@lists.pjsip.org > http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org -- Evgeny Nesterov
EN
Evgeny Nesterov
Fri, Jul 31, 2020 3:01 PM

Our investigation showed that the problem is server stream dependent.

If the server sends a stream at a speed of 15 fps - all OK.

If the server sends a stream at a speed of 25 fps - we have increasing
delay.

I think this is android video driver problem, which not working
correctly when incoming stream FPS changed.

29.07.2020 14:31, Evgeny Nesterov пишет:

Im build without problem, but i have strange incoming video lag. And i cant understand problem why lag occurs: wrong sip server? wrong use
library? wrong android? bug in pjsip?

29.07.2020 14:09, Lobsang tibet пишет:

hi Nesterov

 i am trying on the latest version of library without success . i am
not able to build openh264 codec library .

Any help would be high

make OS=android
NDKROOT=/home/Username/Downloads/android-ndk-r21d-linux-x86_64/android-ndk-r21d
TARGET=android-28
Error

build/platform-android.mk:51 http://platform-android.mk:51: ***

Compiler not found, bad NDKROOT or

ARCH?.  Stop.

On Wed, Jul 29, 2020 at 12:08 PM Evgeny Nesterov <home@zbyte.ru
mailto:home@zbyte.ru> wrote:

 Hey guys!

 But in fact, does anyone use the library under Android platform? Has
 anyone tried running sample app on the latest versions of the
 library?

 23.07.2020 18:47, Evgeny Nesterov пишет:

Hello,

I build Android application based on pjsip library. For app i

 use java

and pjsua2 via swig binding.

When i make video call i have strange behaviour: call start

 normaly,

video showed, audio to with minimal latency. But after about 30
seconds, video starts to lag relative to audio. This delay

 grows and

reaches 10 seconds. But the sound at the same time there is no

 delay.

I build sample android app and this app has exactly the same

 problem.

Can someone tell me which way to look and what is the problem?

 -- 
 Evgeny Nesterov



 _______________________________________________
 Visit our blog: http://blog.pjsip.org

 pjsip mailing list
 pjsip@lists.pjsip.org <mailto:pjsip@lists.pjsip.org>
 http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org

Visit our blog:http://blog.pjsip.org

pjsip mailing list
pjsip@lists.pjsip.org
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org

--
Evgeny Nesterov

Our investigation showed that the problem is server stream dependent. If the server sends a stream at a speed of 15 fps - all OK. If the server sends a stream at a speed of 25 fps - we have increasing delay. I think this is android video driver problem, which not working correctly when incoming stream FPS changed. 29.07.2020 14:31, Evgeny Nesterov пишет: > > I`m build without problem, but i have strange incoming video lag. And > i can`t understand problem why lag occurs: wrong sip server? wrong use > library? wrong android? bug in pjsip? > > 29.07.2020 14:09, Lobsang tibet пишет: >> hi Nesterov >> >> >> >>  i am trying on the latest version of library without success . i am >> not able to build openh264 codec library . >> >> Any help would be high >> >> make OS=android >> NDKROOT=/home/Username/Downloads/android-ndk-r21d-linux-x86_64/android-ndk-r21d >> TARGET=android-28 >> Error >> > build/platform-android.mk:51 <http://platform-android.mk:51>: *** >> Compiler not found, bad NDKROOT or >> > ARCH?.  Stop. >> >> On Wed, Jul 29, 2020 at 12:08 PM Evgeny Nesterov <home@zbyte.ru >> <mailto:home@zbyte.ru>> wrote: >> >> Hey guys! >> >> But in fact, does anyone use the library under Android platform? Has >> anyone tried running sample app on the latest versions of the >> library? >> >> 23.07.2020 18:47, Evgeny Nesterov пишет: >> > Hello, >> > >> > I build Android application based on pjsip library. For app i >> use java >> > and pjsua2 via swig binding. >> > >> > When i make video call i have strange behaviour: call start >> normaly, >> > video showed, audio to with minimal latency. But after about 30 >> > seconds, video starts to lag relative to audio. This delay >> grows and >> > reaches 10 seconds. But the sound at the same time there is no >> delay. >> > >> > I build sample android app and this app has exactly the same >> problem. >> > >> > Can someone tell me which way to look and what is the problem? >> > >> -- >> Evgeny Nesterov >> >> >> >> _______________________________________________ >> Visit our blog: http://blog.pjsip.org >> >> pjsip mailing list >> pjsip@lists.pjsip.org <mailto:pjsip@lists.pjsip.org> >> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org >> >> >> _______________________________________________ >> Visit our blog:http://blog.pjsip.org >> >> pjsip mailing list >> pjsip@lists.pjsip.org >> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org > -- > Evgeny Nesterov > > _______________________________________________ > Visit our blog: http://blog.pjsip.org > > pjsip mailing list > pjsip@lists.pjsip.org > http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org -- Evgeny Nesterov
LT
Lobsang tibet
Fri, Aug 21, 2020 9:07 AM

Hi Evgeny

i have open pjsua2 sample project in android studio. then make sip
registration the sip registration and call is working fine.  but some time
app crash on hangup action. following code for  hangup.  Usually after
second attempt to hangup call ..

CallOpParam prm = new CallOpParam();
prm.setStatusCode(pjsip_status_code.PJSIP_SC_DECLINE);currentCall.hangup(prm);

the currentCall is my call object.

Do you get same error as well

On Fri, Jul 31, 2020 at 5:02 PM Evgeny Nesterov home@zbyte.ru wrote:

Our investigation showed that the problem is server stream dependent.

If the server sends a stream at a speed of 15 fps - all OK.

If the server sends a stream at a speed of 25 fps - we have increasing
delay.

I think this is android video driver problem, which not working correctly
when incoming stream FPS changed.

29.07.2020 14:31, Evgeny Nesterov пишет:

Im build without problem, but i have strange incoming video lag. And i cant understand problem why lag occurs: wrong sip server? wrong use
library? wrong android? bug in pjsip?
29.07.2020 14:09, Lobsang tibet пишет:

hi Nesterov
i am trying on the latest version of library without success . i am not
able to build openh264 codec library .

Any help would be high

make OS=android
NDKROOT=/home/Username/Downloads/android-ndk-r21d-linux-x86_64/android-ndk-r21d
TARGET=android-28
Error

build/platform-android.mk:51: *** Compiler not found, bad NDKROOT or
ARCH?.  Stop.

On Wed, Jul 29, 2020 at 12:08 PM Evgeny Nesterov home@zbyte.ru wrote:

Hey guys!

But in fact, does anyone use the library under Android platform? Has
anyone tried running sample app on the latest versions of the library?

23.07.2020 18:47, Evgeny Nesterov пишет:

Hello,

I build Android application based on pjsip library. For app i use java
and pjsua2 via swig binding.

When i make video call i have strange behaviour: call start normaly,
video showed, audio to with minimal latency. But after about 30
seconds, video starts to lag relative to audio. This delay grows and
reaches 10 seconds. But the sound at the same time there is no delay.

I build sample android app and this app has exactly the same problem.

Can someone tell me which way to look and what is the problem?


Visit our blog: http://blog.pjsip.org

pjsip mailing listpjsip@lists.pjsip.orghttp://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org

--
Evgeny Nesterov


Visit our blog: http://blog.pjsip.org

pjsip mailing listpjsip@lists.pjsip.orghttp://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org

--
Evgeny Nesterov

Hi Evgeny i have open pjsua2 sample project in android studio. then make sip registration the sip registration and call is working fine. but some time app crash on hangup action. following code for hangup. Usually after second attempt to hangup call .. CallOpParam prm = new CallOpParam(); prm.setStatusCode(pjsip_status_code.PJSIP_SC_DECLINE);currentCall.hangup(prm); the currentCall is my call object. Do you get same error as well On Fri, Jul 31, 2020 at 5:02 PM Evgeny Nesterov <home@zbyte.ru> wrote: > Our investigation showed that the problem is server stream dependent. > > If the server sends a stream at a speed of 15 fps - all OK. > > If the server sends a stream at a speed of 25 fps - we have increasing > delay. > > I think this is android video driver problem, which not working correctly > when incoming stream FPS changed. > > > 29.07.2020 14:31, Evgeny Nesterov пишет: > > I`m build without problem, but i have strange incoming video lag. And i > can`t understand problem why lag occurs: wrong sip server? wrong use > library? wrong android? bug in pjsip? > 29.07.2020 14:09, Lobsang tibet пишет: > > hi Nesterov > i am trying on the latest version of library without success . i am not > able to build openh264 codec library . > > Any help would be high > > make OS=android > NDKROOT=/home/Username/Downloads/android-ndk-r21d-linux-x86_64/android-ndk-r21d > TARGET=android-28 > Error > > build/platform-android.mk:51: *** Compiler not found, bad NDKROOT or > > ARCH?. Stop. > > On Wed, Jul 29, 2020 at 12:08 PM Evgeny Nesterov <home@zbyte.ru> wrote: > >> Hey guys! >> >> But in fact, does anyone use the library under Android platform? Has >> anyone tried running sample app on the latest versions of the library? >> >> 23.07.2020 18:47, Evgeny Nesterov пишет: >> > Hello, >> > >> > I build Android application based on pjsip library. For app i use java >> > and pjsua2 via swig binding. >> > >> > When i make video call i have strange behaviour: call start normaly, >> > video showed, audio to with minimal latency. But after about 30 >> > seconds, video starts to lag relative to audio. This delay grows and >> > reaches 10 seconds. But the sound at the same time there is no delay. >> > >> > I build sample android app and this app has exactly the same problem. >> > >> > Can someone tell me which way to look and what is the problem? >> > >> -- >> Evgeny Nesterov >> >> >> >> _______________________________________________ >> Visit our blog: http://blog.pjsip.org >> >> pjsip mailing list >> pjsip@lists.pjsip.org >> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org >> > > _______________________________________________ > Visit our blog: http://blog.pjsip.org > > pjsip mailing listpjsip@lists.pjsip.orghttp://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org > > -- > Evgeny Nesterov > > > _______________________________________________ > Visit our blog: http://blog.pjsip.org > > pjsip mailing listpjsip@lists.pjsip.orghttp://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org > > -- > Evgeny Nesterov > >
LT
Lobsang tibet
Sun, Dec 27, 2020 10:45 PM

Hi Evgeny
can you please help me on improving video quality on default Android sample
app.

Current default sample Android pjsip pjsua2 sample app sends a very bad
video quality and wish to improve them to atleast Hd quality. I have tried
using below methods , but it keep on showing a very low video quality. How
can i improve outgoing video quality. This sample app is able to receive
upto 355 * 288 video quality from other sip video call ,but it sends a very
poor video quality. Currently i have tried to achieve hd video by updating
below value from MediaFormatvideo file , just before making outgoing call.
And it doesnt help at all to improve outgoing video . Am i updating those
attribute at wrong places ?

Currently it sending video quality below 192 * 144 and doesnt accept above
352 * 288 video quality . how can i update it to support atleast 1280*720
video quality

MediaFormatVideo mf=new MediaFormatVideo();
mf.setFpsNum(30);
mf.setFpsDenum(1);
mf.setAvgBps(512000);
mf.setMaxBps(1024000);
mf.setHeight(720);
mf.setWidth(1280);

i am updating those setting as below .

MyCall call = new MyCall(account, -1);
CallOpParam prm = new CallOpParam(true);
AccountVideoConfig avc=new AccountVideoConfig();
MediaFormatVideo mf=new MediaFormatVideo();

Log.e("javan-video",String.valueOf(avc.getAutoShowIncoming()));
Log.e("javan-videofps",String.valueOf(mf.getFpsNum()));
mf.setFpsNum(30);
mf.setFpsDenum(1);
mf.setAvgBps(512000);
mf.setMaxBps(1024000);
mf.setHeight(720);
mf.setWidth(1280);
Log.e("javan-videofps",String.valueOf(mf.getFpsNum()));


try {
    call.makeCall("sip:"+dialno+"@peoplefone.ch", prm);
    AudioManager am = (AudioManager)

getSystemService(Context.AUDIO_SERVICE);

   am.setSpeakerphoneOn(true);

     // startRinging();

} catch (Exception e) {
    call.delete();
    return;
}

currentCall = call;

showCallActivity();
}

i have found a documentation ,tried to implement ..but i couldnt able to
improve video quality

Framerate
Specify number of frames processed per second.

For encoding direction, configured via
pjmedia_vid_codec_param.enc_fmt.det.vid.fps, e.g:/* Sending @30fps /
param.enc_fmt.det.vid.fps.num  = 30;
param.enc_fmt.det.vid.fps.denum = 1;
Note:
that there is a possibility that the value will be adjusted to follow
remote capability. For example, if remote signals that maximum
framerate supported is 10fps and locally the encoding direction
framerate is set to 30fps, then 10fps will be used.
limitation: if preview is enabled before call is established, capture
device will opened using default framerate of the device, and
subsequent calls that use that device will use this framerate
regardless of the configured encoding framerate that is set above.
Currently the only solution is to disable preview before establishing
media and re-enable it once the video media is established.
For decoding direction, two steps are needed:
pjmedia_vid_codec_param.dec_fmt.det.vid.fps should be set to the
highest value expected for incoming video framerate.
signalling to remote, configured via codec specific SDP format
parameter (fmtp): pjmedia_vid_codec_param.dec_fmtp.
H263-1998, maximum framerate is specified per size/resolution basis,
check here for more info./
3000/(1.0012) fps for CIF /
param.dec_fmtp.param[m].name = pj_str("CIF");
param.dec_fmtp.param[m].val = pj_str("2");/
3000/(1.001
1) fps for QCIF /
param.dec_fmtp.param[n].name = pj_str("QCIF");
param.dec_fmtp.param[n].val = pj_str("1");
H264, similar to size/resolution, the framerate is implicitly
specified in H264 level (check the standard specification or this) and
the H264 level is signalled via H264 SDP fmtp profile-level-id, e.g:/

Can receive up to 1280×720 @30fps */
param.dec_fmtp.param[n].name = pj_str("profile-level-id");
param.dec_fmtp.param[n].val = pj_str("xxxx1f");
Bitrate
Specify bandwidth requirement for video payloads stream delivery.

This is configurable via
pjmedia_vid_codec_param.enc_fmt.det.vid.avg_bps and
pjmedia_vid_codec_param.enc_fmt.det.vid.max_bps, e.g:
/* Bitrate range preferred: 512-1024kbps */
param.enc_fmt.det.vid.avg_bps = 512000;
param.enc_fmt.det.vid.max_bps = 1024000;
Notes:

This setting is applicable for encoding and decoding direction,
currently there is no way to set asymmetric bitrate. By decoding
direction, actually it just means that this setting will be queried
when generating bandwidth info for local SDP (see next point).
The bitrate setting of all codecs will be enumerated and the highest
value will be signalled in bandwidth info in local SDP (see ticket
#1244).
There is a possibility that the encoding bitrate will be adjusted to
follow remote bitrate setting, i.e: read from SDP bandwidth info
(b=TIAS line) in remote SDP. For example, if remote signals that
maximum bitrate is 128kbps and locally the bitrate is set to 512kbps,
then 128kbps will be used.
If codec specific bitrate setting signalling (via SDP fmtp) is
desired, e.g: MaxBR for H263, application should put the SDP fmtp
manually, for example:/* H263 specific maximum bitrate 512kbps /
param.dec_fmtp.param[n].name = pj_str("MaxBR");
param.dec_fmtp.param[n].val = pj_str("5120"); /
= max_bps / 1

On Fri, Aug 21, 2020 at 11:07 AM Lobsang tibet martsalobsang@gmail.com
wrote:

Hi Evgeny

i have open pjsua2 sample project in android studio. then make sip
registration the sip registration and call is working fine.  but some time
app crash on hangup action. following code for  hangup.  Usually after
second attempt to hangup call ..

CallOpParam prm = new CallOpParam();
prm.setStatusCode(pjsip_status_code.PJSIP_SC_DECLINE);currentCall.hangup(prm);

the currentCall is my call object.

Do you get same error as well

On Fri, Jul 31, 2020 at 5:02 PM Evgeny Nesterov home@zbyte.ru wrote:

Our investigation showed that the problem is server stream dependent.

If the server sends a stream at a speed of 15 fps - all OK.

If the server sends a stream at a speed of 25 fps - we have increasing
delay.

I think this is android video driver problem, which not working correctly
when incoming stream FPS changed.

29.07.2020 14:31, Evgeny Nesterov пишет:

Im build without problem, but i have strange incoming video lag. And i cant understand problem why lag occurs: wrong sip server? wrong use
library? wrong android? bug in pjsip?
29.07.2020 14:09, Lobsang tibet пишет:

hi Nesterov
i am trying on the latest version of library without success . i am not
able to build openh264 codec library .

Any help would be high

make OS=android
NDKROOT=/home/Username/Downloads/android-ndk-r21d-linux-x86_64/android-ndk-r21d
TARGET=android-28
Error

build/platform-android.mk:51: *** Compiler not found, bad NDKROOT or
ARCH?.  Stop.

On Wed, Jul 29, 2020 at 12:08 PM Evgeny Nesterov home@zbyte.ru wrote:

Hey guys!

But in fact, does anyone use the library under Android platform? Has
anyone tried running sample app on the latest versions of the library?

23.07.2020 18:47, Evgeny Nesterov пишет:

Hello,

I build Android application based on pjsip library. For app i use java
and pjsua2 via swig binding.

When i make video call i have strange behaviour: call start normaly,
video showed, audio to with minimal latency. But after about 30
seconds, video starts to lag relative to audio. This delay grows and
reaches 10 seconds. But the sound at the same time there is no delay.

I build sample android app and this app has exactly the same problem.

Can someone tell me which way to look and what is the problem?


Visit our blog: http://blog.pjsip.org

pjsip mailing listpjsip@lists.pjsip.orghttp://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org

--
Evgeny Nesterov


Visit our blog: http://blog.pjsip.org

pjsip mailing listpjsip@lists.pjsip.orghttp://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org

--
Evgeny Nesterov

Hi Evgeny can you please help me on improving video quality on default Android sample app. Current default sample Android pjsip pjsua2 sample app sends a very bad video quality and wish to improve them to atleast Hd quality. I have tried using below methods , but it keep on showing a very low video quality. How can i improve outgoing video quality. This sample app is able to receive upto 355 * 288 video quality from other sip video call ,but it sends a very poor video quality. Currently i have tried to achieve hd video by updating below value from MediaFormatvideo file , just before making outgoing call. And it doesnt help at all to improve outgoing video . Am i updating those attribute at wrong places ? Currently it sending video quality below 192 * 144 and doesnt accept above 352 * 288 video quality . how can i update it to support atleast 1280*720 video quality MediaFormatVideo mf=new MediaFormatVideo(); mf.setFpsNum(30); mf.setFpsDenum(1); mf.setAvgBps(512000); mf.setMaxBps(1024000); mf.setHeight(720); mf.setWidth(1280); i am updating those setting as below . MyCall call = new MyCall(account, -1); CallOpParam prm = new CallOpParam(true); AccountVideoConfig avc=new AccountVideoConfig(); MediaFormatVideo mf=new MediaFormatVideo(); Log.e("javan-video",String.valueOf(avc.getAutoShowIncoming())); Log.e("javan-videofps",String.valueOf(mf.getFpsNum())); mf.setFpsNum(30); mf.setFpsDenum(1); mf.setAvgBps(512000); mf.setMaxBps(1024000); mf.setHeight(720); mf.setWidth(1280); Log.e("javan-videofps",String.valueOf(mf.getFpsNum())); try { call.makeCall("sip:"+dialno+"@peoplefone.ch", prm); AudioManager am = (AudioManager) getSystemService(Context.AUDIO_SERVICE); am.setSpeakerphoneOn(true); // startRinging(); } catch (Exception e) { call.delete(); return; } currentCall = call; showCallActivity(); } i have found a documentation ,tried to implement ..but i couldnt able to improve video quality Framerate Specify number of frames processed per second. For encoding direction, configured via pjmedia_vid_codec_param.enc_fmt.det.vid.fps, e.g:/* Sending @30fps */ param.enc_fmt.det.vid.fps.num = 30; param.enc_fmt.det.vid.fps.denum = 1; Note: that there is a possibility that the value will be adjusted to follow remote capability. For example, if remote signals that maximum framerate supported is 10fps and locally the encoding direction framerate is set to 30fps, then 10fps will be used. limitation: if preview is enabled before call is established, capture device will opened using default framerate of the device, and subsequent calls that use that device will use this framerate regardless of the configured encoding framerate that is set above. Currently the only solution is to disable preview before establishing media and re-enable it once the video media is established. For decoding direction, two steps are needed: pjmedia_vid_codec_param.dec_fmt.det.vid.fps should be set to the highest value expected for incoming video framerate. signalling to remote, configured via codec specific SDP format parameter (fmtp): pjmedia_vid_codec_param.dec_fmtp. H263-1998, maximum framerate is specified per size/resolution basis, check here for more info./* 3000/(1.001*2) fps for CIF */ param.dec_fmtp.param[m].name = pj_str("CIF"); param.dec_fmtp.param[m].val = pj_str("2");/* 3000/(1.001*1) fps for QCIF */ param.dec_fmtp.param[n].name = pj_str("QCIF"); param.dec_fmtp.param[n].val = pj_str("1"); H264, similar to size/resolution, the framerate is implicitly specified in H264 level (check the standard specification or this) and the H264 level is signalled via H264 SDP fmtp profile-level-id, e.g:/* Can receive up to 1280×720 @30fps */ param.dec_fmtp.param[n].name = pj_str("profile-level-id"); param.dec_fmtp.param[n].val = pj_str("xxxx1f"); Bitrate Specify bandwidth requirement for video payloads stream delivery. This is configurable via pjmedia_vid_codec_param.enc_fmt.det.vid.avg_bps and pjmedia_vid_codec_param.enc_fmt.det.vid.max_bps, e.g: /* Bitrate range preferred: 512-1024kbps */ param.enc_fmt.det.vid.avg_bps = 512000; param.enc_fmt.det.vid.max_bps = 1024000; Notes: This setting is applicable for encoding and decoding direction, currently there is no way to set asymmetric bitrate. By decoding direction, actually it just means that this setting will be queried when generating bandwidth info for local SDP (see next point). The bitrate setting of all codecs will be enumerated and the highest value will be signalled in bandwidth info in local SDP (see ticket #1244). There is a possibility that the encoding bitrate will be adjusted to follow remote bitrate setting, i.e: read from SDP bandwidth info (b=TIAS line) in remote SDP. For example, if remote signals that maximum bitrate is 128kbps and locally the bitrate is set to 512kbps, then 128kbps will be used. If codec specific bitrate setting signalling (via SDP fmtp) is desired, e.g: MaxBR for H263, application should put the SDP fmtp manually, for example:/* H263 specific maximum bitrate 512kbps */ param.dec_fmtp.param[n].name = pj_str("MaxBR"); param.dec_fmtp.param[n].val = pj_str("5120"); /* = max_bps / 1 On Fri, Aug 21, 2020 at 11:07 AM Lobsang tibet <martsalobsang@gmail.com> wrote: > Hi Evgeny > > i have open pjsua2 sample project in android studio. then make sip > registration the sip registration and call is working fine. but some time > app crash on hangup action. following code for hangup. Usually after > second attempt to hangup call .. > > CallOpParam prm = new CallOpParam(); > prm.setStatusCode(pjsip_status_code.PJSIP_SC_DECLINE);currentCall.hangup(prm); > > the currentCall is my call object. > > > > Do you get same error as well > > > On Fri, Jul 31, 2020 at 5:02 PM Evgeny Nesterov <home@zbyte.ru> wrote: > >> Our investigation showed that the problem is server stream dependent. >> >> If the server sends a stream at a speed of 15 fps - all OK. >> >> If the server sends a stream at a speed of 25 fps - we have increasing >> delay. >> >> I think this is android video driver problem, which not working correctly >> when incoming stream FPS changed. >> >> >> 29.07.2020 14:31, Evgeny Nesterov пишет: >> >> I`m build without problem, but i have strange incoming video lag. And i >> can`t understand problem why lag occurs: wrong sip server? wrong use >> library? wrong android? bug in pjsip? >> 29.07.2020 14:09, Lobsang tibet пишет: >> >> hi Nesterov >> i am trying on the latest version of library without success . i am not >> able to build openh264 codec library . >> >> Any help would be high >> >> make OS=android >> NDKROOT=/home/Username/Downloads/android-ndk-r21d-linux-x86_64/android-ndk-r21d >> TARGET=android-28 >> Error >> > build/platform-android.mk:51: *** Compiler not found, bad NDKROOT or >> > ARCH?. Stop. >> >> On Wed, Jul 29, 2020 at 12:08 PM Evgeny Nesterov <home@zbyte.ru> wrote: >> >>> Hey guys! >>> >>> But in fact, does anyone use the library under Android platform? Has >>> anyone tried running sample app on the latest versions of the library? >>> >>> 23.07.2020 18:47, Evgeny Nesterov пишет: >>> > Hello, >>> > >>> > I build Android application based on pjsip library. For app i use java >>> > and pjsua2 via swig binding. >>> > >>> > When i make video call i have strange behaviour: call start normaly, >>> > video showed, audio to with minimal latency. But after about 30 >>> > seconds, video starts to lag relative to audio. This delay grows and >>> > reaches 10 seconds. But the sound at the same time there is no delay. >>> > >>> > I build sample android app and this app has exactly the same problem. >>> > >>> > Can someone tell me which way to look and what is the problem? >>> > >>> -- >>> Evgeny Nesterov >>> >>> >>> >>> _______________________________________________ >>> Visit our blog: http://blog.pjsip.org >>> >>> pjsip mailing list >>> pjsip@lists.pjsip.org >>> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org >>> >> >> _______________________________________________ >> Visit our blog: http://blog.pjsip.org >> >> pjsip mailing listpjsip@lists.pjsip.orghttp://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org >> >> -- >> Evgeny Nesterov >> >> >> _______________________________________________ >> Visit our blog: http://blog.pjsip.org >> >> pjsip mailing listpjsip@lists.pjsip.orghttp://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org >> >> -- >> Evgeny Nesterov >> >>