Issue in OpenCV video streaming using VideoCapture

I am using Olimex MicroA20 with OpenWrt 18.06 with openCV installed, im trying to stream a rtsp stream or a saved video with the use of VideoCapture but it is not working. I have mjpg-streamer, gstreamer and ffmpeg compiled and my opencv code is in C++ Can anyone help me how to make it work or tell me what im doing wrong? thanks in advance!!!