simple rtsp broadcast example source
Solution 1
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
Solution 2
My library does this completely in managed code!
You can find the library @ http://net7mma.codeplex.com/
There is also a CodeProject article @ http://www.codeproject.com/Articles/507218/Managed-Media-Aggregation-using-Rtsp-and-Rtp
If you need anything else let me know!
Solution 3
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.
Solution 4
I agree that many OpenSource streaming servers are too heavy. However, setting up VLC is very easy:
- File|Open File...
- Customize: screen://
- Check Stream/Save
- Click Settings...
- Setup your preferred stream options (Be sure to change the resolution to something small to make it stream fast on your cell phone).
- Click Ok
- Click Ok
- 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!
Toad
Updated on June 21, 2022Comments
-
Toad about 2 years
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.
-
Toad almost 15 yearsif 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!
-
beggs almost 15 yearsFair 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!
-
Toad almost 15 yearsis the sourcecode also very easy to understand? It's a source example I'm interested in...not an actual program.
-
Sousou almost 15 yearsI 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.
-
thunderbird about 7 yearsCan you please give a little more detail on how to achieve this? Right now i am unable to even run the sample provided on the Codeplex page. Any help would be really appreciated.
-
Jay about 7 yearsIf you check out the UnitTests project you should have enough examples to get you started.
-
Chuck over 3 years@Jay - UnitTests project in the codeplex code and the GitHub code doesn't run. Best implementation for my use case would be the Bandit images, but that doesn't work - VLC fails with "main debug: nothing to play." Also there seem to be several references to SocketOptions that don't exist, like
TcpOffloadPreferenceOption
,TcpCongestionAlgorithmOption
, etc. -
Jay over 3 yearsNot sure where your having problems, you can make an issue @ github.com/juliusfriedman/net7mma_core and I will give you some help when I have time
-
Chuck over 3 years@Jay thanks - I figured out the issue :) Tried to do some digging on what's happening when VLC connects and found that the URL has to be formatted to include
live
as a segment. I changed the server IP address to 127.0.0.1 and was trying to connect from VLC with127.0.0.1:555
orrtsp://127.0.0.1:555
, but when I changed it tortsp://127.0.0.1:555/live/Bandit
then that got it all working. Gorgeous dog too, looked like a sweetie. Sorry for your loss <3 Thanks for the code :)