Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.019 X-Spam-Evidence: '*H*': 0.96; '*S*': 0.00; 'else:': 0.03; 'exit': 0.07; 'cc:addr:googlegroups.com': 0.09; 'issue?': 0.09; 'cc:addr :python-list': 0.10; 'appreciated!': 0.16; 'from:addr:xavierho.com': 0.16; 'from:name:xavier ho': 0.16; 'rval': 0.16; 'sender:addr:spaxe85': 0.16; 'subject:Recording': 0.16; 'subject:issue': 0.16; 'webcam': 0.16; 'wrote:': 0.17; 'thanks,': 0.18; 'sender:addr:gmail.com': 0.18; 'load': 0.19; 'code.': 0.20; 'import': 0.21; "i'd": 0.22; 'cheers,': 0.23; 'cc:no real name:2**0': 0.24; 'cc:2**1': 0.24; 'cc:addr:python.org': 0.25; 'header:In-Reply-To:1': 0.25; 'first.': 0.27; 'message-id:@mail.gmail.com': 0.27; 'lines': 0.28; 'url:non-standard http port': 0.30; 'code': 0.31; 'received:google.com': 0.34; 'false': 0.35; 'feed': 0.35; 'received:209.85': 0.35; 'there': 0.35; 'method': 0.36; 'received:209': 0.37; 'subject:: ': 0.38; 'some': 0.38; 'received:209.85.214': 0.39; 'easily': 0.39; 'where': 0.40; 'help': 0.40; 'your': 0.60; 'address': 0.60; 'first': 0.61; 'url:ip addr': 0.62; 'video': 0.65; 'camera': 0.65; 'sam': 0.65; 'url:cgi': 0.65; 'header:Reply-To:1': 0.68; 'reply-to:no real name:2**0': 0.72; '2013': 0.84; 'berry': 0.84; 'reply- to:addr:contact': 0.84; 'subject:live': 0.84 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:mime-version:reply-to:sender:in-reply-to:references:from :date:x-google-sender-auth:message-id:subject:to:cc:content-type; bh=cA/mt07y8yLsReNzVjBcQ7SW11KSrCR0z0nxqJoin3E=; b=jDO/Hosab0ckSAhOhZlIuBn2RJ4eDiibjqqwHoKSQO61GITGHqhPKDnV4jaK9cHC4/ aQZgVPhmNsnpLXXxMd3EVTh0RFAAVdY88mb5FWcpEjUgQsKY7sJRbscaGtfnyyc3miOe Pxm2a8F1lxpJZpJjJzhoijTCN+LERmhZF6jR6pHFjoMow1tlysbCjQLRTkBD+q4bj+cs CUp6rv2U2CbcbSwIyhOPBA1tM+ff/NTqBFIjcohHGXrmU/li/qLj9XVY/j/O4zWu7Dvt DNaWfJXvEBQtiauD7zMysVMnTAQUh5bWxpYlnXusHcAYLYp3bcKoDrcyRU/DVy+EzrKO GviA== X-Received: by 10.182.156.44 with SMTP id wb12mr5176935obb.20.1361131094785; Sun, 17 Feb 2013 11:58:14 -0800 (PST) MIME-Version: 1.0 Sender: spaxe85@gmail.com In-Reply-To: References: <9c18d916-839c-4335-a6fa-c61fd87bd380@googlegroups.com> From: Xavier Ho Date: Mon, 18 Feb 2013 06:57:54 +1100 X-Google-Sender-Auth: kjnB2NIFewr-n0XBnaGKTWYN2Uk Subject: Re: Recording live video stream from IP camera issue To: Sam Berry Content-Type: multipart/alternative; boundary=f46d0444ed3765bea404d5f107a2 Cc: "python-list@python.org" , comp.lang.python@googlegroups.com X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: contact@xavierho.com List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 101 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1361131104 news.xs4all.nl 6922 [2001:888:2000:d::a6]:37493 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:39035 --f46d0444ed3765bea404d5f107a2 Content-Type: text/plain; charset=UTF-8 Hi Sam, Did you compile your OpenCV with gstreamer? That's where I'd look first. Cheers, Xav On 18 February 2013 01:15, Sam Berry wrote: > Hi Xav, > > Iv been looking into OpenCV, i can easily stream my laptops webcam using > this code. > > import cv2 > > cv2.namedWindow("preview") > > vc = cv2.VideoCapture(0) > > if vc.isOpened(): # try to get the first frame > rval, frame = vc.read() > else: > rval = False > > while rval: > cv2.imshow("preview", frame) > rval, frame = vc.read() > key = cv2.waitKey(20) > if key == 27: # exit on ESC > break > > However using the cv2.Videocapture(ip_address) method will not load my IP > camera video feed into the new window. I can view the stream in any web > browser or VLC using the IP address > http://192.168.1.72:1025/videostream.cgi?user=&pwd=&resolution=8. > > Did you have this issue? Is there some lines of code i may need to add? > > Any help would be appreciated! > > Thanks, Sam > --f46d0444ed3765bea404d5f107a2 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi Sam,

Did you compile your Open= CV with gstreamer? =C2=A0That's where I'd look first.

Cheers,
Xav


On 18 February 2013 01:15, Sam Berry <sambez_14@hotmail.co.uk> wrote:
Hi Xav,

Iv been looking into OpenCV, i can easily stream my laptops webcam using th= is code.

import cv2

cv2.namedWindow("preview")

vc =3D cv2.VideoCapture(0)

if vc.isOpened(): # try to get the first frame
=C2=A0 =C2=A0 rval, frame =3D vc.read()
else:
=C2=A0 =C2=A0 rval =3D False

while rval:
=C2=A0 =C2=A0 cv2.imshow("preview", frame)
=C2=A0 =C2=A0 rval, frame =3D vc.read()
=C2=A0 =C2=A0 key =3D cv2.waitKey(20)
=C2=A0 =C2=A0 if key =3D=3D 27: # exit on ESC
=C2=A0 =C2=A0 =C2=A0 =C2=A0 break

However using the cv2.Videocapture(ip_address) method will not load my IP c= amera video feed into the new window. I can view the stream in any web brow= ser or VLC using the IP address =C2=A0 =C2=A0http://192.168.1.72:1025/videostream.cgi?user=3D&pwd=3D&resolut= ion=3D8.

Did you have this issue? Is there some lines of code i may need to add?

Any help would be appreciated!

Thanks, Sam

--f46d0444ed3765bea404d5f107a2--