RTSP playback:Difference between VLC and Android's build-in OpenCore
I am working on an Android app to play video stream in RTSP protocol, which provided by the Darwin streaming server.
My problem is that the RTSP stream cannot be played using Android's VideoView/MediaPlayer via some specific WiFi hotspots, e.g. at my workplace. I searched around and found that Darwin streaming server use UDP Ports 6970 - 6999 for media data streaming, and the firewall may be the problem. but the same stream can be played using VLC on PC via the same WiFi hotspot.
What's the difference between the mechanism that VLC and the Android's build-in media framework OpenCore use? Is that possible for me t开发者_如何学Goo write my own rtsp client with live555's openRTSP source on Android? Any help will be very appreciated.
Bolton
I've used wireshark to scan my network and I think I now know the difference: When I use android emulator, I can see the client keeps sending UDP requests through ports 6970, 6971 but get no response. And when using VLC, the RTP data is transfered in TCP via port 554. And the problem is caused by the firewall I think.
As you stated in your answer VLC Switches to Interleaved Rtp over Rtsp when Udp fails.
This is why VLC continues to work.
You can use my library @ https://net7mma.codeplex.com/ if you can use .Net or you can use it as a reference for your own development.
精彩评论