Search code examples
androidstreamlivemjpeg

MJPEG Video not Display on Android App


I have an Axis IP Camera that is connected over the router network and I'm trying to develop an Android application to display the video on the tablet and I'm following this example to implement a MJPEG viewer Android and MJPEG

When I type the URL into the browser: http:my_ip_cam_ipaddress/axis-cgi/mjpg/video.cgi, it displays the video successfully but when I run the application taken from the source code above in Android Studio, it doesn't give me any response. Did I input in the correct mjpeg url address for the Ip cam?

The code seems to work when I try this URL http://trackfield.webcam.oregonstate.edu/axis-cgi/mjpg/video.cgi while running the app over the WIFI network.

Please help me on this issue. Thanks!


Solution

  • You can use something like this: final VideoView videoView = (VideoView) findViewById(R.id.videoView);

        videoView.setVideoPath(
                "http://trackfield.webcam.oregonstate.edu/axis-cgi/mjpg/video.cgi");
    
        videoView.start();