<DIV>Hi all</DIV>
<DIV> </DIV>
<DIV>As I am new to implementing RTSP/RTCP protocol, I thought I would seek help from this mailing list.</DIV>
<DIV><BR>I would like to explain my understanding here with respect to audio video synchronization after PAUSE/RESUME and during seek.Request you to correct me if Iam wrong.There are ideally 2 ways the streaming server gives the client,synchronization information for audio and video.</DIV>
<DIV><BR>1. RTSP PLAY Response<BR>If RTSP is used as the control channel, after an RTSP PAUSE and PLAY the server sends a play response before sending the first packet after resume in which it tells the RTP time stamp for both audio and video which would be in synch.<BR>Ideally the implementation on the Client for the audio video synchronization would be , after getting the first packet after resume calculate the offset for the first packet's RTP timestamp from the reference RTPtimestamp got from the PLay response in both the audio and video threads seperately and increment the presentation time by that offset(after dividing it by the RTp timestamp frequency say 44100 for audio) so that they would be in synch.<BR>Am I right in this understanding?</DIV>
<DIV>Now given this understanding is right, we won't need the wallclock synchronization at all as the RTP timestamp is purely based on the number of samples sent in the packet in which case we won't need the RTCP implementation at all.<BR>What am I missing here?</DIV>
<DIV> </DIV>
<DIV>2.RTCP sender report</DIV>
<DIV>The RTP sender report sends the NTP timestamp which would be synchronized for both server and client and for both audio and video and an RTP timestamp associated with it.Ideally after pause and resume after we get the RTCP sender report, we take the RTP timesatamp sent in the RTCP sender report use that as a reference calculate the offset of the first audio and video packets after resume from the reference RTP timestamp and calculate the presentation time in the same way as explained above.</DIV>
<DIV><BR>If this is correct what I don't understand is </DIV>
<DIV> </DIV>
<DIV>1.How is the NTP time associated with the RTP timestamp if RTp timestamp is purely based on the sample count in the packet?</DIV>
<DIV> </DIV>
<DIV>In general I have the following queries regarding how the server sends the RTP time stamp in the play response as well as in the RTCP sender report.</DIV>
<DIV> </DIV>
<DIV>1.Suppose the RTPtimestamp for audio=12345 and RTP Timestamp for Video=123456 at the point they were paused.<BR>After Resume the first audio and video packet should have an RTP timestamp of say audio=12360 and video=123486 ideally if we assume that the packets sent has 15 audio samples and 30 video samples respectively.Is my understanding right or is the duration of PAUSE has to do anything with the RTPtimestamps(in the sense would the server calculate the RTPtimestamp of the first packet based on what it would have been if we did not pause at all based on the wall clocktime?)</DIV>
<DIV> </DIV>
<DIV>It would be really helpful if anyone could validate or clarify my understanding.Though this is slightly out of topic I think it would be really useful for those who are new to this.</DIV>
<DIV> </DIV>
<DIV>Thanks and Regards<BR>Shobana V</DIV>
<DIV> </DIV>
<DIV><BR><BR><B><I>live-devel-request@ns.live.com</I></B> wrote:</DIV>
<BLOCKQUOTE class=replbq style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid">Send live-devel mailing list submissions to<BR>live-devel@lists.live.com<BR><BR>To subscribe or unsubscribe via the World Wide Web, visit<BR>http://lists.live.com/mailman/listinfo/live-devel<BR>or, via email, send a message with subject or body 'help' to<BR>live-devel-request@lists.live.com<BR><BR>You can reach the person managing the list at<BR>live-devel-owner@lists.live.com<BR><BR>When replying, please edit your Subject line so it is more specific<BR>than "Re: Contents of live-devel digest..."<BR><BR><BR>Today's Topics:<BR><BR>1. RTP URL (Omenkeukwu, Gregory)<BR>2. Re: RTP URL (Ross Finlayson)<BR>3. RTSP url (Uday Sinha)<BR>4. Re: RTSP url (Ross Finlayson)<BR>5. Re: RTSP url (Uday Sinha)<BR>6. Re: RTSP url (Ross Finlayson)<BR>7. Re: RTSP url (Uday Sinha)<BR>8. Re: RTSP url (Ross Finlayson)<BR>9. WebCam as Frame Source (Ioannis
Skazikis)<BR><BR><BR>----------------------------------------------------------------------<BR><BR>Message: 1<BR>Date: Wed, 31 Aug 2005 16:14:06 -0500<BR>From: "Omenkeukwu, Gregory" <OMENKEUKWUG@AMERICANIMAGING.NET><BR>Subject: [Live-devel] RTP URL<BR>To: "'live-devel@lists.live.com'" <LIVE-DEVEL@NS.LIVE.COM><BR>Message-ID:<BR><3D083A0287FC9648B9D6F907A94A354D01EA8342@xchsrv01.DEERFIELD.AIM.local><BR><BR>Content-Type: text/plain; charset=iso-8859-1<BR><BR><BR><BR>> <BR>> <BR>> Hello, <BR>> I am developing a web based application for RTP urls but I am having<BR>> problems finding internet radio stations transmitting RTP. It seems most<BR>> of the internet radio stations are transmitting HTTP. Please I will like<BR>> to get a list of online streaming audio urls in RTP. If you have any<BR>> available please send them to me, I will greatly appreciate it. Thanks<BR>> <BR>> Greg Omenkeukwu<BR>> gregsnips@yahoo.com
<BR><BR><BR>------------------------------<BR><BR>Message: 2<BR>Date: Wed, 31 Aug 2005 14:29:16 -0700<BR>From: Ross Finlayson <FINLAYSON@LIVE.COM><BR>Subject: Re: [Live-devel] RTP URL<BR>To: "LIVE.COM Streaming Media - development & use"<BR><LIVE-DEVEL@NS.LIVE.COM><BR>Message-ID: <6.2.3.4.1.20050831142550.03209eb0@localhost><BR>Content-Type: text/plain; charset="us-ascii"; format=flowed<BR><BR><BR>> > I am developing a web based application for RTP urls but I am having<BR>> > problems finding internet radio stations transmitting RTP. It seems most<BR>> > of the internet radio stations are transmitting HTTP. Please I will like<BR>> > to get a list of online streaming audio urls in RTP. If you have any<BR>> > available please send them to me, I will greatly appreciate it. Thanks<BR><BR>RTP URLs have never been standardized, and are generally a bad idea, <BR>because they don't convey enough information to fully describe a stream.<BR><BR>Instead,
RTSP URLs (i.e., beginning with "rtsp://") are the standard.<BR><BR>You can find several such URLs by typing "url:rtsp" into Google.<BR><BR><BR>Ross Finlayson<BR>LIVE.COM<BR><HTTP: www.live.com /><BR><BR><BR>------------------------------<BR><BR>Message: 3<BR>Date: Wed, 31 Aug 2005 22:07:15 +0000<BR>From: "Uday Sinha" <U_SINHA@HOTMAIL.COM><BR>Subject: [Live-devel] RTSP url<BR>To: live-devel@ns.live.com<BR>Message-ID: <BAY101-F346A19815E8623FC6D29798A10@PHX.GBL><BR>Content-Type: text/plain; charset="us-ascii"<BR><BR>An HTML attachment was scrubbed...<BR>URL: http://lists.live.com/pipermail/live-devel/attachments/20050831/569423a2/attachment-0001.html<BR><BR>------------------------------<BR><BR>Message: 4<BR>Date: Wed, 31 Aug 2005 15:18:39 -0700<BR>From: Ross Finlayson <FINLAYSON@LIVE.COM><BR>Subject: Re: [Live-devel] RTSP url<BR>To: "LIVE.COM Streaming Media - development & use"<BR><LIVE-DEVEL@NS.LIVE.COM><BR>Message-ID:
<6.2.3.4.1.20050831151746.03200430@localhost><BR>Content-Type: text/plain; charset="us-ascii"; format=flowed<BR><BR><BR>>I am trying use LIVE.COM streaming client using openRTSP.exe. I need <BR>>a rtsp url, preferably with windows, mpeg content, and that does not <BR>>use real codecs since they are not supported on LIVE.COM's. Will <BR>>appreciate a url that works with LIVE.COM streamer. Thanks.<BR><BR>Try<BR>rtsp://christianchallenge.org/ccistream/sunday.mp4<BR><BR>This is MPEG-4 video and audio. It plays in QuickTime Player, VLC <BR>(which uses the "LIVE.COM Streaming Media" code), and "openRTSP".<BR><BR><BR>Ross Finlayson<BR>LIVE.COM<BR><HTTP: www.live.com /><BR><BR><BR>------------------------------<BR><BR>Message: 5<BR>Date: Wed, 31 Aug 2005 23:19:52 +0000<BR>From: "Uday Sinha" <U_SINHA@HOTMAIL.COM><BR>Subject: Re: [Live-devel] RTSP url<BR>To: live-devel@ns.live.com<BR>Message-ID: <BAY101-F19515904CCF59D69549B8898A10@PHX.GBL><BR>Content-Type: text/plain;
charset="us-ascii"<BR><BR>An HTML attachment was scrubbed...<BR>URL: http://lists.live.com/pipermail/live-devel/attachments/20050831/33dc2a13/attachment-0001.html<BR><BR>------------------------------<BR><BR>Message: 6<BR>Date: Wed, 31 Aug 2005 16:26:49 -0700<BR>From: Ross Finlayson <FINLAYSON@LIVE.COM><BR>Subject: Re: [Live-devel] RTSP url<BR>To: "LIVE.COM Streaming Media - development & use"<BR><LIVE-DEVEL@NS.LIVE.COM><BR>Message-ID: <6.2.3.4.1.20050831162510.03213720@localhost><BR>Content-Type: text/plain; charset="us-ascii"; format=flowed<BR><BR>At 04:19 PM 8/31/2005, you wrote:<BR><BR>>Thanks for RTSP url. However, I do not get the audio on speaker. An <BR>>audio file [audio-MPEG4-GENERIC-1] is created yet the file is empty. <BR>>Am I doing something wrong.<BR><BR>Yes, the "-a" option requests that audio be output to *standard <BR>output* (and that video not be received).<BR><BR>If you omit the "-a" option, you'll get two output files - one <BR>containing
video; the other containing audio.<BR><BR><BR>Ross Finlayson<BR>LIVE.COM<BR><HTTP: www.live.com /><BR><BR><BR>------------------------------<BR><BR>Message: 7<BR>Date: Thu, 01 Sep 2005 00:38:04 +0000<BR>From: "Uday Sinha" <U_SINHA@HOTMAIL.COM><BR>Subject: Re: [Live-devel] RTSP url<BR>To: live-devel@ns.live.com<BR>Message-ID: <BAY101-F11AC7DC655F0DAD0BDFBC398A00@PHX.GBL><BR>Content-Type: text/plain; charset="us-ascii"<BR><BR>An HTML attachment was scrubbed...<BR>URL: http://lists.live.com/pipermail/live-devel/attachments/20050901/fb2c10a9/attachment-0001.html<BR><BR>------------------------------<BR><BR>Message: 8<BR>Date: Wed, 31 Aug 2005 17:44:12 -0700<BR>From: Ross Finlayson <FINLAYSON@LIVE.COM><BR>Subject: Re: [Live-devel] RTSP url<BR>To: "LIVE.COM Streaming Media - development & use"<BR><LIVE-DEVEL@NS.LIVE.COM><BR>Message-ID: <6.2.3.4.1.20050831174259.03228110@localhost><BR>Content-Type: text/plain; charset="us-ascii"; format=flowed<BR><BR>At 05:38 PM 8/31/2005, you
wrote:<BR><BR>>Looks like there is some problem with the server. Can you stream on <BR>>your end with following command:<BR>><BR>>openRTSP -e 50.0 rtsp://christianchallenge.org/ccistream/sunday.mp4<BR><BR>Yes, it works for me.<BR><BR>Perhaps you're yet another person who's behind a firewall that's <BR>blocking UDP? If so, add the "-t" option to "openRTSP", to request <BR>RTP-over-TCP streaming.<BR><BR><BR>Ross Finlayson<BR>LIVE.COM<BR><HTTP: www.live.com /><BR><BR><BR>------------------------------<BR><BR>Message: 9<BR>Date: Thu, 01 Sep 2005 08:32:50 +0300<BR>From: Ioannis Skazikis <ISKAZ@INTRACOM.GR><BR>Subject: [Live-devel] WebCam as Frame Source<BR>To: live-devel@ns.live.com<BR>Message-ID: <43169282.9080004@intracom.gr><BR>Content-Type: text/plain; charset="iso-8859-1"<BR><BR>Hallo,<BR><BR>I try to build an RTSP Live Video Stream server based on the live media<BR>library.<BR><BR>I have also read the live Media FAQ + Mailing List and tryed to follow<BR>your
answers to questions from the mailing list archive from others<BR>having the same problem like me.<BR><BR>The program is based on the testMPEG4VideoStreammer testprogramm found<BR>in the liveMedia library.<BR><BR>Based on the DeviseSource.cpp I wrote an DeviceSourceCammera subclass of<BR>the FramedSource" which opens a USB Camera, grubs an Image and decodes<BR>it with help of the Revel Lib (XVID encoding Lib) to MPEG4.<BR><BR>The functions which open the device and starts the Server look like this:<BR><BR>void init_play(){<BR><BR>// Open the input source<BR>DeviceParameters params;<BR><BR>fileSource = DeviceSourceCammera::createNew(*env, params);<BR>if (fileSource == NULL) {<BR>*env << "Unable to open source\n";<BR>exit(1);<BR>}<BR><BR>}<BR><BR>void play() {<BR><BR>FramedSource* videoES = fileSource;<BR><BR>// Create a framer for the Video Elementary Stream:<BR>videoSource = MPEG4VideoStreamFramer::createNew(*env, videoES);<BR><BR>// Finally, start playing:<BR>*env <<
"Beginning to read from file...\n";<BR>videoSink->startPlaying(*videoSource, afterPlaying, videoSink);<BR>}<BR><BR>>From debuging outputs implemented in the DeviceSourceCammera.cpp by<BR>running the programm I can see that it really opens the device, grab a<BR>frame and encodes it (the procedure repeats it self), but if I start the<BR>mplayer, it connects to the servers reads the sdp , it writes as output<BR>at the end "Found video stream: 0" ,but it does not starts to play the<BR>stream. It stays there with out do nothing (like waiting frames, but<BR>never receives them)<BR><BR>Any Idea why (or what?) is happening?<BR><BR>The DeviceSourceCammera.cpp is included in this e-mail.<BR>lvsMain.cpp is the "Main" file with the server start up code (also<BR>included in this e-mail)<BR>DeviceUtil.hh is the Header file which includes the basic Function of my<BR>code for handling the WebCam device. (this works, I have encoded a<BR>video file, before to play with the LiveMedia
Lib.)<BR><BR>The subclass Functions look like this. If you need more details please<BR>ask me or have a look in the attached files...<BR><BR>DeviceSourceCammera::DeviceSourceCammera(UsageEnvironment& env,<BR>DeviceParameters params)<BR>: DeviceSource(env, params){<BR><BR>init(); // Open Device<BR>}<BR><BR>void DeviceSourceCammera::doGetNextFrame() {<BR><BR>grab_image(); //Take a Frame from the Camera<BR><BR>if (0 /* the source stops being readable */) {<BR>handleClosure(this);<BR>fprintf(stderr,"In Grab Image V4l, the source stops being readable<BR>!!!!\n");<BR>return;<BR>}<BR><BR>deliverFrame(); // call DeviceSourceCammera::deliverFrame() Function.<BR>}<BR><BR>DeviceSourceCammera::deliverFrame() {<BR><BR>//Encoding the grub frame from the Camera<BR><BR>if (get_grab_size() > fMaxSize){<BR>frameSize = fMaxSize;<BR>}<BR>else frameSize = get_grab_size();<BR><BR>fTo = (unsigned char*)malloc(frameSize);<BR><BR>memcpy(fTo, frame.pixels, frameSize); // frame.pixels is the
buffer<BR>where the grubed frame is now encoded, framesize the size of the encoded<BR>frame<BR>}<BR><BR>Thank you very much for your help and your time !!!!<BR>Sorry about my bad english too.<BR><BR>Ioannis.<BR><BR><BR>-------------- next part --------------<BR>A non-text attachment was scrubbed...<BR>Name: DeviceSourceCammera.cpp<BR>Type: text/x-c++src<BR>Size: 6173 bytes<BR>Desc: not available<BR>Url : http://lists.live.com/pipermail/live-devel/attachments/20050901/95c419c3/DeviceSourceCammera.bin<BR>-------------- next part --------------<BR>A non-text attachment was scrubbed...<BR>Name: DeviceSourceCammera.hh<BR>Type: text/x-c++hdr<BR>Size: 679 bytes<BR>Desc: not available<BR>Url : http://lists.live.com/pipermail/live-devel/attachments/20050901/95c419c3/DeviceSourceCammera-0001.bin<BR>-------------- next part --------------<BR>A non-text attachment was scrubbed...<BR>Name: DeviceUtil.cpp<BR>Type: text/x-c++src<BR>Size: 3680 bytes<BR>Desc: not available<BR>Url :
http://lists.live.com/pipermail/live-devel/attachments/20050901/95c419c3/DeviceUtil.bin<BR>-------------- next part --------------<BR>A non-text attachment was scrubbed...<BR>Name: DeviceUtil.hh<BR>Type: text/x-c++hdr<BR>Size: 501 bytes<BR>Desc: not available<BR>Url : http://lists.live.com/pipermail/live-devel/attachments/20050901/95c419c3/DeviceUtil-0001.bin<BR>-------------- next part --------------<BR>A non-text attachment was scrubbed...<BR>Name: lvsMain.cpp<BR>Type: text/x-c++src<BR>Size: 3670 bytes<BR>Desc: not available<BR>Url : http://lists.live.com/pipermail/live-devel/attachments/20050901/95c419c3/lvsMain.bin<BR>-------------- next part --------------<BR>A non-text attachment was scrubbed...<BR>Name: revel.h<BR>Type: text/x-chdr<BR>Size: 9981 bytes<BR>Desc: not available<BR>Url : http://lists.live.com/pipermail/live-devel/attachments/20050901/95c419c3/revel.bin<BR><BR>------------------------------<BR><BR>_______________________________________________<BR>live-devel
mailing list<BR>live-devel@lists.live.com<BR>http://lists.live.com/mailman/listinfo/live-devel<BR><BR><BR>End of live-devel Digest, Vol 22, Issue 34<BR>******************************************<BR></BLOCKQUOTE><p>__________________________________________________<br>Do You Yahoo!?<br>Tired of spam? Yahoo! Mail has the best spam protection around <br>http://mail.yahoo.com