user4976: I have developed a desktop application that records motion from any video source - ie ip Camera, web cam (etc).
These motion 'clips' timestamps are uploaded to my server.
The Web user can log in and view these 'Time-clips'.
If they want to view any of these clips they double-click on it a request is made to a clients PC (in this scenario a very old laptop) and the images which are in jpeg format are encoded to ogg video format using ffmpeg.
Everything works well and fast.
Now, the client has complained/wants constant streaming of all the video captured from the client.
My second immediate thoughts was to have a base image on my server (or 2 - for caching)) and update the differences between 2 frames and upload and overlay the pixel changes on the base image on my server.
Now, as I have been informed before this actual process is how a video encoder works?
If that is the case I could save a lot of time using an encoder to change the base image on my server.
ffmpeg naturally comes to mind.
1). Does this sound reasonable to try to achieve?
2). Are they any pointers to what arguments I could use with ffmpeg to achieve all this?
I am very new to this fascinating subject and I am keen to learn and understand rather than copy & paste (sounds like a job interview!).
I am using C# as a programming tool but consider this is irrelevant to the initial question?
I very much welcome people's thoughts.
Thanks!

user4968: The way I've seen this done in other systems intended for CCTV is to encode every couple of frames compressed with something like MJPEG and then stream that to the client, the server component of ffmpeg, ffserver may be able to help you with that. 
Of course, depending on your needs a different video codec may be more appropriate, particularly if you intend to send every frame in which case something like H.264 may be more efficient.

user9105: So you have a client computer with a camera, and want to stream video from it to a server where it's archived and accessible?
client runs:
ffmpeg -i some_kind_of_input  -vf mpdecimate -c:v libx264 -preset medium -crf 25  some_kind_of_output
Choose an appropriate framerate to capture.  mpdecimate will run constantly at that framerate.  libx264 with your chosen preset will have to keep up with realtime to avoid dropped frames when there is motion going on, so mpdecimate isn't dropping any duplicate frames.
The output from that should be buffered somehow so upload to the server can lag behind the bitrate of the output when there is a burst of data (because of motion).
Your output will be VFR video.  There will be continuous 10fps or w/e bits, and other bits with 1 frame per hour or something.  x264 doesn't care, and most container formats have no trouble storing timestamps for each frame.  (e.g. mkv or mp4 are probably both ok choices.)
The server receives this video stream, and breaks it into 1 minute or 1 hour chunks or something.  (or maybe it's easier to break into chunks on the client side, and upload a chunk after it's done being written.  That would stop you from getting a realtime feed from your cam though.)
Or server just decodes it and stores jpg images with timestamps for filenames.  I'm not sure what kind of support ffmpeg has for VFR output to the image2 muxer (that's the "directory of image files" with %04d.jpg filenames, or w/e.  AFAIK, the %04d can only substitute frame numbers, not timestamps.)
Anyway, I just made all this up.  I'm sure you'll find lots of stuff if you google on motion detection security video.
IDK why this was on the recent-activity questions list, but since I read it, I figured I'd post an answer.

4976: <p>I have developed a desktop application that records motion from any video source - ie ip Camera, web cam (etc).</p>

<p>These motion 'clips' timestamps are uploaded to my server.</p>

<p>The Web user can log in and view these 'Time-clips'.</p>

<p>If they want to view any of these clips they double-click on it a request is made to a clients PC (in this scenario a very old laptop) and the images which are in jpeg format are encoded to ogg video format using ffmpeg.</p>

<p>Everything works well and fast.</p>

<p>Now, the client has complained/wants constant streaming of all the video captured from the client.</p>

<p>My second immediate thoughts was to have a base image on my server (or 2 - for caching)) and update the differences between 2 frames and upload and overlay the pixel changes on the base image on my server.</p>

<p>Now, as I have been informed before this actual process is how a video encoder works?</p>

<p>If that is the case I could save a lot of time using an encoder to change the base image on my server.</p>

<p>ffmpeg naturally comes to mind.</p>

<p>1). Does this sound reasonable to try to achieve?
2). Are they any pointers to what arguments I could use with ffmpeg to achieve all this?</p>

<p>I am very new to this fascinating subject and I am keen to learn and understand rather than copy &amp; paste (sounds like a job interview!).</p>

<p>I am using C# as a programming tool but consider this is irrelevant to the initial question?</p>

<p>I very much welcome people's thoughts.</p>

<p>Thanks!</p>
 4968: <p>The way I've seen this done in other systems intended for CCTV is to encode every couple of frames compressed with something like <a href="http://en.wikipedia.org/wiki/Motion_JPEG" rel="nofollow">MJPEG</a> and then stream that to the client, the server component of ffmpeg, <a href="http://www.ffmpeg.org/ffserver.html" rel="nofollow">ffserver</a> may be able to help you with that. 
Of course, depending on your needs a different video codec may be more appropriate, particularly if you intend to send every frame in which case something like H.264 may be more efficient.</p>
 9105: <p>So you have a client computer with a camera, and want to stream video from it to a server where it's archived and accessible?</p>

<p>client runs:
<code>ffmpeg -i some_kind_of_input  -vf mpdecimate -c:v libx264 -preset medium -crf 25  some_kind_of_output</code></p>

<p>Choose an appropriate framerate to capture.  mpdecimate will run constantly at that framerate.  libx264 with your chosen preset will have to keep up with realtime to avoid dropped frames when there is motion going on, so mpdecimate isn't dropping any duplicate frames.</p>

<p>The output from that should be buffered somehow so upload to the server can lag behind the bitrate of the output when there is a burst of data (because of motion).</p>

<p>Your output will be VFR video.  There will be continuous 10fps or w/e bits, and other bits with 1 frame per hour or something.  x264 doesn't care, and most container formats have no trouble storing timestamps for each frame.  (e.g. mkv or mp4 are probably both ok choices.)</p>

<p>The server receives this video stream, and breaks it into 1 minute or 1 hour chunks or something.  (or maybe it's easier to break into chunks on the client side, and upload a chunk after it's done being written.  That would stop you from getting a realtime feed from your cam though.)</p>

<p>Or server just decodes it and stores jpg images with timestamps for filenames.  I'm not sure what kind of support ffmpeg has for VFR output to the <code>image2</code> muxer (that's the "directory of image files" with <code>%04d.jpg</code> filenames, or w/e.  AFAIK, the <code>%04d</code> can only substitute frame numbers, not timestamps.)</p>

<p>Anyway, I just made all this up.  I'm sure you'll find lots of stuff if you google on motion detection security video.</p>

<p>IDK why this was on the recent-activity questions list, but since I read it, I figured I'd post an answer.</p>
