NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Developers v
« Previous 1 … 71 72 73 74 75 … 93 Next »
Sending an image via a socket

 
  • 0 Vote(s) - 0 Average
Sending an image via a socket
jorm
Offline

Posting Freak

Posts: 2,014
Threads: 109
Joined: Aug 2004
#1
2005-04-27, 05:44 PM
So I am working on a different kind of web camera plugin. One that works for security systems and video phones (sound is still something I need to figure out). I have a few questions that hopefully others might know the answer to.

First I have a windows application that reads the camera and collects still images. Fast enough to appear like full video.

I need a windows application since I need the windows handle. I do not know if it would work if sub exposed it but my idea is that he would not need to.

Now the application is capturing frames with a size of 304128 bytes. (352x288).

I want this to work with the MVP (without sound) as well as the PC.

So this application connects to a set of cameras and sends the images to the client (client and server in the same application) client connects to remote server, remote server connects to local client.

I am debating about using the gbpvr as the client itself but that will break the support for multiple MVPs with this plugin.

Now I have an image (Which is a bmp?) that I am trying to serialize to the remote client. I have not figured out

1. How to compress the image to a jpg and send its data across. I can not get to the data directly. I have the data as a bmp but that is 300K a jpg would be about 14k. So ideally I want this as an jpg image.

I found a save method on an image but that does not stream well. I can write it to a file but that adds additional I/O overhead.

I would eventually like sound, I think the mvp does not support wav so the sound would have to be mpeg and thus delayed by a few seconds. For the PC it should be possible though.
WinXP Home
3 X MVPs
Hauppauge 250 MCE
Hauppauge 150
P-4 2.4 GHz / 768 megs Ram
610 Gigs Of Media Storage
jorm
Offline

Posting Freak

Posts: 2,014
Threads: 109
Joined: Aug 2004
#2
2005-04-27, 09:48 PM
In the mean time I have serialized the images across a stream as bitmaps Sad

And I have a web cam (on the same machine) showing up in a gbpvr plugin. Smile

The refresh rate is slow for updating images. It seems to be at rendering at most 2 or 3 frames a second. But functional.
WinXP Home
3 X MVPs
Hauppauge 250 MCE
Hauppauge 150
P-4 2.4 GHz / 768 megs Ram
610 Gigs Of Media Storage
HenkH
Offline

Member

Posts: 100
Threads: 6
Joined: Mar 2005
#3
2005-04-27, 11:54 PM
Why not construct a MPEG stream, it's an area in whicht the MediaMVP excels. The 352x288 exactly matches the size of a VCD MPEG1 stream. Make each separate bitmap an I-frame and let the P&B frames 'blank'. The audio should be encoded as MP3.

You will just have to find a suitable library to do the encoding for you, maybe sourceforge.net can provide some usable links.
KingArgyle
Offline

Posting Freak

Posts: 1,271
Threads: 95
Joined: Nov 2004
#4
2005-04-28, 12:32 AM
Jorm, if you need a JPEG library or other image compression library you might want to start by looking here:

http://datacompression.info/SourceCode.shtml

or here

http://www.yov408.com/html/tutorials.php?s=85

Also, something like this might help.

http://www.eggheadcafe.com/articles/20030706.asp
CodeMonkey
Offline

Senior Member

Posts: 389
Threads: 86
Joined: Apr 2004
#5
2005-04-29, 03:53 PM
jorm:

Here is a link to some C++ code that captures the image from a webcam in memory (as a DIB) instead of as a BMP on the hard drive. It also shows how to convert it to a jpg. So in theory you could do the same, then pump it to the client without having to use the hard drive at all.
-CodeMonkey
joshley
Offline

Member

Posts: 146
Threads: 40
Joined: Jul 2004
#6
2005-04-29, 09:24 PM
Jorm,

See my thread:
http://forums.nextpvr.com/showthread.php?t=5799

I have written software that is capable of caputring the image of a particular WINDOW (specified by the user in a server based app) and sending the images (well, any file for that matter) to a mobile phone using sockets via Bluetooth.
The images captured can be saved in any format, and manipulated very easily in C++ using a great image processing library called NexgenIPL:

http://www.binary-technologies.com/nexgenipl.html

NexgenIPL is effing fantastic! And best of all.. completely FREE!! .jpegs or .png files are usually the smallest in size.

Let me know if this is any use to you!

josh
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)



Possibly Related Threads…
Thread Author Replies Views Last Post
  Coverart / fanart image sizes??? bgowland 3 2,323 2014-02-16, 11:50 PM
Last Post: bgowland
  Where does this image come from? bgowland 4 2,477 2013-02-13, 07:26 PM
Last Post: bgowland
  Problem with preview image for Pending Recordings Northpole 2 2,070 2012-08-14, 02:56 AM
Last Post: Northpole
  FanArt & displaying a background image Jaggy 2 1,796 2012-01-31, 11:39 PM
Last Post: sub
  Which channel logo image formats does npvr support? bgowland 2 2,160 2011-03-06, 05:43 AM
Last Post: bgowland
  Image Caching imilne 6 2,621 2011-01-01, 11:45 PM
Last Post: sub
  draw image border herrmannj 8 2,750 2010-01-13, 09:46 PM
Last Post: herrmannj
  OSD Image Ommina 2 1,895 2009-10-31, 07:01 PM
Last Post: sub
  Potentially a Very large Image list psycik 11 3,822 2008-10-22, 05:38 PM
Last Post: whurlston
  Image Location in FireFox Help Needed UncleJohnsBand 13 4,227 2006-11-22, 11:40 PM
Last Post: UncleJohnsBand

  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Designed by D&D, modified by NextPVR - Powered by MyBB

Linear Mode
Threaded Mode