[jitsi-dev] problem with jitisi-android


#1

Hi Pawel,Oliver,
    I failed to login with the openfire server since the project migrated to Git, so i can't test , i am using the older project from java.net.
    Now i got a new problem when testing video which i didn't notice before:
    When i am communicating with Extranet peers(set IsIceUse to be true), audio and video streams from the Extranet PC will delay for 20+seconds or even failed , but the streams to the Extranet PC (from Intranet android device) it is quite soon;
    on the contrary , if i set IsIceUse to be false, the problem will disappear, but only Intranet conmmunicate is avaibable.
    Have you met this issue before ?
Regards,
Ray

···

------------------------------

Message: 2
Date: Thu, 27 Jun 2013 10:52:21 +0200
From: Pawe? Domas <pawel.domas@jitsi.org>
To: Oliver Chong <ochong@gmail.com>
Cc: Jitsi Developers <dev@jitsi.org>
Subject: Re: [jitsi-dev] ??? Fw:problem with jitisi-android
Message-ID:
  <CAME7wR7DO+VmVvY8G6L=gDoBEWNxzc8AEAdaB8zfdZuZN2aGVA@mail.gmail.com>
Content-Type: text/plain; charset=UTF-8

Hi Oliver,

Thanks for investigating the problem. The reason why I've put
setVideoSize method there was, because that's how I understood the
previous code. I thought that those 3 bytes refer to the size, but
after looking at SPS sequence specification it's much more
complicated, so for now I'm removing this method completly. I'll get
back to it when I'll try to add possibility to adjust video size.

Regards,
Pawel

On Wed, Jun 26, 2013 at 8:51 PM, Oliver Chong <ochong@gmail.com> wrote:

Hi Pawel,

I just gave the latest code a try. In its current form it doesn't work, but
I determined why. The values being used to modify the SPS byte array in
H264Parameters.java setVideoSize() based on the video resolution are
incorrect (at least for my device). If I comment out the call to
setVideoSize() in DataSource.java it works.

The video on my device is 640x480 and here are the SPS values:
seq_parameter_set_rbsp
        = new byte[]
        {
                (byte) 0x67,
                (byte) 0x42,
                (byte) 0x80,
                (byte) 0x28,
                (byte) 0xE9,
                (byte) 0x01,
                (byte) 0x40,
                (byte) 0x7B,
                (byte) 0x20
        };

Note the values in array position 6,7,8.

Maybe it would be best to simply recalibrate anytime any video setting is
changed as the test video should have the full correct PPS and SPS values?

- Oliver

On Wed, Jun 26, 2013 at 12:06 PM, Pawe? Domas <pawel.domas@jitsi.org> wrote:

Hi Oliver, Ray,

I've tried to solve the issue as Ray described that is by recording
short video and extracting those parameters. Then they're cached and
reused, so it's one time calibration. Also I've made attempt to
discard ??? ??? detected as NAL length. Could you please give a try
for the latest git version and report if it works now on your devices
?

Regards,
Pawel

On Tue, Jun 25, 2013 at 9:21 PM, Oliver Chong <ochong@gmail.com> wrote:
>
> So I've got the video working on the Galaxy S3 GT-I9300. Hopefully this
> will help others. Your info was great Ray.
>
> It does not have the NAL length issue.
>
> The PPS and SPS parameters are as follows:
>
> pic_parameter_set_rbsp
> = new byte[]
> {
> (byte) 0x68,
> (byte) 0xee,
> (byte) 0x06,
> (byte) 0xf2
> };
> seq_parameter_set_rbsp
> = new byte[]
> {
> (byte) 0x67,
> (byte) 0x42,
> (byte) 0x80,
> (byte) 0x28,
> (byte) 0xE9,
> (byte) 0x01,
> (byte) 0x40,
> (byte) 0x7B,
> (byte) 0x20
> };
>
> Everything generally seems to be working well though if the orientation
> changes it sometimes causes Jitsi to freeze while video is enabled.
>
>
>
>
> On Thu, Jun 20, 2013 at 9:34 AM, MAXWELL <95143848@qq.com> wrote:
>>
>> Hi Pawel,
>> First,to avoid the exception of nalLength(to get the real nalLength),
>> eight bytes of "3F" shoule be discarded(this is specific to my device):
>> else if (type == MEDIA_DATA_BOX_TYPE)
>> {
>> Log.d("DataSource","type is:MEDIA_DATA_BOX_TYPE");
>> long dis = 0;
>> long dis1 = 0;
>> dis = readUnsignedInt(inputStream,4);
>> dis1 = readUnsignedInt(inputStream,4);
>> second, in the method:
>> private void setParameterSets(Dimension size){};
>> PPS and SPS is changed to:
>> else
>> {
>> Log.d("DataSource","others");
>> pic_parameter_set_rbsp
>> = new byte[]
>> {
>> // (byte) 0x68,
>> // (byte) 0xce,
>> // (byte) 0x3c,
>> // (byte) 0x80
>> (byte) 0x68,
>> (byte) 0xce,
>> (byte) 0x06,
>> (byte) 0xe2
>> };
>> seq_parameter_set_rbsp
>> = new byte[]
>> {
>> // (byte) 0x67,
>> // (byte) 0x42,
>> // (byte) 0x80,
>> // (byte) 0x1e,
>> // (byte) 0x95,
>> // (byte) 0xa0,
>> // (byte) 0x58,
>> // (byte) 0x25,
>> // (byte) 0x10,
>>
>> (byte) 0x67,
>> (byte) 0x42,
>> (byte) 0xC0,
>> (byte) 0x16,
>> (byte) 0xE9,
>> (byte) 0x01,
>> (byte) 0x40,
>> (byte) 0x7B,
>> (byte) 0x20,
>> };
>>
>> The parameters should be set according to the MPEG-4 file,you can find
>> them in the file i sent you ealier,the file name is:love.MPEG_4.
>> Regards ,
>> Ray
>> ------------------ ??? ------------------
>> ???: "Pawe? Domas"<pawel.domas@jitsi.org>;
>> ???: 2013?6?20?(???) ??9:12
>> ???: "MAXWELL"<95143848@qq.com>;
>> ??: "dev"<dev@jitsi.org>;
>> ??: Re: Fw:problem with jitisi-android
>>
>> Hi Ray,
>>
>> Could please send a patch with your changes that fixed the problem ?
>>
>> I've been trying to compare our parameters from mpeg files and they are
>> different indeed. But mine doesn't exactly match those hardcoded and it
>> still works.
>>
>> Regards,
>> Pawel
>>
>>
>> On Thu, Jun 20, 2013 at 10:59 AM, MAXWELL <95143848@qq.com> wrote:
>>>
>>> Hi,Pawel,
>>> The problem has been fixed to some extent, this is what i did:
>>>
>>> This method is to specify PPS and SPS for different devices, we
>>> should set SPS?PPS according to the file
>>> (THE full mpeg-4 file,not the raw stream ) we got earlier,as shown
>>> below,PPS and SPS is located behind avcC,(there's lot of information about
>>> SPS AND PPS ,so i am not going to tell the details, it's quite easy).
>>> And it works .
>>> Also thanks Oliver ,your suggestion is also helpful.
>>> Regards ,
>>> Ray
>>> ////////////////////////
>>>
>>> Hi Ray,
>>>
>>> I've recorder sample video using "DUMP_FILE" method which uses
>>> streaming
>>> format. By comparing those two and looking at the code you're right:
>>> it's
>>> expected that 3f3f3f3f will be nalLength in your case. I'm not
>>> familiar yet
>>> with those box types and so on, but I'll be looking at it soon. If it
>>> might
>>> be of any help for you my dump file is attached.
>>>
>>> Regards,
>>> Pawel
>>
>>
>>
>> _______________________________________________
>> dev mailing list
>> dev@jitsi.org
>> Unsubscribe instructions and other list options:
>> http://lists.jitsi.org/mailman/listinfo/dev
>
>

------------------------------

_______________________________________________
dev mailing list
dev@jitsi.org
http://lists.jitsi.org/mailman/listinfo/dev

End of dev Digest, Vol 3, Issue 108
***********************************


#2

Hi Ray,

I've noticed recently that it takes much more time to connect than
before. From the logs I can see that it waits for ICE negotiations to
complete and then call connects and it works. Maybe it's worth to
discuss it in a separate thread.

What is the problem with logging to openfire ? Could you describe it
in more details and send some logs ? Maybe we should start a new
thread about this issue also.

Regards,
Pawel

···

On Thu, Jun 27, 2013 at 12:41 PM, MAXWELL <95143848@qq.com> wrote:

Hi Pawel,Oliver,
    I failed to login with the openfire server since the project migrated to
Git, so i can't test , i am using the older project from java.net.
    Now i got a new problem when testing video which i didn't notice before:
    When i am communicating with Extranet peers(set IsIceUse to be true),
audio and video streams from the Extranet PC will delay for 20+seconds or
even failed , but the streams to the Extranet PC (from Intranet android
device) it is quite soon;
    on the contrary , if i set IsIceUse to be false, the problem will
disappear, but only Intranet conmmunicate is avaibable.
    Have you met this issue before ?
Regards,
Ray

------------------------------

Message: 2
Date: Thu, 27 Jun 2013 10:52:21 +0200
From: Pawe? Domas <pawel.domas@jitsi.org>
To: Oliver Chong <ochong@gmail.com>
Cc: Jitsi Developers <dev@jitsi.org>
Subject: Re: [jitsi-dev] ??? Fw:problem with jitisi-android
Message-ID:
<CAME7wR7DO+VmVvY8G6L=gDoBEWNxzc8AEAdaB8zfdZuZN2aGVA@mail.gmail.com>
Content-Type: text/plain; charset=UTF-8

Hi Oliver,

Thanks for investigating the problem. The reason why I've put
setVideoSize method there was, because that's how I understood the
previous code. I thought that those 3 bytes refer to the size, but
after looking at SPS sequence specification it's much more
complicated, so for now I'm removing this method completly. I'll get
back to it when I'll try to add possibility to adjust video size.

Regards,
Pawel

On Wed, Jun 26, 2013 at 8:51 PM, Oliver Chong <ochong@gmail.com> wrote:

Hi Pawel,

I just gave the latest code a try. In its current form it doesn't work,
but
I determined why. The values being used to modify the SPS byte array in
H264Parameters.java setVideoSize() based on the video resolution are
incorrect (at least for my device). If I comment out the call to
setVideoSize() in DataSource.java it works.

The video on my device is 640x480 and here are the SPS values:
seq_parameter_set_rbsp
        = new byte[]
        {
                (byte) 0x67,
                (byte) 0x42,
                (byte) 0x80,
                (byte) 0x28,
                (byte) 0xE9,
                (byte) 0x01,
                (byte) 0x40,
                (byte) 0x7B,
                (byte) 0x20
        };

Note the values in array position 6,7,8.

Maybe it would be best to simply recalibrate anytime any video setting is
changed as the test video should have the full correct PPS and SPS values?

- Oliver

On Wed, Jun 26, 2013 at 12:06 PM, Pawe? Domas <pawel.domas@jitsi.org> >> wrote:

Hi Oliver, Ray,

I've tried to solve the issue as Ray described that is by recording
short video and extracting those parameters. Then they're cached and
reused, so it's one time calibration. Also I've made attempt to
discard ??? ??? detected as NAL length. Could you please give a try
for the latest git version and report if it works now on your devices
?

Regards,
Pawel

On Tue, Jun 25, 2013 at 9:21 PM, Oliver Chong <ochong@gmail.com> wrote:
>
> So I've got the video working on the Galaxy S3 GT-I9300. Hopefully
> this
> will help others. Your info was great Ray.
>
> It does not have the NAL length issue.
>
> The PPS and SPS parameters are as follows:
>
> pic_parameter_set_rbsp
> = new byte[]
> {
> (byte) 0x68,
> (byte) 0xee,
> (byte) 0x06,
> (byte) 0xf2
> };
> seq_parameter_set_rbsp
> = new byte[]
> {
> (byte) 0x67,
> (byte) 0x42,
> (byte) 0x80,
> (byte) 0x28,
> (byte) 0xE9,
> (byte) 0x01,
> (byte) 0x40,
> (byte) 0x7B,
> (byte) 0x20
> };
>
> Everything generally seems to be working well though if the orientation
> changes it sometimes causes Jitsi to freeze while video is enabled.
>
>
>
>
> On Thu, Jun 20, 2013 at 9:34 AM, MAXWELL <95143848@qq.com> wrote:
>>
>> Hi Pawel,
>> First,to avoid the exception of nalLength(to get the real nalLength),
>> eight bytes of "3F" shoule be discarded(this is specific to my
>> device):
>> else if (type == MEDIA_DATA_BOX_TYPE)
>> {
>> Log.d("DataSource","type is:MEDIA_DATA_BOX_TYPE");
>> long dis = 0;
>> long dis1 = 0;
>> dis = readUnsignedInt(inputStream,4);
>> dis1 = readUnsignedInt(inputStream,4);
>> second, in the method:
>> private void setParameterSets(Dimension size){};
>> PPS and SPS is changed to:
>> else
>> {
>> Log.d("DataSource","others");
>> pic_parameter_set_rbsp
>> = new byte[]
>> {
>> // (byte) 0x68,
>> // (byte) 0xce,
>> // (byte) 0x3c,
>> // (byte) 0x80
>> (byte) 0x68,
>> (byte) 0xce,
>> (byte) 0x06,
>> (byte) 0xe2
>> };
>> seq_parameter_set_rbsp
>> = new byte[]
>> {
>> // (byte) 0x67,
>> // (byte) 0x42,
>> // (byte) 0x80,
>> // (byte) 0x1e,
>> // (byte) 0x95,
>> // (byte) 0xa0,
>> // (byte) 0x58,
>> // (byte) 0x25,
>> // (byte) 0x10,
>>
>> (byte) 0x67,
>> (byte) 0x42,
>> (byte) 0xC0,
>> (byte) 0x16,
>> (byte) 0xE9,
>> (byte) 0x01,
>> (byte) 0x40,
>> (byte) 0x7B,
>> (byte) 0x20,
>> };
>>
>> The parameters should be set according to the MPEG-4 file,you can
>> find
>> them in the file i sent you ealier,the file name is:love.MPEG_4.
>> Regards ,
>> Ray
>> ------------------ ??? ------------------
>> ???: "Pawe? Domas"<pawel.domas@jitsi.org>;
>> ???: 2013?6?20?(???) ??9:12
>> ???: "MAXWELL"<95143848@qq.com>;
>> ??: "dev"<dev@jitsi.org>;
>> ??: Re: Fw:problem with jitisi-android

>>
>> Hi Ray,
>>
>> Could please send a patch with your changes that fixed the problem ?
>>
>> I've been trying to compare our parameters from mpeg files and they
>> are
>> different indeed. But mine doesn't exactly match those hardcoded and
>> it
>> still works.
>>
>> Regards,
>> Pawel
>>
>>
>> On Thu, Jun 20, 2013 at 10:59 AM, MAXWELL <95143848@qq.com> wrote:
>>>
>>> Hi,Pawel,
>>> The problem has been fixed to some extent, this is what i did:
>>>
>>> This method is to specify PPS and SPS for different devices, we
>>> should set SPS?PPS according to the file

>>> (THE full mpeg-4 file,not the raw stream ) we got earlier,as shown
>>> below,PPS and SPS is located behind avcC,(there's lot of information
>>> about
>>> SPS AND PPS ,so i am not going to tell the details, it's quite easy).
>>> And it works .
>>> Also thanks Oliver ,your suggestion is also helpful.
>>> Regards ,
>>> Ray
>>> ////////////////////////
>>>
>>> Hi Ray,
>>>
>>> I've recorder sample video using "DUMP_FILE" method which uses
>>> streaming
>>> format. By comparing those two and looking at the code you're right:
>>> it's
>>> expected that 3f3f3f3f will be nalLength in your case. I'm not
>>> familiar yet
>>> with those box types and so on, but I'll be looking at it soon. If it
>>> might
>>> be of any help for you my dump file is attached.
>>>
>>> Regards,
>>> Pawel
>>
>>
>>
>> _______________________________________________
>> dev mailing list
>> dev@jitsi.org
>> Unsubscribe instructions and other list options:
>> http://lists.jitsi.org/mailman/listinfo/dev
>
>

------------------------------

_______________________________________________
dev mailing list
dev@jitsi.org
http://lists.jitsi.org/mailman/listinfo/dev

End of dev Digest, Vol 3, Issue 108
***********************************