Open and start transport stream on Android (mpeg2-ts)

This is me again.

I am trying to play the TS file that I get via http (mpeg2-ts) on Android. I have already tried VideoView as follows:

VideoView videoView = (VideoView) findViewById(R.id.videoView); videoView.setMediaController(new MediaController(this)); videoView.setVideoURI(Uri.parse("http://192.168.0.27:7522/upnp/channelstream/9.ts")); videoView.requestFocus(); videoView.start(); 

but he just says that he cannot open the video (I also used internet permission). After some research, I found out that Android 4 brings OpenMAX, with which you can open .ts files. It seems you need NDK for this, but I don't know how to use it. Are there any code examples for OpenMAX or are there any other methods (better) to play the .ts file?

I also tried the Android version of VLC and it was able to play the .ts file. I just need to know how VLC did it.

greets

+4
source share

All Articles