3
我試圖在Android設備上播放視頻流。不幸的是,我仍然遇到與MediaPlayer/VideoView相同的問題。我正在尋找幾天,但仍然沒有找到任何工作解決方案。 出於測試目的,我使用API演示中的MediaPlayer應用程序(API演示/媒體/ MediaPlayer /播放流式視頻)。 下面是代碼片段播放的流在Android中播放RTSP流
mMediaPlayer = new MediaPlayer();
mMediaPlayer.setDataSource(path);
mMediaPlayer.setDisplay(holder);
mMediaPlayer.prepare();
mMediaPlayer.setOnBufferingUpdateListener(this);
mMediaPlayer.setOnCompletionListener(this);
mMediaPlayer.setOnPreparedListener(this);
mMediaPlayer.setOnVideoSizeChangedListener(this);
當我嘗試播放流我從logcat的 http://pastebin.com/5Uib5CH5
此信息這是流媒體視頻
Port 8090
BindAddress 0.0.0.0
RTSPPort 7654
RTSPBindAddress 0.0.0.0
MaxHTTPConnections 2000
MaxClients 1000
MaxBandwidth 10000
CustomLog -
NoDaemon
<Feed feed1.ffm>
File /tmp/feed1.ffm
FileMaxSize 5M
Launch ffmpeg -i mmsh://tempserv.cam/vid1
ACL allow 127.0.0.1
</Feed>
<Stream rat1.mpg>
Feed feed1.ffm
Format rtp
NoAudio
VideoBitRate 56k
VideoBufferSize 40
VideoFrameRate 12
VideoSize 176x144
VideoGopSize 12
VideoCodec libx264
AVPresetVideo baseline
</Stream>
如果ffserver的配置人可以告訴我如何解決它,或者至少表明一個錯誤,我將不勝感激。
更改爲h263解決了您的問題? – Dnaso
在這種情況下,是的。但ffmpeg是一種可以在兩個版本之間工作不同的軟件。 – Kamil