Can't run live stream using Vitamio

后端 未结 2 1299
时光取名叫无心
时光取名叫无心 2021-01-21 14:59

I\'m trying to use Vitamio to run RTSP video stream, I\'m using Vitamio-sample after updating it to run the stream through VideoViewDemo activity:

p         


        
相关标签:
2条回答
  • 2021-01-21 15:41

    After scanning a lot of near similar problems, I figured that it's may be because it demands to has ACCESS_NETWORK_STATE permission, although the log didn't tell me that but as it tells me it's not a qualified user to perform this process which means the user must be given the permission to be qualified for that, So, I added this permission:

    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
    

    So, to run an authorized RTSP live stream using Vitamio, you need to register all of the following permissions:

        <uses-permission android:name="android.permission.INTERNET" />
        <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
        <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
        <uses-permission android:name="android.permission.WAKE_LOCK" />
        <uses-permission android:name="android.permission.RECORD_AUDIO" />
        <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    
    0 讨论(0)
  • 2021-01-21 15:57

    I had a problem where I was unable to stream RTSP even I removed the Authuntication like Username and Password. So I can Access the link Directly. What Things Work for Me to Stream LIVE were:

    1st Make Sure That You Have Registered the Permissions.

    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
    <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
    <uses-permission android:name="android.permission.WAKE_LOCK" />
    <uses-permission android:name="android.permission.RECORD_AUDIO" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    

    2nd I gave the Streaming Link as:

    rtsp://192.xxx.x.xx/h264 OR rtsp://192.111.1.1/h264 ( example )
    

    Remember I removed the Username and Password for RTSP Links in My IP Camera Settings.

    3rd: Important thing that worked for me was:

    Open build.gradle of your app
    change targedsdkversion to 22
    Open build.gradle of your Vitamio:module
    change targedsdkversion to 22
    It may sound weird but it worked for me like a charm.
    

    Hope This might be helpful.

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