yixia / VitamioBundle

Vitamio for Android
http://www.vitamio.org/en/
Other
5.27k stars 2.07k forks source link

Avformat_open_input. Can't see Vide #295

Open payam30 opened 9 years ago

payam30 commented 9 years ago

I've been working on this for over 3 days but still can not play the video as it should I import the module and follow the instruction. still I get errors. I'm using the newest bundle version still no success. All I get is " The video can not be played" . The error I get is :

     07-29 04:40:28.158    1055-1055/peyam.com.peyamtv E/CHANNELS﹕  [Ljava.lang.String;@e45f9ea
    07-29 04:40:28.159    1055-1055/peyam.com.peyamtv E/VIDEO URL﹕ VIDEO URL IS SETTED
     07-29 04:40:28.336       54-259/? E/BufferQueueProducer﹕              [peyam.com.peyamtv/peyam.com.peyamtv.MainActivity] cancelBuffer: BufferQueue has been  abandoned
       07-29 04:40:28.518    1055-1055/peyam.com.peyamtv E/Vitamio[4.2.1][Player]﹕ FIND_NAME_SYM ffmpeg, ff_ass_split
    07-29 04:40:28.518    1055-1055/peyam.com.peyamtv E/Vitamio[4.2.1][Player]﹕            FIND_NAME_SYM ffmpeg, ff_ass_split_dialog
     07-29 04:40:28.518    1055-1055/peyam.com.peyamtv E/Vitamio[4.2.1][Player]﹕ FIND_NAME_SYM ffmpeg, ff_ass_split_free
     07-29 04:40:28.527    1055-1055/peyam.com.peyamtv E/Vitamio[4.2.1][Player]﹕ FIND_NAME_SYM vvo, render_yuv
     07-29 04:40:28.847    1055-1432/peyam.com.peyamtv E/Vitamio[4.2.1][Player]﹕ avformat_open_input: Invalid data found when processing input : -1094995529
      07-29 04:40:28.850    1055-1431/peyam.com.peyamtv E/Vitamio[4.2.1][Player]﹕ error (1, -1094995529)
     07-29 04:40:28.935    1055-1055/peyam.com.peyamtv E/Vitamio[Player]﹕ Error (1, -1094995529)</code>

I've tracking, debugging,googling and still no solution. I don't know what I'm doing wrong and this getting really frustrating.

Here is a part of my class that should play the video:

  public class PlayingChannel extends Fragment  {
    if (!LibsChecker.checkVitamioLibs(getActivity()))
        Log.e(TAG, "COULD NOT LOAD");
  // my own initialization 
   mVideoView = (VideoView) v.findViewById(R.id.surface_view);
   private void playVideo(int channelNumer) {
    mVideoView.setVideoURI(Uri.parse(mCOUNTRY[channelNumer]));
    Log.e("VIDEO URL","VIDEO URL IS SETTED");
    mVideoView.setMediaController(new MediaController(getActivity()));
    mVideoView.requestFocus();

    mVideoView.setOnPreparedListener(new MediaPlayer.OnPreparedListener() {
        @Override
        public void onPrepared(MediaPlayer mediaPlayer) {
            // optional need Vitamio 4.0
            mediaPlayer.setPlaybackSpeed(1.0f);
        }
    });
}}

Here is my Manifest:

<?xml version="1.0" encoding="utf-8"?>
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"package="peyam.com.peyamtv">
<uses-sdk
    android:minSdkVersion="15"
    android:targetSdkVersion="19" />

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

<application
    android:allowBackup="false"
    android:icon="@mipmap/ic_launcher"
    android:theme="@style/AppTheme">
    <activity
        android:name="io.vov.vitamio.activity.InitActivity"
        android:configChanges="orientation|screenSize|smallestScreenSize|keyboard|keyboardHidden|navigation"
        android:launchMode="singleTop"
        android:theme="@android:style/Theme.NoTitleBar"
        android:windowSoftInputMode="stateAlwaysHidden" />
    <activity
        android:name=".Splash"
        android:label="@string/app_name">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
    <activity
        android:name=".MainActivity"
        android:label="@string/app_name" />
    <activity
        android:name="settingPackage.About"
        android:label="@string/app_name" />
    <activity
        android:name="settingPackage.Help"
        android:label="@string/app_name" />

</application>

My build gradle:

    apply plugin: 'com.android.application'
    android {
        compileSdkVersion 21
            buildToolsVersion "22.0.1"
             defaultConfig {
              applicationId "peyam.com.peyamtv"
               minSdkVersion 15
             targetSdkVersion 22
             versionCode 1
             versionName "1.0"
   }
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
                 }
            }
      }
        dependencies {
        compile fileTree(include: ['*.jar'], dir: 'libs')
         compile 'com.android.support:appcompat-v7:22.2.0'
           compile project(':vitamio')
  }

Build.gradle(vitamio)

   apply plugin: 'com.android.library'
  dependencies {
  }
   android {
   compileSdkVersion 21
   buildToolsVersion '21.1.0'

   defaultConfig {
       minSdkVersion 15
       targetSdkVersion 22
    }
   sourceSets {
       main {
        manifest.srcFile 'AndroidManifest.xml'
        java.srcDirs = ['src']
        jniLibs.srcDirs = ['libs']
        aidl.srcDirs = ['src']
        renderscript.srcDirs = ['src']
        res.srcDirs = ['res']
          }
         }

          }

Ihope someone can provide me with some hints. Thanks

MythodeaLoL commented 9 years ago

Work fine here, default configs, maybe media not played or not found. Try real link here mVideoView.setVideoURI(Uri.parse("http://example.com/media.mp4"));

Try use DUMP LOG's Sample: Log.i("DUMP LOG", mCOUNTRY[channelNumer]); Good luck. =D