H.264 video encoder confiduration

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

 



Hi,
   I think you need change following things in order to change video size:
   1. profile-level-id in both sides' ffmpeg_codec_desc
   2. default Encoded format (code line 914 of ffmepg_codec.c )-- this size
of default encoded format should be changed to you desired size, or else
sender only capture small video, but the receiver side will show bigger
video because render converts the video according to profile-level-id.

Bo

2012/2/10 Fedot Fedotov <fedot.fedotov at gmail.com>

> Good day to All!
>
> I try to use PJSIP stack to encode and stream video in H.264 to another
> SIP client through Asterisk server.
>
> By default I can receive only 176x144 video at receiver's side.
> I find out that in callback method
> static void pjsua_call_on_media_update(pjsip_inv_session *inv, pj_status_t
> status)
> we have local and remote SDPs:
>
> LOCAL SDP:
> rtcp4019 IN IP4 192.168.2.57
> sendrecv
> rtpmap??97 H264/90000
> fmtp97 profile-level-id=42e01e; packetization-mode=1
> rtpmap??96 H263-1998/90000
> fmtp96 CIF=1;QCIF=1
>
> REMOTE SDP:
> rtpmap??97 H264/90000
> rtpmap??96 h263-1998/90000
> sendrecv
> so, I we can see - remote SDP don't say to us nothing about requested
> resolution -> and in method
> PJ_DEF(pj_status_t) pjmedia_vid_codec_h264_parse_fmtp(const
> pjmedia_codec_fmtp *fmtp, pjmedia_vid_codec_h264_fmtp *h264_fmtp)
> we always execute code
>      if (h264_fmtp->profile_idc == 0) {
>  h264_fmtp->profile_idc = 0x42;
>  h264_fmtp->profile_iop = 0x00;
>  h264_fmtp->level = 0x0A; // mean 10 level of H.264 encoder and
> http://en.wikipedia.org/wiki/H.264 inform us about resolution = 176x144
>     }
> then I cahnged h264_fmtp->level = 0x0A; to *h264_fmtp->level = 0x1E;* and h264_fmtp->profile_iop
> = 0x00; to *h264_fmtp->profile_iop = 0xE0;* (1E mean 30th level and
> resolution 720x480) I successfully stream video with resolution 720x480.
> BUT I dislike video quality.
> *Question1*: How can I increase video quality? I already tried change bit
> rate in structure static ffmpeg_codec_desc codec_desc[] from 256000/512000
> to 512000/1024000. But this only makes video less stable(buttom part of
> frames are always greased)
> *Question2*: How can I change video resolution for outgoing stream with
> respectively bit rate changes?
> Question3: What does line mean
> {"Constrained Baseline (level=30, pack=1)", 39}},
> in *codec_desc* structure?
>
> 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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20120211/f3b6673f/attachment.html>


[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