libstreaming
libstreaming copied to clipboard
Is it possible stream video file using this library?
I want to stream video file available from mobile device. Can I use this library to create stream from video file?
yes, use MODE_MEDIACODEC_API_2 to use opengl. Call stopPreview so you aren't using the camera. Then call mediaplayer.setSurface(new Surface(surface.getSurfaceTexture()) then play the video.
Use MODE_MEDIACODEC_API_2 where? Call stopPreview where? Where do we give the path of the video/audio to be played?
Start with example three. Immediately after the session is built, set the streaming method like so session.getVideoTrack().setStreamingMethod(MODE_MEDIACODEC_API_2);
When you are ready to play the video, call session.getvideotrack().stopPreview();
Then create a mediaplayer the usual way according to the mediaplayer docs, call mediaplayer.setSurface(new Surface(sv.getSurfaceTexture)) where sv is the special surfaceview class that libstreaming uses. Then prepare the mediaplayer, then play it.
I'm trying to use this library to either stream from a file or other video buffer and I'm having trouble removing all of the camera stuff.