Changes between Version 45 and Version 46 of Video_Users_Guide
- Timestamp:
- Apr 2, 2012 2:20:49 AM (12 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Video_Users_Guide
v45 v46 309 309 Specify video picture dimension. 310 310 311 a. For encoding direction, configured via {{{pjmedia_vid_codec_param.enc_fmt. vid.size}}}, e.g:311 a. For encoding direction, configured via {{{pjmedia_vid_codec_param.enc_fmt.det.vid.size}}}, e.g: 312 312 {{{ 313 313 /* Sending 1280 x 720 */ 314 param.enc_fmt. vid.size.w = 1280;315 param.enc_fmt. vid.size.h = 720;314 param.enc_fmt.det.vid.size.w = 1280; 315 param.enc_fmt.det.vid.size.h = 720; 316 316 }}} 317 317 Note that there is a possibility that the value will be adjusted to follow remote capability. For example, if remote signals that maximum resolution supported is 640 x 480 and locally the encoding direction size is set to 1280 x 720, then 640 x 480 will be used. 318 318 b. For decoding direction, two steps are needed: 319 1. {{{pjmedia_vid_codec_param.dec_fmt. vid.size}}} should be set to the highest value expected for incoming video size.319 1. {{{pjmedia_vid_codec_param.dec_fmt.det.vid.size}}} should be set to the highest value expected for incoming video size. 320 320 2. signalling to remote, configured via codec specific SDP format parameter (fmtp): {{{pjmedia_vid_codec_param.dec_fmtp}}}. 321 321 - H263-1998, e.g: … … 324 324 param.dec_fmtp.param[n].name = pj_str("CIF"); 325 325 /* The value actually specifies framerate, see framerate section below */ 326 param.dec_fmtp.param[n].val ue= pj_str("1");326 param.dec_fmtp.param[n].val = pj_str("1"); 327 327 /* 2nd preference: 176 x 144 (QCIF) */ 328 328 param.dec_fmtp.param[n+1].name = pj_str("QCIF"); 329 329 /* The value actually specifies framerate, see framerate section below */ 330 param.dec_fmtp.param[n+1].val ue= pj_str("1");330 param.dec_fmtp.param[n+1].val = pj_str("1"); 331 331 }}} 332 332 - H264, the size is implicitly specified in H264 level (check the standard specification or [http://en.wikipedia.org/wiki/H.264/MPEG-4_AVC#Levels this]) and on SDP, the H264 level is signalled via H264 SDP fmtp [http://tools.ietf.org/html/rfc6184#section-8.1 profile-level-id], e.g: … … 335 335 param.dec_fmtp.param[n].name = pj_str("profile-level-id"); 336 336 /* Set the profile level to "1f", which means level 3.1 */ 337 param.dec_fmtp.param[n].val ue= pj_str("xxxx1f");337 param.dec_fmtp.param[n].val = pj_str("xxxx1f"); 338 338 }}} 339 339 … … 342 342 Specify number of frames processed per second. 343 343 344 a. For encoding direction, configured via {{{pjmedia_vid_codec_param.enc_fmt. vid.fps}}}, e.g:344 a. For encoding direction, configured via {{{pjmedia_vid_codec_param.enc_fmt.det.vid.fps}}}, e.g: 345 345 {{{ 346 346 /* Sending @30fps */ 347 param.enc_fmt. vid.fps.num = 30;348 param.enc_fmt. vid.fps.denum = 1;347 param.enc_fmt.det.vid.fps.num = 30; 348 param.enc_fmt.det.vid.fps.denum = 1; 349 349 }}} 350 350 Note that there is a possibility that the value will be adjusted to follow remote capability. For example, if remote signals that maximum framerate supported is 10fps and locally the encoding direction framerate is set to 30fps, then 10fps will be used. 351 351 b. For decoding direction, two steps are needed: 352 1. {{{pjmedia_vid_codec_param.dec_fmt. vid.fps}}} should be set to the highest value expected for incoming video framerate. Note that it is even better if this is set to 1.5x (or more) of the expected incoming framerate because the renderer will use this setting for its clock and there is always possibility that remote clock runs a bit faster (clock drift), so setting it higher will avoid high latency issue caused by clock drift.352 1. {{{pjmedia_vid_codec_param.dec_fmt.det.vid.fps}}} should be set to the highest value expected for incoming video framerate. Note that it is even better if this is set to 1.5x (or more) of the expected incoming framerate because the renderer will use this setting for its clock and there is always possibility that remote clock runs a bit faster (clock drift), so setting it higher will avoid high latency issue caused by clock drift. 353 353 2. signalling to remote, configured via codec specific SDP format parameter (fmtp): {{{pjmedia_vid_codec_param.dec_fmtp}}}. 354 354 - H263-1998, maximum framerate is specified per size/resolution basis, check [http://tools.ietf.org/html/rfc4629#section-8.1.1 here] for more info. … … 356 356 /* 3000/(1.001*2) fps for CIF */ 357 357 param.dec_fmtp.param[m].name = pj_str("CIF"); 358 param.dec_fmtp.param[m].val ue= pj_str("2");358 param.dec_fmtp.param[m].val = pj_str("2"); 359 359 /* 3000/(1.001*1) fps for QCIF */ 360 360 param.dec_fmtp.param[n].name = pj_str("QCIF"); 361 param.dec_fmtp.param[n].val ue= pj_str("1");361 param.dec_fmtp.param[n].val = pj_str("1"); 362 362 }}} 363 363 - H264, similar to size/resolution, the framerate is implicitly specified in H264 level (check the standard specification, or http://en.wikipedia.org/wiki/H.264/MPEG-4_AVC#Levels) and the H264 level is signalled via H264 SDP fmtp {{{profile-level-id}}}, e.g: … … 365 365 /* Can receive up to 1280×720 @30fps */ 366 366 param.dec_fmtp.param[n].name = pj_str("profile-level-id"); 367 param.dec_fmtp.param[n].val ue= pj_str("xxxx1f");367 param.dec_fmtp.param[n].val = pj_str("xxxx1f"); 368 368 }}} 369 369 … … 372 372 Specify bandwidth requirement for video payloads stream delivery. 373 373 374 This is configurable via {{{pjmedia_vid_codec_param.enc_fmt. vid.avg_bps}}} and {{{pjmedia_vid_codec_param.enc_fmt.vid.max_bps}}}, e.g:374 This is configurable via {{{pjmedia_vid_codec_param.enc_fmt.det.vid.avg_bps}}} and {{{pjmedia_vid_codec_param.enc_fmt.det.vid.max_bps}}}, e.g: 375 375 {{{ 376 376 /* Bitrate range preferred: 512-1024kbps */ 377 param.enc_fmt. vid.avg_bps = 512000;378 param.enc_fmt. vid.max_bps = 1024000;377 param.enc_fmt.det.vid.avg_bps = 512000; 378 param.enc_fmt.det.vid.max_bps = 1024000; 379 379 }}} 380 380 … … 387 387 /* H263 specific maximum bitrate 512kbps */ 388 388 param.dec_fmtp.param[n].name = pj_str("MaxBR"); 389 param.dec_fmtp.param[n].val ue= pj_str("5120"); /* = max_bps / 100 */389 param.dec_fmtp.param[n].val = pj_str("5120"); /* = max_bps / 100 */ 390 390 }}} 391 391