Subject: [AVT] 32-bit RTP timestamp

From: Lorenzo Polidori <[email-masked]>
Date: Mon, 22 Sep 2003 14:36:47 +0200 (added by [email-masked])

Hi all,

I have an MPEG2 Elementary Stream and I have extracted from this the time
codes and temporal references of each MPEG pictures. I have some problems to
convert theese informations in 32-bit RTP timestamp. I have computed the PTS
in this way, but now I dont' know how to insert this value in a RTP timestamp:

picture_time=(time_code_picture)/(double)frame_rate;
picture_sec=(unsigned)picture_time;
picture_fract_sec=picture_time-(double)picture_sec;
tc_sec=((time_code_hours*60)+time_code_minutes)*60+time_code_seconds;
PTS=PTS_base;
PTS.sec+=tc_sec+picture_sec;
PTS.usec+=(unsigned long)(picture_fract_sec*1000000);
if (PTS.usec>=1000000) {PTS.usec-=1000000; PTS.sec++;}

Can anybody help me?

Thanks,
Lorenzo

/*******************************************************************\
*    Lorenzo POLIDORI
*    company:    BLT Italia srl        web:  http://www.blt.it
*    address:    via Rosselli, 91     city:  Lido di CAMAIORE
*    country:    ITALY                 zip:  55043-i
*    Tel. +39 0584 904788  Fax +39 0584 904789  e-mail: [email-masked]
\*******************************************************************/

_______________________________________________
Audio/Video Transport Working Group
[email-masked]
https://www1.ietf.org/mailman/listinfo/avt