i still have problems streaming live contents utsing rtsp, and it may be due to the fact that i don't have huge knowledge on how rtsp/rtp/rtcp works.
To my mind, the client initiate a connection to Wowza using rtsp. It issues DESCRIBE/OPTIONS/PLAY. Then Wowza reply with a port to connect using RTP (udp), and the client initiate a UDP connection to the port. Regularly, Wowza send RTCP packets on the connection, and if the client does not answer in a defined time, Wowza shut it down.
is that correct?
What i don't understand is that it does not work for me if i use vlc/mplayer to read the stream, unless i force rtp over tcp. What i don't understand is that there is no filtering of udp/tcp on both side (client/server).
using tcpdump, i clearly see the tcp packets corresponding to the rtsp communications, then i see the udp packets corresponding to the rtp communication, and after that, i see a UDP packet corresponding to ICMP (i assume it is RTCP) on the same port than the RTP, that is dropped (connection refused, port unreachable) and shortly after, the UDP/RTP packets stops and the player stops.
So, if anyone can explain to me why it doesn't work using udp, but works using tcp, it would be great.
Your description is correct (one small mistake, it is DESCRIBE/SETUP/PLAY). The RTP over UDP problem is some kind of network problem on your side. We have tons of customers doing RTSP/RTP over UDP to VLC, QuickTime and MPlayer. It works great for me.
So I would try different network setups, configuration and different playback setups. You should be able to narrow down the problem. The fact that you are seeing ICMP port unreachable messages makes it sound like it is a firewall issue. NAT can be a big factor as well. NAT traversal is very tricky with UDP. If you are behind NAT you might try mapping all UDP ports to your local ip address to see if that helps. I know that is what I need to do on my internal network at home. I have all UDP ports mapped to my development machine's ip address. Without this UDP does not work.
It is just the way RTP works. Some firewalls are able to handle the NAT traversal. Some are not. That is why so much of streaming is moving to TCP based methods. The HTTP based methods are even more reliable.