Search code examples
javaandroidnetwork-programmingrtp

How to capture video from RTP stream into android app?


I am trying to capture video from an RTP stream into my Android application. I am using code from a project on github https://github.com/niqdev/ipcam-view. However, after I open up VLC on my computer and start streaming a video and connect my android device to the same network it does not display the video on my device. I don't know what I am doing wrong, any help would be greatly appreciated. Thanks.

This is the error message that I am getting after I run the application


Solution

  • if you need to play short videos you need to use the demo of VXG player for android. It is super easy to use but has a 2 min limitation.
    It looks like the example you are working with works just with mjpeg not with rtp streams.

    If limitations is not for you try this example: VLCSimple

    It has the newest version of vlc-sdk and maybe they already fixed RTP deadlock bug.

    Or just try to make the mjpeg stream using VLC:
    DISPLAY=:0 cvlc -vvv --no-audio screen:// --screen-fps 1 --sout "#transcode{vcodec=MJPG,vb=800}:standard{access=http,mux=mpjpeg,dst=:18223/}" --sout-http-mime="multipart/x-mixed-replace;boundary=--7b3cc56e5f51db803f790dad720ed50a"