Re: Python and webcam capture delay?



Tim Roberts kirjoitti:
"jack catcher (nick)" <nomail@xxxxxxxxx> wrote:
I'm thinking of using Python for capturing and showing live webcam stream simultaneously between two computers via local area network. Operating system is Windows. I'm going to begin with VideoCapture extension, no ideas about other implementation yet. Do you have any suggestions on how short delay I should hope to achieve in showing the video? This would be part of a psychological experiment, so I would need to deliver the video stream with a reasonable delay (say, below 100ms).

You need to do the math on this. Remember that a full 640x480 RGB stream
at 30 frames per second runs 28 megabytes per second. That's more than
twice what a 100 megabit network can pump.

You can probably use Python to oversee this, but you might want to consider
using lower-level code to control the actual hardware. If you are
targeting Windows, for example, you could write a DirectShow graph to pump
into a renderer that transmits out to a network, then another graph to
receive from the network and display it.

You can manage the network latency by adding a delays in the local graph.

Thanks Tim, you're correct about the math. What is your main point about DirectShow: that it is generally faster and more reliable than doing the job high-level, or that one could use coding/decoding in DirectShow to speed up the transmission? I think the latter would be a great idea if the latency were tolerable. On the other hand, I'd like to keep things simple and do all the programming in Python. I've got no experience with DirectShow, but I guess the filters need to be programmed in C++ and called from Python?

Another option might be to use resolution 320x240@15fps.
.



Relevant Pages

  • Domain controller problem
    ... Description of network: ... We are maintaining a local area network consisting of around 250 node which ... are using different operating system like windows 98,windows NT, windows 2000 ...
    (microsoft.public.windows.server.active_directory)
  • Re: password protection
    ... >I use Windows XP-Professional ... >I want to share my files onto local area network and other but I coludn't this operation anyway. ... Create a compressed folder and define a password for it. ...
    (microsoft.public.windowsxp.network_web)
  • Re: Help with audio capture n preview using Dshow in VC++ (MFC)
    ... > this video stream over the network, so that it could be rendered on the ... renderer, the other output to your network sink. ... > What directshow filters are available to transport audio/video over the ...
    (microsoft.public.win32.programmer.directx.audio)
  • Re: Python and webcam capture delay?
    ... stream simultaneously between two computers via local area network. ... Operating system is Windows. ... to deliver the video stream with a reasonable delay ...
    (comp.lang.python)
  • WMAsfWriter with DV device
    ... I am trying to streaming the video from my DV camera on network and i am ... using Format SDK and DirectShow. ... I successfully Capture the Audio Video using DirectShow and now i came to ...
    (microsoft.public.win32.programmer.directx.video)