tags:

views:

2606

answers:

4

Hi,

I want to broadcast the screen (not a static screen) of my program using rtsp/rtp since this way a mobile phone (at least the more recent ones) can view the stream.

I'm looking for a simple example program which takes the frames I offer, encodes it with a codec and then sends this (using rtsp) to any clients attached.

I've looked on the net and all I can find so far are full fledged opensource media servers (like darwin) which are just too complex to use as an example

any help appreciated!

R

p.s. sending jpegs to the mobile phone is really not an option since this is non standard and would require a mobile app to be installed to interpret the 'stream'.

p.s.2 C, C++ or C# would be fine.

+1  A: 

This seems like a bad idea... RTSP is complex, so running a stripped down version sounds like an open invitation to problems... but... If you want to dive in and rip the relevant code out of some other project here is a good list to start with, It' lists a few C/C++ open source rtsp servers.. Good luck.

beggs
if something is 'complex' it isn't by definition also an 'invitation to problems'. I was just hoping to find a nice clean implementation without all the dozens of extra features one typically doesn't need. Anyhow, thanks for the list!
Toad
Fair enough... my experience with http and smtp 'simple' and 'scaled down' in house systems is that they took a lot... *a lot* more work than we had estimated looking at the specifications. In both cases we reused code from FOSS projects but it took a lot of work to simplify and reduce the code to just what we needed. So... have fun storming the castle!
beggs
will do! ;^)
Toad
+1  A: 

this seems to be pretty much what I was looking for: live555.com

Useful libraries and code examples of how to stream stuff from your own app

R

Toad
+1  A: 

I agree that many OpenSource streaming servers are too heavy. However, setting up VLC is very easy:

  1. File|Open File...
  2. Customize: screen://
  3. Check Stream/Save
  4. Click Settings...
  5. Setup your preferred stream options (Be sure to change the resolution to something small to make it stream fast on your cell phone).
  6. Click Ok
  7. Click Ok
  8. Done!

Be sure to keep an eye on View|Messages... There may be some interesting warnings or errors in the log. I hope this helps!

User1
is the sourcecode also very easy to understand? It's a source example I'm interested in...not an actual program.
Toad
I haven't viewed the source. However, it has a very rich set of command-line switches and can be controlled via sockets. You can fork a process in the programming language of your choice and open sockets to keep control of the process. Installation on your machine is very light. No Database or OS Services necessary. It runs like a user application.If that's not a reasonable option, I gave another option below.
User1
A: 

If you really want it source code, I recommend http://ffmpeg.org/. It is not as easy VLC but you have a lot more control. The project includes some examples to get you started.

User1