Results 1 to 6 of 6

Thread: IP Camera interfacing

  1. #1
    Join Date
    Jul 2014
    Posts
    46
    Thanks
    5
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Windows

    Default IP Camera interfacing

    I have been using the IP Camera of a company called RCom and I want to interface it through Qt.
    Presently with the help of networkaccessmanager I am able to ping every moment on this URL,
    "http://192.168.0.12:8080/snapshot.cgi?user=admin&pwd="

    and I am displaying it on a label and able to view my video. The problem with this approach is that if I use multiple cameras and keep on pinging every moment that will be very heavy on my processor. So now I want to handle by accessing the mjpeg URL. It is as follows:
    "http://192.168.0.12:8080/videostream.cgi?user=admin&pwd="

    The issue that I am facing is that this URL does not give me any network reply so I am unable to take my process further but when I use this same URL on VLC's network stream it shows me a proper live output which means that the URL is correct.
    Please help me by telling how can I get a network reply and how can I handle mjpegs?

    Thanks.

  2. #2
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,230
    Thanks
    302
    Thanked 864 Times in 851 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: IP Camera interfacing

    Does the camera use the same port (8080) for the mjpeg protocol as it uses for snapshot mode? What does the camera user manual say?

  3. #3
    Join Date
    Jul 2014
    Posts
    46
    Thanks
    5
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Windows

    Default Re: IP Camera interfacing

    Yes it uses the same port. When I am logging onto this IP Address and playing the video stream option my URL catcher gives me this URL.
    Moreover this URL also shows me video on VLC network stream as i had mentioned earlier. I have an open source software called ISpy which gives me the same URL for accessing MJPEG. So the URL is absolutely fine but I am unable to get a network reply.

  4. #4
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: IP Camera interfacing

    What do you mean with "not getting a network reply"?

    The get() method should return a network reply immediatetly.

    Cheers,
    _

  5. #5
    Join Date
    Jul 2014
    Posts
    46
    Thanks
    5
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Windows

    Default Re: IP Camera interfacing

    Here is my code

    nam = new QNetworkAccessManager(this);
    QObject::connect(nam, SIGNAL(finished(QNetworkReply*)),
    this, SLOT(finishedSlot(QNetworkReply*)));
    QObject::connect(nam, SIGNAL(error(QNetworkReply*)),
    this, SLOT(errorSlot(QNetworkReply*)));

    QUrl url("http://192.168.0.12:8080/snapshot.cgi?user=admin&pwd=");
    QNetworkReply* reply;
    reply = nam->get(QNetworkRequest(url));

    So when I use the present URL it goes to finishedSlot but when I use the videostream URL. It doesn't!

  6. #6
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: IP Camera interfacing

    Well, your new URL is for a stream, no?
    A stream doesn't end until either side disconnects.

    Cheers,
    _

Similar Threads

  1. Replies: 0
    Last Post: 1st July 2013, 08:59
  2. QT interfacing with touch screen!!!
    By sanujas in forum Qt for Embedded and Mobile
    Replies: 1
    Last Post: 5th April 2013, 11:03
  3. Help with interfacing C loop with QT
    By axeoth in forum Qt Programming
    Replies: 1
    Last Post: 1st April 2012, 22:25
  4. IP camera
    By vinod sharma in forum Qt Programming
    Replies: 1
    Last Post: 12th March 2010, 13:41
  5. Interfacing with the Facebook API
    By wswartzendruber in forum Newbie
    Replies: 2
    Last Post: 20th July 2009, 22:18

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.