How can I create a stream from a video that is on the server?

1

As the title itself already says, I need to create a live streaming of a video from the server, or from youtube or something like that, can anyone give me a hint how can I start? I searched a lot, and everywhere I looked I only found help / tutorials related to lives stream so I already have a part of webcam and audio ... and not my goal. Any links or help are welcome!

    
asked by anonymous 29.07.2014 / 23:08

2 answers

2

Yes you can!

There is software that helps with this, and makes streaming compatible with mobile devices too !!!!

streaming server [wowza] - > link

And you'll need a streaming client capable of picking up data coming from the server (wowza) and putting it in a player that is friendly with desktop and mobile:

player [JW Player] - > link

Hugs!

    
30.07.2014 / 13:14
1

Create an activity to open the layout with a VideoView and another to work with the streaming with its own layout too:

  private ProgressDialog carregando;
  private Context context;
  private VideoView mVideoView;

      public void onCreate(Bundle paramBundle)
      {
        super.onCreate(paramBundle);
        setContentView(R.layout.player);
        this.context = this;
        this.carregando = ProgressDialog.show(this.context, "", "Carregando...", true, true, new DialogInterface.OnCancelListener()
        {
          public void onCancel(DialogInterface paramAnonymousDialogInterface)
          {
            Player.this.carregando.dismiss();
            Player.this.mVideoView.stopPlayback();
            Player.this.mVideoView.setVisibility(8);
          }
        });
        this.carregando.setCancelable(true);
        this.mVideoView = ((VideoView)findViewById(R.layout.videoview));
        this.mVideoView.setOnPreparedListener(new MediaPlayer.OnPreparedListener()
        {
          public void onPrepared(MediaPlayer paramAnonymousMediaPlayer)
          {
            Player.this.carregando.dismiss();
          }
        });
        this.mVideoView.setOnCompletionListener(new MediaPlayer.OnCompletionListener()
        {
          public void onCompletion(MediaPlayer paramAnonymousMediaPlayer)
          {
            Player.this.mVideoView.setVisibility(8);
            Player.this.carregando.dismiss();
          }
        });
        this.mVideoView.setVisibility(0);
        this.mVideoView.setVideoURI(Uri.parse("linkdostreamingnoservidor"));
        MediaController localMediaController = new MediaController(this.context);
        this.mVideoView.setMediaController(localMediaController);
        Log.d("NSLog", "Talvez isso: " + this.context + " ou isso: " + localMediaController);
        this.mVideoView.requestFocus();
        this.mVideoView.start();
      }
    
26.12.2015 / 14:56