GithubHelp home page GithubHelp logo

Comments (5)

illxi avatar illxi commented on July 30, 2024

should work if you change your url to cam_url = "http://username:[email protected]:80/video"

from ip-camera-bridge.

shenyaocn avatar shenyaocn commented on July 30, 2024

Maybe you should use opencv with directshow module

from ip-camera-bridge.

zhijieliu avatar zhijieliu commented on July 30, 2024

import cv2

video = "http://admin:[email protected]:8081/video"

video = "http://admin:[email protected]:8081/"

cap = cv2.VideoCapture(video)
while (1):
ret, frame = cap.read()
cv2.imshow('frame', frame)
if cv2.waitKey(1) & 0xFF == ord('q'):
break
cap.release()
cv2.destroyAllWindows()

why my phone camera just open just about 5 seconds, then the phone camera is closed。。。
why, i am so confused。。。

from ip-camera-bridge.

shenyaocn avatar shenyaocn commented on July 30, 2024

from ip-camera-bridge.

zhijieliu avatar zhijieliu commented on July 30, 2024

thank you so much for your time to answer my question. to be honest, before i ask the question. i have tried the video = "http://admin:[email protected]:8081/video".
Then the video of the phone is open, but when i use the cv2.imshow, the camera is closed .
i use the opencv3,,
this is my C++ code

#include "cv.h"
#include "highgui.h"
#include
#include <time.h>
#include <boost/iterator/iterator_concepts.hpp>
using namespace cv;
int main(int, char**) {
cv::VideoCapture vcap;
cv::Mat image;
CvCapture *capture ;
// const std::string videoStreamAddress = "http://admin:[email protected]:8081/video";
const std::string videoStreamAddress = "http://admin:[email protected]:8081/video";
// const std::string videoStreamAddress = "http://admin:[email protected]:8081/video";
// const std::string videoStreamAddress = "http://admin:3063117@[fe80::7494:ecff:feb6:a9f3]:8081";
vcap.open(videoStreamAddress) ;
sleep(100);
cv::namedWindow("Output Window");

while(1)
{
    if(!vcap.read(image)) {
        std::cout << "No frame" << std::endl;
        return -1;
    }
    vcap >> image;
    cv::imshow("Output Window", image);
    cv::waitKey(20);

}   

}

from ip-camera-bridge.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.