mandanai / imsdroid

IMSDroid - SIP client for android
0 stars 0 forks source link

[ Doubango / IMSDroid ] propositions of patch h264 Single Nal Unit / Negociate h264 profile level / bandwidth on SDP #225

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Hi,

Here as a patch file that brings the following improvments and correction:

1/ it implements the single nal unit mode packetization that greatly improve 
the interoperability between doubango and other H.264 videophones.

2 ) It fixes the profile / level negociation

3 ) It Adds bandwidth information ( field b= on SDP )

- h264 Single Nal Unit Mode packetization.

Many SIP videophone do not support packetization mode 1 so, this patch makes 
djoubango encode in packetization mode 0 that can be decoded even if 
packetization mode 1 or 2 is negociated. On the other hand, djoubango will 
still be capable of decoding both mode O and 1. In short to be compatible with 
all the h264 decoders.

- Profile level negociation

If a remote terminal offers a different profile / level than ours, that 
standard mandates that we should negociate the lowset. This patch add this 
behavior. The profile/level settings now specify the MAXIMUM profile level 
negociable by djoubango.

- Bandwidth information on SDP (b=)

It adds the b=AS:xxx in the SDP according to the negociated profile.
This prevent remote end to send a video bitrate that is too high that causes 
slow video decoding on Android.

Building :
ffmpeg 
After patch your ffmpeg , make clean , make all and copy new static libraries 
and includes in doubango/thirdparties/android/xxxx repository 
else you have the archives of build result in attachement on the next thread 
(error 400. "That’s an error. 400" by google  ;-) .

doubango
copy x264.h x264_config.h on doubango/thirdparties/android/include ( for 
x264_nal_t definition ) 
apply patch on doubango repository and rebuild .

IMSDroid 
apply patch and rebuild .

You have IMSDroid V2 patched on file on the next thread (error 400. "That’s 
an error. 400" by google  ;-)  .

files :
doubango_h264SingleNalUnit.patch : patch for doubango V2
IMSDroid_h264SingleNalUnit.patch : patch for imsdroid V2
ffmpeg_h264SingleNalUnit.patch : patch for ffmpeg (git://git.ffmpeg.org/ffmpeg)
doubango.thirdparties.android.tar.gz : result of ffmpeg build (arm5) for 
doubango
imsdroid_V2.apk : IMSDroid V2 with all patch .

Best regards

 philippe 

PS : Have make another solution for SingleNalUnit , with dynamic memory 
allocation , but pointer are randomly corrupted , i understand if you have an 
idea ?
file : doubango_h264SignleNalDynamic.patch

Original issue reported on code.google.com by verney.p...@gmail.com on 4 May 2011 at 9:23

Attachments:

GoogleCodeExporter commented 9 years ago
Sorry , 
but i can not post build result of ffmpeg and imsdroid_V2.apk with all patch 
(Project attachment quota exceeded.) .
If the administrator have a solution ? .

Bye ,
Philippe

Original comment by verney.p...@gmail.com on 4 May 2011 at 10:16

GoogleCodeExporter commented 9 years ago
@verney.p...@gmail.com
You can send it to me and I'll host it on the website with a link here.

Original comment by boss...@yahoo.fr on 5 May 2011 at 11:01

GoogleCodeExporter commented 9 years ago
My email address is bossiel(at)yahoo(dot)fr

Original comment by boss...@yahoo.fr on 5 May 2011 at 11:02

GoogleCodeExporter commented 9 years ago
I have added the file. The complete link is: 
http://imsdroid.googlecode.com/svn/branches/2.0/tests-apk/imsdroid_V2.apk.7z.
One question: Why is it so big (10Mo)?

Original comment by boss...@yahoo.fr on 7 May 2011 at 5:05

GoogleCodeExporter commented 9 years ago
Hi ,

Thank you for the post . for 10 mo limit , i dont say , but have message 
"Project attachment quota exceeded". , perhaps encoding data to send file ( 
uuencode , or others ... ) 
Bye .
Philippe 

Original comment by verney.p...@gmail.com on 9 May 2011 at 5:44

GoogleCodeExporter commented 9 years ago
Hello , 

Sorry a little syntax error on file doubango_h264SingleNalUnit.patch : line 780

 +        TSK_DEBUG_ERROR("tdav_codec_h264_nalu_process size of nal (%d) > %d , rejected ",
+                        x264_nal->i_payload <= H264_RTP_PAYLOAD_SIZE );     

replace by :

+        TSK_DEBUG_ERROR("tdav_codec_h264_nalu_process size of nal (%d) > %d , 
rejected ",
+                        x264_nal->i_payload , H264_RTP_PAYLOAD_SIZE );  

Bye ,

Philippe    

Original comment by verney.p...@gmail.com on 10 May 2011 at 5:37

GoogleCodeExporter commented 9 years ago
Any plans to incorporate these patches in the 2.0 branch for better h264 
interop with other video endpoints?

Original comment by saket...@gmail.com on 28 Jun 2011 at 12:51

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Hi ,
For my test have use git ffmpeg and x264 ,
git://git.videolan.org/x264.git
git://git.ffmpeg.org/ffmpeg/

Have not update recently  ;-)

I always use the same process , but have suppress "--disable-asm " ( thank
boss !)

bye ,
Philippe

Original comment by verney.p...@gmail.com on 12 Jul 2011 at 6:58