Page 1 of 1

wget with http web snaphot address???? add realtime text????

Posted: Sun 22 Jun 2014 6:10 am
by ace2
I'm trying to get wget to save a jpeg straight off the cameras snapshot address
http://192.168.1.97:88//cgi-bin/CGIProx ... *****&pwd=*****&
(user/passwords removed)
in any browser this opens a jpg image.
if i use wget http://192.168.1.97:88//cgi-bin/CGIProx ... *****&pwd=*****&
This is what i get..
Image

does anyone know how to use wget with a foscam snapshot http command?????

Re: wget with http web snaphot address????

Posted: Sun 22 Jun 2014 6:37 am
by steve
Try:

Code: Select all

wget --output-document image.jpg "http://192.168.1.97:88//cgi-bin/CGIProxy.fcgi?cmd=snapPicture2&usr=********&pwd=*****"

Re: wget with http web snaphot address????

Posted: Sun 22 Jun 2014 6:51 am
by ace2
steve wrote:Try:

Code: Select all

wget --output-document image.jpg "http://192.168.1.97:88//cgi-bin/CGIProxy.fcgi?cmd=snapPicture2&usr=********&pwd=*****"
almost got to the same answer at the same time

I had

Code: Select all

wget "http://192.168.1.97:88//cgi-bin/CGIProxy.fcgi?cmd=snapPicture2&usr=******&pwd=****&" -O webcam.jpg
The only issue is the file size is 274kb which seems very large compared to what the camera own software saves or iptimelapse...

I'm planning on adding realtime data to the image file. I have experimented with FFmpeg, but the quality seems low(35KB size)

Code: Select all

ffmpeg -i webcam.JPG -vf "drawtext="fontsize=16:fontcolor=white:fontfile=arial.ttf:textfile=realtime.txt:x=(w-text_w)/2:y=0"" lapse1.jpg

Re: wget with http web snaphot address???? add realtime text

Posted: Sun 22 Jun 2014 10:48 am
by ace2
Anyone know of any cmd(windows dos) text overlay to image apps??
I want to add the realtime text file to a single jpg file.
I don't/can't convert the .txt file to a png.

Re: wget with http web snaphot address???? add realtime text

Posted: Sun 22 Jun 2014 11:49 am
by ace2
I think I need to add -q:v 1 to my ffmpeg code.
Have to test once I knock off work.

Re: wget with http web snaphot address???? add realtime text

Posted: Sun 22 Jun 2014 7:06 pm
by mcrossley
ace2 wrote:Anyone know of any cmd(windows dos) text overlay to image apps??
I want to add the realtime text file to a single jpg file.
I don't/can't convert the .txt file to a png.
Image Magick will do everything you want, and more.

Re: wget with http web snaphot address???? add realtime text

Posted: Mon 23 Jun 2014 3:09 am
by ace2
mcrossley wrote: Image Magick will do everything you want, and more.
That's option B

I'v been playing with FFmpeg for the overlay of text with pretty good results.

Code: Select all

ffmpeg -i snapshot.JPG -vf "drawtext="fontsize=16:fontcolor=white:shadowcolor=black:box=1:boxcolor=black@0.6:fontfile=LTYPEB.ttf:textfile=z\\:overlay.txt:x=(w-text_w)/2:y=700"" -q:v 3 frame%name%.jpg  -y
output below(will remove the camera's own overlay of date time)
Image

Re: wget with http web snaphot address???? add realtime text

Posted: Sat 28 Jun 2014 1:27 pm
by TheUberOverLord
ace2 wrote:Anyone know of any cmd(windows dos) text overlay to image apps??
I want to add the realtime text file to a single jpg file.
I don't/can't convert the .txt file to a png.
Please see this. It works with ANY IP Camera or Imaging device that allows images to be pulled from it using a HTTP or HTTPS URL. It supports custom resizing and custom text including date/time.

It has many live real-time examples and demonstrations and many configurable options:

http://foscam.us/forum/post42139.html#p42139

Note: You could change/modify the Interface to do real-time custom text saved in the image as well. Much like the date/time option works now. But with your own custom text.

This would take the burden of doing it using DOS. if you have access to a server that supports php.

Currently The Interface stores only the last image received so there is no file clutter and the same file is reused when the next real-time image is pulled.

It's good for fallback as well in the event the device is down. You won't be displaying an empty image but the last image received automatically. Instead.

Don

Re: wget with http web snaphot address???? add realtime text

Posted: Sun 06 Jul 2014 6:05 am
by ace2
all up and running now with wget plus ffmpeg to overlay the weather data.
Wget is using the IP camera own interface, the user account used is a locked down(view) only, so if someone were to get my login details, there is nothing they can do, plus the setup used is on the pc creating this, nothing on website.