Re: [pjsip] pjsip Digest, Vol 56, Issue 16

Fatih Çakır
Mon, Apr 9, 2012 6:05 AM

Hi all,
This is very important to me. I need your help.
I tried to use ipv6 feature and ICE feature together at same time in PJSIP, but it did not work. I made them enable by separate.
Is it a bug or I need  to do sth to make them enable at same time?

Things I did on it:
In the pjsua_app.c
app_config.ipv6 = PJ_TRUE ;
app_config.media_cfg.enable_ice = PJ_TRUE;

Thank you,
Fatih Cakir

From: pjsip-request@lists.pjsip.org
Subject: pjsip Digest, Vol 56, Issue 16
To: pjsip@lists.pjsip.org
Date: Fri, 6 Apr 2012 12:00:09 -0400

Send pjsip mailing list submissions to
pjsip@lists.pjsip.org

To subscribe or unsubscribe via the World Wide Web, visit
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
or, via email, send a message with subject or body 'help' to
pjsip-request@lists.pjsip.org

You can reach the person managing the list at
pjsip-owner@lists.pjsip.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of pjsip digest..."

Today's Topics:

1. Re: H.264 video encoder confiduration (Fedot Fedotov)

Message: 1
Date: Fri, 6 Apr 2012 18:59:22 +0300
From: Fedot Fedotov fedot.fedotov@gmail.com
To: pjsip list pjsip@lists.pjsip.org
Subject: Re: [pjsip] H.264 video encoder confiduration
Message-ID:
CA+W8mBiKJj0ZjQZATYzsTqfc64GQBXVbggzpcSHAM1H1ejAyWg@mail.gmail.com
Content-Type: text/plain; charset="iso-8859-1"

Hello, PJSIP community!

Question about H.264 encoder configuration still not closed!
I successfully build pj-project, downloaded from svn - revision 4025.
According to advices, given to me, about H.264 encoder configuration, I
added only ONE method to native code of revision 4025:

PJ_DEF(pj_status_t) setHD(void)
{
pj_status_t status;
const pj_str_t codec_id = {"H264", 4};
pjmedia_vid_codec_param param;
status = pjsua_vid_codec_get_param(&codec_id, &param);
if(status!= PJ_SUCCESS) {
//PJ_ERROR() get codec param
return status;
}
param.enc_fmt.det.vid.size.w = 1280;
param.enc_fmt.det.vid.size.h = 720;
param.enc_fmt.det.vid.fps.num = 5;
param.enc_fmt.det.vid.fps.denum = 1;
param.enc_fmt.det.vid.avg_bps = 1024000;
param.enc_fmt.det.vid.max_bps = 2048000;
status=pjsua_vid_codec_set_param(&codec_id, &param);
if(status!= PJ_SUCCESS){
//PJ_ERROR() set codec param
return status;
}
}

this method declared in ffmpeg_codecs.h
PJ_DECL(pj_status_t) setHD(void);
I do not need decoding at pjsua side - so I did not use configuration for
decoder  param.dec_fmtp.param[0].name = pj_str("profile-level-id");
param.dec_fmtp.param[0].val = pj_str("42e033"); - this is really not needed
by me.

I call method setHD from method
static int main_func(int argc, char *argv[]) (file main.c)
after execution lines
if (app_init(argc, argv) != PJ_SUCCESS)
return 1;

Also I have to change one line in implementetion method
PJ_DEF(pj_status_t) pjmedia_vid_codec_h264_parse_fmtp(const
pjmedia_codec_fmtp *fmtp, pjmedia_vid_codec_h264_fmtp *h264_fmtp)

to stream REAL HD, but not 176x144(updated code):

 /* When profile-level-id is not specified, use default value "42000A" */
 if (h264_fmtp->profile_idc == 0) {

h264_fmtp->profile_idc = 0x42;
h264_fmtp->profile_iop = 0x00;
//h264_fmtp->level = 0x0A;
h264_fmtp->level = 0x1F;
}
SO my results:

  1. Latency is more than 5 second and increasyng permanently after start
    streaming.
  2. video quality is not good - encoder works not stable: image become gray,
    after that sharpness is not good for HD resolution.
    QUESTION1: Why I cannot stream HD video with quality of 1 Mbps?
  3. log of video call
    [DISCONNCTD] To: sip:6003@192.168.2.134;tag=as152ce637
    Call time: 00h:02m:40s, 1st res in 1132 ms, conn in 1885ms
    #0 audio GSM @8kHz, sendrecv, peer=192.168.2.134:19994
    SRTP status: Not active Crypto-suite: (null)
    RX pt=3, last update:00h:00m:00.983s ago
    total 7.8Kpkt 258.9KB (572.9KB +IP hdr) @avg=13.2Kbps/29.2Kbps
    pkt loss=0 (0.0%), discrd=0 (0.0%), dup=0 (0.0%), reord=0 (0.0%)
    (msec)    min    avg    max    last    dev
    loss period:  0.000  0.000  0.000  0.000  0.000
    jitter    :  0.125  6.267  12.250  5.750  1.190
    TX pt=3, ptime=20, last update:00h:00m:01.061s ago
    total 63pkt 2.0KB (4.5KB +IP hdr) @avg=105bps/234bps
    pkt loss=3 (4.5%), dup=0 (0.0%), reorder=0 (0.0%)
    (msec)    min    avg    max    last    dev
    loss period:  60.000  60.000  60.000  60.000  0.000
    jitter    :  37.750 115.367 264.125  38.000  55.454
    RTT msec      :  0.579  1.147  3.261  1.556  0.473
    #1 video H264, sendrecv, peer=-
    SRTP status: Not active Crypto-suite: (null)
    RX pt=97, size=720x480, fps=22.00, last update:00h:00m:05.312s ago
    total 0pkt 0B (0B +IP hdr) @avg=0bps/0bps
    pkt loss=0 (0.0%), discrd=0 (0.0%), dup=0 (0.0%), reord=0 (0.0%)
    (msec)    min    avg    max    last    dev
    loss period:  0.000  0.000  0.000  0.000  0.000
    jitter    :  0.000  0.000  0.000  0.000  0.000
    TX pt=97, size=1280x720, fps=5.00, last update:00h:00m:00.310s ago
    total 15.7Kpkt 20.23MB (20.86MB +IP hdr) @avg=1.03Mbps/1.06Mbps
    pkt loss=7193 (31.4%), dup=0 (0.0%), reorder=0 (0.0%)
    (msec)    min    avg    max    last    dev
    loss period:  0.000  2.031  4.000  3.000  0.951
    jitter    :  0.000  0.000  0.000  0.000  0.000
    RTT msec      :  1.632  7.245  19.287  2.334  4.540
    QUESTION2: Why package loss is to high?
    P.S.: I can decrease packege loss only after configured encoder with next
    paramanters: 3 FPS, 64-128 kbps.
    In other video encoders increasing bitrate usually not cause increasyng
    latency, and usually just increasing video sharpness.
    QUESTION3: Why here I cannot see this encoder behaviour?
Hi all, This is very important to me. I need your help. I tried to use ipv6 feature and ICE feature together at same time in PJSIP, but it did not work. I made them enable by separate. Is it a bug or I need to do sth to make them enable at same time? Things I did on it: In the pjsua_app.c app_config.ipv6 = PJ_TRUE ; app_config.media_cfg.enable_ice = PJ_TRUE; Thank you, Fatih Cakir > From: pjsip-request@lists.pjsip.org > Subject: pjsip Digest, Vol 56, Issue 16 > To: pjsip@lists.pjsip.org > Date: Fri, 6 Apr 2012 12:00:09 -0400 > > Send pjsip mailing list submissions to > pjsip@lists.pjsip.org > > To subscribe or unsubscribe via the World Wide Web, visit > http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org > or, via email, send a message with subject or body 'help' to > pjsip-request@lists.pjsip.org > > You can reach the person managing the list at > pjsip-owner@lists.pjsip.org > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of pjsip digest..." > > > Today's Topics: > > 1. Re: H.264 video encoder confiduration (Fedot Fedotov) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Fri, 6 Apr 2012 18:59:22 +0300 > From: Fedot Fedotov <fedot.fedotov@gmail.com> > To: pjsip list <pjsip@lists.pjsip.org> > Subject: Re: [pjsip] H.264 video encoder confiduration > Message-ID: > <CA+W8mBiKJj0ZjQZATYzsTqfc64GQBXVbggzpcSHAM1H1ejAyWg@mail.gmail.com> > Content-Type: text/plain; charset="iso-8859-1" > > Hello, PJSIP community! > > Question about H.264 encoder configuration still not closed! > I successfully build pj-project, downloaded from svn - revision 4025. > According to advices, given to me, about H.264 encoder configuration, I > added only ONE method to native code of revision 4025: > --------------------------------------------------------------------------------------------------------------- > PJ_DEF(pj_status_t) setHD(void) > { > pj_status_t status; > const pj_str_t codec_id = {"H264", 4}; > pjmedia_vid_codec_param param; > status = pjsua_vid_codec_get_param(&codec_id, &param); > if(status!= PJ_SUCCESS) { > //PJ_ERROR() get codec param > return status; > } > param.enc_fmt.det.vid.size.w = 1280; > param.enc_fmt.det.vid.size.h = 720; > param.enc_fmt.det.vid.fps.num = 5; > param.enc_fmt.det.vid.fps.denum = 1; > param.enc_fmt.det.vid.avg_bps = 1024000; > param.enc_fmt.det.vid.max_bps = 2048000; > status=pjsua_vid_codec_set_param(&codec_id, &param); > if(status!= PJ_SUCCESS){ > //PJ_ERROR() set codec param > return status; > } > } > --------------------------------------------------------------------------------------------------------------- > this method declared in ffmpeg_codecs.h > PJ_DECL(pj_status_t) setHD(void); > I do not need decoding at pjsua side - so I did not use configuration for > decoder param.dec_fmtp.param[0].name = pj_str("profile-level-id"); > param.dec_fmtp.param[0].val = pj_str("42e033"); - this is really not needed > by me. > > I call method setHD from method > static int main_func(int argc, char *argv[]) (file main.c) > after execution lines > if (app_init(argc, argv) != PJ_SUCCESS) > return 1; > > Also I have to change one line in implementetion method > PJ_DEF(pj_status_t) pjmedia_vid_codec_h264_parse_fmtp(const > pjmedia_codec_fmtp *fmtp, pjmedia_vid_codec_h264_fmtp *h264_fmtp) > > to stream REAL HD, but not 176x144(updated code): > > /* When profile-level-id is not specified, use default value "42000A" */ > if (h264_fmtp->profile_idc == 0) { > h264_fmtp->profile_idc = 0x42; > h264_fmtp->profile_iop = 0x00; > //h264_fmtp->level = 0x0A; > h264_fmtp->level = 0x1F; > } > SO my results: > 1. Latency is more than 5 second and increasyng permanently after start > streaming. > 2. video quality is not good - encoder works not stable: image become gray, > after that sharpness is not good for HD resolution. > QUESTION1: Why I cannot stream HD video with quality of 1 Mbps? > 3. log of video call > [DISCONNCTD] To: sip:6003@192.168.2.134;tag=as152ce637 > Call time: 00h:02m:40s, 1st res in 1132 ms, conn in 1885ms > #0 audio GSM @8kHz, sendrecv, peer=192.168.2.134:19994 > SRTP status: Not active Crypto-suite: (null) > RX pt=3, last update:00h:00m:00.983s ago > total 7.8Kpkt 258.9KB (572.9KB +IP hdr) @avg=13.2Kbps/29.2Kbps > pkt loss=0 (0.0%), discrd=0 (0.0%), dup=0 (0.0%), reord=0 (0.0%) > (msec) min avg max last dev > loss period: 0.000 0.000 0.000 0.000 0.000 > jitter : 0.125 6.267 12.250 5.750 1.190 > TX pt=3, ptime=20, last update:00h:00m:01.061s ago > total 63pkt 2.0KB (4.5KB +IP hdr) @avg=105bps/234bps > pkt loss=3 (4.5%), dup=0 (0.0%), reorder=0 (0.0%) > (msec) min avg max last dev > loss period: 60.000 60.000 60.000 60.000 0.000 > jitter : 37.750 115.367 264.125 38.000 55.454 > RTT msec : 0.579 1.147 3.261 1.556 0.473 > #1 video H264, sendrecv, peer=- > SRTP status: Not active Crypto-suite: (null) > RX pt=97, size=720x480, fps=22.00, last update:00h:00m:05.312s ago > total 0pkt 0B (0B +IP hdr) @avg=0bps/0bps > pkt loss=0 (0.0%), discrd=0 (0.0%), dup=0 (0.0%), reord=0 (0.0%) > (msec) min avg max last dev > loss period: 0.000 0.000 0.000 0.000 0.000 > jitter : 0.000 0.000 0.000 0.000 0.000 > TX pt=97, size=1280x720, fps=5.00, last update:00h:00m:00.310s ago > total 15.7Kpkt 20.23MB (20.86MB +IP hdr) @avg=1.03Mbps/1.06Mbps > pkt loss=7193 (31.4%), dup=0 (0.0%), reorder=0 (0.0%) > (msec) min avg max last dev > loss period: 0.000 2.031 4.000 3.000 0.951 > jitter : 0.000 0.000 0.000 0.000 0.000 > RTT msec : 1.632 7.245 19.287 2.334 4.540 > QUESTION2: Why package loss is to high? > P.S.: I can decrease packege loss only after configured encoder with next > paramanters: 3 FPS, 64-128 kbps. > In other video encoders increasing bitrate usually not cause increasyng > latency, and usually just increasing video sharpness. > QUESTION3: Why here I cannot see this encoder behaviour? >