Unable to play rtsp using videoview in android

前端 未结 1 923
花落未央
花落未央 2021-01-20 14:37

I have set up a RTSP server using VLC. then I write an app,this is my code:

package com.ashley.work;

import android.os.Bundle;
import android.app.Activity;
         


        
相关标签:
1条回答
  • 2021-01-20 15:15

    Android really only supports mpeg 4 encoded baseline profile with the MOOV atom set correctly. Newer devices support other methods (HLS & higher profiled mpeg4 types) but not all device will work that way. Your rtsp stream must be encoding using the base line profile.

    If you open your RTSP stream in VLC and open your network stream and then MEdia Information you can see what codecs your stream is using for audio and video

    Here is more definitive info on android and supported media : http://developer.android.com/guide/appendix/media-formats.html#recommendations

    0 讨论(0)
提交回复
热议问题