linphone-developers
[Top][All Lists]
Advanced

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

[Linphone-developers] Re: About oRTP Latency


From: Simon Morlat
Subject: [Linphone-developers] Re: About oRTP Latency
Date: Mon, 12 Oct 2009 15:19:48 +0200
User-agent: KMail/1.12.1 (Linux/2.6.30-1-amd64; KDE/4.3.1; x86_64; ; )

Hi Hunk,

It is a bad idea to assume that your camera is really 30 fps. In mostly all 
cameras, the fps depends on light and can vary a bit.
You need to compute your timestamps derived from the computer time (as given 
by gettimeofday() or clock_gettime() ).
The formula is timestamp=current_time*payload_clockrate
In your case the clock_rate is 90000 (default for all video payloads).
The current time can be retrieved like this:
gettimeofday(&tv,NULL);
float current_time=tv.tv_sec + (((float)tv.tv_usec)*1e-6);

Note that there is no need for a timestamp to start from zero.

Simon

Le dimanche 11 octobre 2009 15:40:36, Hung Mark a écrit :
> Dear Simon,
> 
> 
> 
> I seems find some problem with my program, i use the h264 profile with rtp
>  settings as below
> 
> 
> 
>     media_profile = rtp_profile_new("AV profile H264 Video");
> 
>     rtp_profile_set_payload(media_profile,102,&payload_type_h264);
> 
>     rtp_session_set_profile(session, media_profile);
> 
>     rtp_session_set_payload_type(session,102);
> 
> 
> 
> and the timestamp i add 3000(90HZ/30fps) per frame, but the 6sec latency
>  will occur after my program run about few minutes,
> 
> 
> 
> when i modify the timestamp to increase 2500 per frame, the latency is
> less then 1sec, but i don't know why, my camera is 30 fps,
> 
> 
> 
> it seems not a correct solution, if anyone know how to resolve it, i
>  appreciate any help.
> 
> Best Regards,
> 
> Hunk
> 
> 
> From: address@hidden
> To: address@hidden; address@hidden
> Subject: About oRTP Latency
> Date: Tue, 6 Oct 2009 14:13:47 +0000
> 
> 
> 
> 
> 
> 
> 
> 
> Dear Simon,
> 
> My program have low latency requirement, and i set the
>  rtp_session_set_jitter_compensation() less then 50
> 
> and enable rtp_session_enable_adaptive_jitter(), when my program start, the
>  latency is less then 1 second,
> 
> but after few minutes, the latency will increase to 6 second, to achieve
>  this, beside the
> 
> rtp_session_set_jitter_compensation() and
>  rtp_session_enable_adaptive_jitter(), which parameters i should fine tune
>  in oRTP
> 
> 聰明搜尋和瀏覽網路的免費工具列 — Windows Live 工具列
> _________________________________________________________________
> 用部落格分享照片、影音、趣味小工具和最愛清單,盡情秀出你自己 — Windows Live Spaces
> http://home.spaces.live.com/?showUnauth=1&lc=1028
> 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]