0

I am building an android stream player using Vitamio. Here is my codes:

    mVideoView = (VideoView) findViewById(R.id.videoView);

    path = "https://www.youtube.com/watch?v=vic5gj2qXKg";
    mVideoView.setVideoPath(path);

    mVideoView.setMediaController(new MediaController(this));
    mVideoView.requestFocus();

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

But it returns ERROR:

avformat_open_input: Protocol not found : -1330794744 error (1, -1330794744)

I think this error is related to FFMpeg for Vitamio. Who can solve this problem? Thank you.

Paul Roub
  • 36,322
  • 27
  • 84
  • 93
Lin Juan
  • 1
  • 2

2 Answers2

0

It appears when ffmpeg does not support streaming format, or not initialized by "avformat_network_init()"

See if you can find whether Vitamio supports network format or not, or some function to initialize.

Gigone Lee
  • 396
  • 2
  • 7
0

Youtube videos links can be play via only Youtube Android Player API. Download Jar from here: https://developers.google.com/youtube/android/player/downloads/