Take the 2-minute tour ×
Video Production Stack Exchange is a question and answer site for engineers, producers, editors, and enthusiasts spanning the fields of video, and media creation. It's 100% free, no registration required.

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!

share|improve this question
add comment

2 Answers

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.

share|improve this answer
    
Hi, that has given me something to think about -thanks –  Andrew Simpson Nov 19 '13 at 12:50
add comment

If you are on Windows (presumably since you are using C#) is there a reason that you can't simply use Windows Media Encoder and Windows Streaming Media Services on the server? It sounds like it is designed to do exactly what you are trying to do. I'm not sure I understand why you need to build your own solution when many great (and even free or no additional cost) solutions exist already.

Update: Based on the understanding that you just need about 10fps jpeg's and that latency doesn't matter as much as guaranteeing delivery, I would probably do the following:

1) Client submits each image with an incrementing sequence number to the server.

2) The server takes each image and stores it in to the file system with the path and sequence number in a dictionary.

3) When the viewer connects it starts by asking for the current image and is given the image and sequence number.

4) Upon display of an image, the viewer then requests the next sequence number. Timing information for how far behind the viewer is could also be sent back to keep it from getting too far behind. The server would wait until an image is available for the sequence number if it doesn't yet have one. This would help keep in sync as well.

share|improve this answer
    
Hi, thanks for replying. I did take a look at Windows media Encoder but it is working with streams. I am using jpegs you see. –  Andrew Simpson Nov 19 '13 at 14:31
1  
@AndrewSimpson - ah, so video (even at low framerate) isn't an option? Would you like to jump in chat to discuss a bit more about what you need. I'm still not 100% sure I understand the scenario. –  AJ Henderson Nov 19 '13 at 14:33
    
hi, I would love to. How do do that? –  Andrew Simpson Nov 19 '13 at 14:34
    
@AndrewSimpson - updated my comment with a link on the word Chat, just click it. :) –  AJ Henderson Nov 19 '13 at 14:34
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.