[Live-devel] problem about udp port

romater jrzhao at opwaytech.cn
Thu Sep 27 08:51:08 PDT 2007


Hello:
           EveryOne, Thanks for your help!
           Now my problem is that: I developed a client player on 
"openRtsp",I open the client player to connect the stream server
where they are behind different NAT .after client player connect the stream 
serve by
rtsp protocal successed,the stream serve begin send the video rtp 
packets,but the rtp
packets can not arrive to the client player. The cause maybe is that: the
rtp packets can not find the the client player rtp port because the
Nat block. I think if mapping all the udp port it is too trouble,The 
software vlc
can solve this problem,but I do not known how it do?
----- Original Message ----- 
From: <live-devel-request at ns.live555.com>
To: <live-devel at ns.live555.com>
Sent: Wednesday, September 26, 2007 12:53 PM
Subject: live-devel Digest, Vol 47, Issue 16


> Send live-devel mailing list submissions to
> live-devel at lists.live555.com
>
> To subscribe or unsubscribe via the World Wide Web, visit
> http://lists.live555.com/mailman/listinfo/live-devel
> or, via email, send a message with subject or body 'help' to
> live-devel-request at lists.live555.com
>
> You can reach the person managing the list at
> live-devel-owner at lists.live555.com
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of live-devel digest..."
>
>
> Today's Topics:
>
>   1. Getting a list of available streams (Rutherford, Robert)
>   2. Re: Getting a list of available streams (Ross Finlayson)
>   3. Re: live-devel Digest, Vol 47, Issue 15 (romater)
>   4. Re: live-devel Digest, Vol 47, Issue 15 (Ross Finlayson)
>   5. Re: live-devel Digest, Vol 47, Issue 15 (Brian Gitonga Marete)
>   6. Re: live-devel Digest, Vol 47, Issue 15 (Ross Finlayson)
>   7. Streaming a H.264 file (Raymond Tam)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Tue, 25 Sep 2007 12:03:38 -0400
> From: "Rutherford, Robert" <rruthe02 at harris.com>
> Subject: [Live-devel] Getting a list of available streams
> To: <live-devel at ns.live555.com>
> Message-ID:
> <505F93C737C4B647A0007D96439B71770268F404 at mlbe2k7.cs.myharris.net>
> Content-Type: text/plain; charset="us-ascii"
>
> I have always used RTSP to request a single known MPEG2-TS.  Now, I
> would like to be able to ask the media server what MPEG files are
> available for streaming.  Can I do this with a DESCRIBE command?  Do the
> files need to be registered as media sessions in order for the server to
> know they exist and are available.  I would like to be able to inform
> the client of multiple files, not just tracks within a single file.
> Thanks!
>
> - Rob Rutherford,
> Harris Corporation
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: 
> http://lists.live555.com/pipermail/live-devel/attachments/20070925/23fc334b/attachment-0001.html
>
> ------------------------------
>
> Message: 2
> Date: Tue, 25 Sep 2007 11:26:01 -0700
> From: Ross Finlayson <finlayson at live555.com>
> Subject: Re: [Live-devel] Getting a list of available streams
> To: LIVE555 Streaming Media - development & use
> <live-devel at ns.live555.com>
> Message-ID: <f06240800c31f02bd1c99@[66.80.62.44]>
> Content-Type: text/plain; charset="us-ascii"
>
>>I have always used RTSP to request a single known MPEG2-TS.  Now, I
>>would like to be able to ask the media server what MPEG files are
>>available for streaming.  Can I do this with a DESCRIBE command?
>
> No.  There's nothing in the RTSP protocol that lets you do this.
> -- 
>
> Ross Finlayson
> Live Networks, Inc.
> http://www.live555.com/
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: 
> http://lists.live555.com/pipermail/live-devel/attachments/20070925/90113489/attachment-0001.html
>
> ------------------------------
>
> Message: 3
> Date: Wed, 26 Sep 2007 08:59:14 -0700
> From: "romater" <jrzhao at opwaytech.cn>
> Subject: Re: [Live-devel] live-devel Digest, Vol 47, Issue 15
> To: <live-devel at ns.live555.com>
> Message-ID: <000401c80056$2fb7a0d0$3e00a8c0 at jrzhao>
> Content-Type: text/plain; format=flowed; charset="iso-8859-1";
> reply-type=original
>
> Hello:
>           EveryOne, Thanks for your help!
>           Now my problem is that: my client player and the stream server
> are behind different NAT ,after client player connect the stream serve by
> rtsp protocal,the stream serve begin send the video rtp packets,but the 
> rtp
> packets can not arrive to the client player. The cause maybe is that: the
> rtp packets can not find the the client player client rtp port because the
> Nat. I think if mapping all the udp port it is too trouble,The software 
> vlc
> can solve this problem,but I do not known how it do?
> ----- Original Message ----- 
> From: <live-devel-request at ns.live555.com>
> To: <live-devel at ns.live555.com>
> Sent: Tuesday, September 25, 2007 6:56 AM
> Subject: live-devel Digest, Vol 47, Issue 15
>
>
>> Send live-devel mailing list submissions to
>> live-devel at lists.live555.com
>>
>> To subscribe or unsubscribe via the World Wide Web, visit
>> http://lists.live555.com/mailman/listinfo/live-devel
>> or, via email, send a message with subject or body 'help' to
>> live-devel-request at lists.live555.com
>>
>> You can reach the person managing the list at
>> live-devel-owner at lists.live555.com
>>
>> When replying, please edit your Subject line so it is more specific
>> than "Re: Contents of live-devel digest..."
>>
>>
>> Today's Topics:
>>
>>   1. Re: (no subject) (Ross Finlayson)
>>   2. Re: (no subject) (Bob Koninckx)
>>   3. question (romater)
>>   4. Re: question (shalom shushan)
>>   5. Re: question (Ross Finlayson)
>>
>>
>> ----------------------------------------------------------------------
>>
>> Message: 1
>> Date: Mon, 24 Sep 2007 14:45:21 -0700
>> From: Ross Finlayson <finlayson at live555.com>
>> Subject: Re: [Live-devel] (no subject)
>> To: LIVE555 Streaming Media - development & use
>> <live-devel at ns.live555.com>
>> Message-ID: <f06240804c31ddf5bac2d@[66.80.62.44]>
>> Content-Type: text/plain; charset="us-ascii"
>>
>>>Now my problem is: where and how do I get these lines to be executed ?
>>>startPlaying is called right before starting up Live555's event loop.
>>>But then my main thread is just looping forever in
>>>scheduler->doEventLoop();
>>
>> Yes, because "LIVE555 Streaming Media" applications are event-driven
>> (i.e., from within an event loop).  Therefore, you need to trigger
>> your code using an event.
>>
>> The easiest way to do this is using a 'watch variable', as described in
>> http://www.live555.com/liveMedia/faq.html#exiting-event-loop
>> -- 
>>
>> Ross Finlayson
>> Live Networks, Inc.
>> http://www.live555.com/
>> -------------- next part --------------
>> An HTML attachment was scrubbed...
>> URL:
>> http://lists.live555.com/pipermail/live-devel/attachments/20070924/2308a6f4/attachment-0001.html
>>
>> ------------------------------
>>
>> Message: 2
>> Date: Tue, 25 Sep 2007 08:45:30 +0200
>> From: Bob Koninckx <bob.koninckx at gmail.com>
>> Subject: Re: [Live-devel] (no subject)
>> To: LIVE555 Streaming Media - development & use
>> <live-devel at ns.live555.com>
>> Message-ID: <1190702730.3637.12.camel at lucretius.esaturnus.com>
>> Content-Type: text/plain
>>
>> Hi guys, thanks for all your help. Just for your information, I solved
>> it like this, and it works perfect for me, just wondering if there are
>> more elegant solutions, though.
>>
>> Derived my own specialised taskscheduler from BasicTaskScheduler wich
>> implements its event loop like this
>>
>> void
>> NucleusTaskScheduler::doEventLoop( char * watchVariable, unsigned
>> maxDelay )
>> {
>>    //
>>    // Schedule the command handler before actually starting up the
>> eventLoop
>>    //
>>    TaskFunc * taskfunc = reinterpret_cast< TaskFunc *
>>>( &NucleusTaskScheduler::sCommandHandler );
>>    m_commandhandler = scheduleDelayedTask( 0, taskfunc, this );
>>
>>    while (1) {
>>        if (watchVariable != NULL && *watchVariable != 0) break;
>>        SingleStep( maxDelay );
>>    }
>>
>>    unscheduleDelayedTask( m_commandhandler );
>> }
>>
>> In addition, I added a thread safe command queue (an
>> ACE_Activation_Queue, for those who are familiar with ACE) which the
>> handler checks and empties every time it is scheduled. Now I can send
>> asynchronous requests from any thread to start/stop streaming without
>> leaving Live555's event loop and with guarantees that things are
>> scheduled when they should.
>>
>> Bob
>>
>> On Mon, 2007-09-24 at 14:45 -0700, Ross Finlayson wrote:
>>> > Now my problem is: where and how do I get these lines to be
>>> > executed ?
>>> > startPlaying is called right before starting up Live555's event
>>> > loop.
>>> > But then my main thread is just looping forever in
>>> > scheduler->doEventLoop();
>>>
>>>
>>> Yes, because "LIVE555 Streaming Media" applications are event-driven
>>> (i.e., from within an event loop).  Therefore, you need to trigger
>>> your code using an event.
>>>
>>>
>>> The easiest way to do this is using a 'watch variable', as described
>>> in
>>>         http://www.live555.com/liveMedia/faq.html#exiting-event-loop
>>> -- 
>>>
>>> Ross Finlayson
>>> Live Networks, Inc.
>>> http://www.live555.com/
>>> _______________________________________________
>>> live-devel mailing list
>>> live-devel at lists.live555.com
>>> http://lists.live555.com/mailman/listinfo/live-devel
>>
>>
>>
>> ------------------------------
>>
>> Message: 3
>> Date: Tue, 25 Sep 2007 16:42:49 -0700
>> From: "romater" <jrzhao at opwaytech.cn>
>> Subject: [Live-devel] question
>> To: <live-devel at ns.live555.com>
>> Message-ID: <002101c7ffcd$c8a98580$3e00a8c0 at jrzhao>
>> Content-Type: text/plain; charset="gb2312"
>>
>> Hello:
>>       I have developed a client player by live555 which based  on "rtsp"
>> protocal, now I find a question is that ?camera server in my local 
>> network
>> ,the client player can get the rtp packets from a camera server which
>> support the "rtsp" protocal and successing play.,but when my client 
>> player
>> is in my local network and the camera server in another local network(the
>> camera server rtsp port 554 is mapping), I can setup the connection
>> between player and camera server by rtsp port 554,but the client can not
>> get the camera rtp packet. why?(I use MPlayer in linux and the problem
>> also exsit)
>>
>>
>> Thanks
>>
>> Romater
>> -------------- next part --------------
>> An HTML attachment was scrubbed...
>> URL:
>> http://lists.live555.com/pipermail/live-devel/attachments/20070925/e676f086/attachment-0001.html
>>
>> ------------------------------
>>
>> Message: 4
>> Date: Tue, 25 Sep 2007 11:39:27 +0200
>> From: "shalom shushan" <shalom.shushan at gmail.com>
>> Subject: Re: [Live-devel] question
>> To: "LIVE555 Streaming Media - development & use"
>> <live-devel at ns.live555.com>
>> Message-ID:
>> <df7ab6a30709250239r2fec8beeg6182cec4068fd4b7 at mail.gmail.com>
>> Content-Type: text/plain; charset="gb2312"
>>
>> Hi Romater,
>> You need to map also UDP ports between client and server.
>> the video packets is going over UDP.
>>
>>
>> On 9/26/07, romater <jrzhao at opwaytech.cn> wrote:
>>>
>>>  Hello:
>>>        I have developed a client player by live555 which based  on 
>>> "rtsp"
>>> protocal, now I find a question is that ?camera server in my local
>>> network
>>> ,the client player can get the rtp packets from a camera server which
>>> support the "rtsp" protocal and successing play.,but when my client
>>> player
>>> is in my local network and the camera server in another local 
>>> network(the
>>> camera server rtsp port 554 is mapping), I can setup the connection
>>> between
>>> player and camera server by rtsp port 554,but the client can not get the
>>> camera rtp packet. why?(I use MPlayer in linux and the problem also
>>> exsit)
>>>
>>>
>>>
>>> Thanks
>>>
>>> Romater
>>>
>>> _______________________________________________
>>> live-devel mailing list
>>> live-devel at lists.live555.com
>>> http://lists.live555.com/mailman/listinfo/live-devel
>>>
>>>
>> -------------- next part --------------
>> An HTML attachment was scrubbed...
>> URL:
>> http://lists.live555.com/pipermail/live-devel/attachments/20070925/1504abba/attachment-0001.html
>>
>> ------------------------------
>>
>> Message: 5
>> Date: Tue, 25 Sep 2007 06:55:02 -0700
>> From: Ross Finlayson <finlayson at live555.com>
>> Subject: Re: [Live-devel] question
>> To: LIVE555 Streaming Media - development & use
>> <live-devel at ns.live555.com>
>> Message-ID: <f06240801c31ec365a412@[66.80.62.44]>
>> Content-Type: text/plain; charset="iso-8859-1"
>>
>>>        I have developed a client player by
>>>live555 which based  on "rtsp" protocal, now I
>>>find a question is that ?Fcamera server in my
>>>local network ,the client player can get the rtp
>>>packets from a camera server which support the
>>>"rtsp" protocal and successing play.,but when my
>>>client player is in my local network and the
>>>camera server in another local network(the
>>>camera server rtsp port 554 is mapping), I can
>>>setup the connection between player and camera
>>>server by rtsp port 554,but the client can not
>>>get the camera rtp packet. why?(I use MPlayer in
>>>linux and the problem also exsit)
>>
>> Without any diagnostic output, I have no way ot
>> knowing what might be going wrong.
>>
>> You could also try running our "openRTSP"
>> command-line RTSP client (with the -V option, for
>> verbose output): http://www.live555.com/openRTSP/
>> -- 
>>
>> Ross Finlayson
>> Live Networks, Inc.
>> http://www.live555.com/
>> -------------- next part --------------
>> An HTML attachment was scrubbed...
>> URL:
>> http://lists.live555.com/pipermail/live-devel/attachments/20070925/706528d5/attachment.html
>>
>> ------------------------------
>>
>> _______________________________________________
>> live-devel mailing list
>> live-devel at lists.live555.com
>> http://lists.live555.com/mailman/listinfo/live-devel
>>
>>
>> End of live-devel Digest, Vol 47, Issue 15
>> ******************************************
>>
>>
>
>
>
> ------------------------------
>
> Message: 4
> Date: Tue, 25 Sep 2007 18:06:25 -0700
> From: Ross Finlayson <finlayson at live555.com>
> Subject: Re: [Live-devel] live-devel Digest, Vol 47, Issue 15
> To: LIVE555 Streaming Media - development & use
> <live-devel at ns.live555.com>
> Message-ID: <f06240805c31f60a0d7ec@[66.80.62.44]>
> Content-Type: text/plain; charset="us-ascii" ; format="flowed"
>
>>The software vlc
>>can solve this problem,but I do not known how it do?
>
> VLC solves this problem by requesting RTP-over-TCP streaming.  Your
> client can do the same.
> -- 
>
> Ross Finlayson
> Live Networks, Inc.
> http://www.live555.com/
>
>
> ------------------------------
>
> Message: 5
> Date: Wed, 26 Sep 2007 14:45:51 +0300
> From: Brian Gitonga Marete <marete at edgenet.co.ke>
> Subject: Re: [Live-devel] live-devel Digest, Vol 47, Issue 15
> To: LIVE555 Streaming Media - development & use
> <live-devel at ns.live555.com>
> Message-ID: <1190807151.1832.15.camel at delta.local>
> Content-Type: text/plain
>
> On Wed, 2007-09-26 at 08:59 -0700, romater wrote:
>> Hello:
>>            EveryOne, Thanks for your help!
>>            Now my problem is that: my client player and the stream
>> server
>> are behind different NAT ,after client player connect the stream serve
>> by
>> rtsp protocal,the stream serve begin send the video rtp packets,but
>> the rtp
>> packets can not arrive to the client player. The cause maybe is that:
>> the
>> rtp packets can not find the the client player client rtp port because
>> the
>> Nat. I think if mapping all the udp port it is too trouble,The
>> software vlc
>> can solve this problem,but I do not known how it do?
>
> Hello,
>
> Anyone should correct me if I am wrong, but I think the problem is that
> the multimedia data suddenly starts arriving at the NATing/Masquerading
> router "out of the band" the connection was initially negotiated on.
> They are UDP packets destined for internal ports from which no previous
> packets have been sent (since the negotiation was via TCP.) Thus, the
> router does not know where to send them internally. For something like
> NTP or DNS, even though they operate via UDP, the router is able to keep
> some sort of "session" since the "connection" is initiated from inside.
> So it knows where to send the reply packets (internally.) This is not
> true for UDP packets that start arriving due to some RTSP session.
>
> There are probably some high-end routers that can "track" the RTSP
> negotiation and send the UDP packets to the proper place when they start
> arriving. I know that there is some unofficial "conntrack" module for
> the Linux kernel that does the same thing. Search for it on Google if
> that can be a solution for you.
>
> BGM.
>
>
>
> ------------------------------
>
> Message: 6
> Date: Wed, 26 Sep 2007 07:07:30 -0700
> From: Ross Finlayson <finlayson at live555.com>
> Subject: Re: [Live-devel] live-devel Digest, Vol 47, Issue 15
> To: LIVE555 Streaming Media - development & use
> <live-devel at ns.live555.com>
> Message-ID: <f06240810c3201762b4e3@[66.80.62.44]>
> Content-Type: text/plain; charset="us-ascii" ; format="flowed"
>
> The bottom line here is that you cannot run a RTSP server behind a
> NAT, unless you are satisfied with accessing the server's streams
> using RTP-over-TCP only.
>
> The IETF is currently working on standardizing techniques (probably
> based on ICE) that may allow RTSP servers behind a NAT to work, and
> if/when this is standardized, we will likely implement it.  Until
> that time, however, you should run publically-accessible RTSP servers
> on real, public IP addresses.
> -- 
>
> Ross Finlayson
> Live Networks, Inc.
> http://www.live555.com/
>
>
> ------------------------------
>
> Message: 7
> Date: Wed, 26 Sep 2007 12:53:03 -0700
> From: "Raymond Tam" <rtam at 2wire.com>
> Subject: [Live-devel] Streaming a H.264 file
> To: <live-devel at ns.live555.com>
> Message-ID:
> <C4B1FCEB9160544D855BABD13C09DFD70214A2F1 at sjcexch01.corp.2wire.com>
> Content-Type: text/plain; charset="us-ascii"
>
> Hi,
>
>
>
> I've just started looking into the live555 libraries, and I'm already
> very impressed by the work that has been done on it. I understand that
> there's no test program that streams H.264 file. So I'd to write a test
> program to stream a H.264 file to a client like QuickTime.
>
>
>
> The format of the input file that I want to stream is: a Program Stream
> that contains H.264 video PES packets (i.e. NAL units in the ES) and AAC
> audio PES packets.
>
>
>
> My questions are:
>
> 1. I'm planning to follow the example of
> testMPEG1or2AudioVideoStreamer.cpp and write my own
> testH264AudioVideoStreamer.cpp. Is that a good approach?
> 2. What other functions do I need to implement? (Please note that
> my input file is a Program Stream that contains PES packets)
> 3. Since PTS is already present in the PES header, will that make
> my life somewhat easier in a way that I can just use that PTS for the
> PTS in RTP header?
>
>
>
> Thank you in advance!
>
>
>
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: 
> http://lists.live555.com/pipermail/live-devel/attachments/20070926/12b42aea/attachment.html
>
> ------------------------------
>
> _______________________________________________
> live-devel mailing list
> live-devel at lists.live555.com
> http://lists.live555.com/mailman/listinfo/live-devel
>
>
> End of live-devel Digest, Vol 47, Issue 16
> ******************************************
>
> 



More information about the live-devel mailing list