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

Asked

Viewed 1,384 times

1

As the title itself already says, I need to create a live stream of a video from the server, or youtube or something like that, can someone give me a hint of how I can start? I researched a lot, and everywhere I looked I just found help/ tutorials related to the stream there already enters part of webcam and audio... and not that my goal. Any link or help is welcome!

  • take a look, is audio stream and is direct gives machine from the client to the other users of the system, but modifying this system can change to video, but is not direct from the server!!! https://www.webrtc-experiment.com/RTCMultiConnection/stream-mp3-live.html

  • take a look at his website also: http://www.rtcmulticonnection.org/

  • I’ll take a look here, thanks man.

  • Maybe I expressed myself in the wrong way, I have a video file, and I want this file to be played on my live page, example, put the 13h and everyone who goes to will see the video being played. Thank you

2 answers

2

Yes you can!

there is software that helps in this, and makes streaming compatible with mobile devices as well!!!!

streaming server [Wowza] --> http://wowza.com

and you’ll need a streaming client capable of taking data from the server (Wowza) and putting it into a player that’s desktop and mobile friendly:

player [JW Player] --> http://jwplayer.com

hug!!

  • I’m sorry, maybe I’m asking a stupid question, but it’s just that I’m new to streaming and stuff. But can I use these tools you mentioned and testing in a local? localhost? I’m a student and I don’t have one $$$

  • Wowza you can use it for 30 days free. jwplayer has a free version! if your intention is to study will be ideal

  • I appreciate the tips Aloiso, in fact I registered in Wowza and got the free version of JW Player, the big problem is that I could not use both tools in communion. I am turning to Html5 and websocket to try to achieve my goal. Thank you for your help!

1

Create an Activity to open the layout with a VideoView and another to work with streaming with its own layout as well:

  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();
      }

Browser other questions tagged

You are not signed in. Login or sign up in order to post.