'Why MediaPlayer on Android doesn't play via RTSP but Vitamio does?

MediaPlayer will throw error 1, -1005 - ERROR_CONNECTION_LOST (via http://android.joao.jp/2011/07/mediaplayer-errors.html) when I open RTSP stream:

E/MediaPlayer(27899): Error (1,-1005)
D/VideoView(27899): Error: 1,-1005

but Vitamio this stream will play, with error:

E/Vitamio(27899): Couldn't open file on client side, trying server side rtsp://host:80/path_to_file.mp4 (unfortunately can't give video link)

and Vitamio will give me some interesting debug info:

D/Vitamio[Player](27899): [rtsp @ 0x347630] UDP timeout, retrying with TCP
D/Vitamio[Player](27899): [rtsp @ 0x347630] Estimating duration from bitrate, this may be inaccurate

and finally it'll play the video. On which side is there an error? How do I solve such a problem?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source