H.264 video encoder confiduration

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Fedot,

First, a sample (pseudo code) of the usage of
pjmedia_codec_mgr_set_default_param()/pjsua_vid_codec_set_param() can
be seen in
http://www.pjsip.org/pjmedia/docs/html/group__PJMED__IPP__CODEC.htm
(note: actually it's for audio codecs, but should be similar).
To configure profile-level-id in the application should be straightforward, e.g:
==
...
param.setting.dec_fmtp.param[N].name = pj_str("profile-level-id");
param.setting.dec_fmtp.param[N].val  = pj_str("....");
...
pjmedia_codec_mgr_set_default_param();
==
Again, we'd recommend to reconfigure codec params (bitrate, framerate,
sdp fmtp, etc) using this API instead of changing the library code,
this is for your own sake :), e.g: avoid complexity of
conflict-resolving/re-patching when updating pjsip version.

About quality on the screen shots, it seems to be packet loss issue.
Well, when I mentioned about increasing bitrate, I thought the problem
was picture sharpness. Note that increasing bitrate may increase the
packet loss rate. So perhaps try to re-adjust the bitrate (decrease it
this time:) until achieving acceptable balance of packet loss rate &
picture sharpness. Further potential solution will be find a lower
(and acceptable ofc) video resolution in the sender, so bitrate can be
lowered (to minimize packet loss).

BR,
nanang


On Tue, Feb 28, 2012 at 7:32 PM, Fedot Fedotov <fedot.fedotov at gmail.com> wrote:
>
> Good day to All!
>
> I solved issue with latency!
> In fact, PJSIP streams to iPad SIP client video with FPS = 30 frames.
> And iPad CPU cannot process all the frames.
> I modified method enc_clock_cb:
>
> ?//////////////////////////////////////////////////////////////////////////
> ?g_counter++;
> ?if (g_counter % 6 == 0)? //default FPS is 30 frames -> we make 30/6 = 5 FPS
> ?{
> ? vidstream_cap_cb(vp->strm, vp, vp->frm_buf);
> ?}
> ?//////////////////////////////////////////////////////////////////////////
> //??? vidstream_cap_cb(vp->strm, vp, vp->frm_buf);
>
> I achaived FPS, supported by iPad.
> I used iPad2. On
> -FPS 30 frames iPad CPU usage was 60%;
> -FPS 10 frames iPad CPU usage was 40%;
> -FPS 5 frames iPad CPU usage was 30%.
>
> iPad was 2 cores by 1GHz each of them.
> FPS 10 and 5 frames satisfied iPad and me :-)
> in normal state iPad is consuming up to 5 % of CPU.
>
> Now I have ONLY ONE ISSUE: I have bad quality of video.
> How can it might be fixed?
>
> I made 3 types of screen shots from iPad:
> bad quality
> http://www.freeimagehosting.net/bw5z4
> half good quality
> http://www.freeimagehosting.net/q7smo
> good quality
> http://www.freeimagehosting.net/duz1n
>
> How can I fix bad blocks on the frames?
>
> Thank you!
>
>
> _______________________________________________
> Visit our blog: http://blog.pjsip.org
>
> pjsip mailing list
> pjsip at lists.pjsip.org
> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
>



[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux