• Latest News

    Sunday, 1 October 2017

    How to capture IP Camera http-stream and map to /dev/video* linux video driver

    Mapping HTTP MJPEG IP Camera Video feed to video device
    This is a very small concept but sometimes most useful logic that can solve biggest challenges if you want to get video feed wireless from IP Camera Android App or any other Pi Camera etc. Further, this method will map that HTTP mjpeg video stream to your linux video driver v4l. If you want to use opencv & process that IP Camera for facerecognition or else. Few, people tried to convert the string byte streams of video by cv2.imdecode() function from start & stop delimeters of streams but its was again needed to be converted to numpy array or opencv matrix array to get each frame to be processed which is very slow & requires lot processing from server side.

    • Video4Linux: sudo apt-get install build-essential libjpeg8-dev imagemagick libv4l-dev v4l-utils checkinstall 
    •  VideoLoopback:
    Test your video drivers: ls /dev/video*
    Test your video stream formats: 
    http://<YOUR IP ADDRESS>/video
    http://<YOUR IP ADDRESS>/livestream.cgi?user=admin&pwd=&streamid=0&audio=0

    Read this for detailed info about IP Camera models & HTTP formats:

    Read this if you want to check for ffmpeg argument lists & input/output formats:

    How to capture & map to camera device ID 1?

    Now, you can use cv2.VideoCapture(1) & get input video feed 

    • Blogger Comments
    • Facebook Comments


    Post a Comment

    Thanks for your comment. We will try to reply as soon as possible.

    VSL Creations

    Item Reviewed: How to capture IP Camera http-stream and map to /dev/video* linux video driver Rating: 5 Reviewed By: Vishal Aditya
    Scroll to Top