Stream of example RTP packets - c++

I am trying to tunnel RTP traffic through a user-defined protocol, and want to test this setup. Is there any C++ library, which I can use to generate example RTP packets and then tunnel them through my library?
Thanks.

you can see an example here: RTPpacket
but is in java.
Well this is the main page streaming tcp/udp
Hope can be helpfull!
Bye

Have a look at jRtpLib. Live555 is another open source RTP RTSP lib but would probably be harder to integrate. Both are free open source cross platform c++ libraries with "liberal" licences. AFAIR JRTPLIB focuses more on the RTP/RTCP side or at least it did when i last looked at it. It was fairly easy to get started. The one from live555 is more comprehensive featuring an event loop, many RTP payload formats, RTSP, etc. but is also more difficult to understand.

Related

How to extract RTCP information in a real-time stream using JRTPLIB? C++

By using jrtplib, I've written both server and client side for RTP h264 video streaming and adapted them for the client can use RTSP to have control over the quality of the video that is streamed by the server.
Now I am asked to improve these applications by RTCP to make them adaptive. It's said that jrtplib handles RTCP packets automatically for it's users can fully focus on streaming, I decided to use it's own RTCP structures. However, altough I've read all documents and examples, even the header files, I couldn't find a solution how to get the data handled that is triggered by RTPSession class and probably stored in RTPRawPacket class.
I need help. Thanks in advance.
Note: These are all for education purposes and I am still a beginner(student) so for the most part of the code I've got help by the internet and I don't have fully control over the subject.

VOIP C++ Programming

I want to write a program to create VOIP application for my final year project. For this time being, I spend my time to understand how SIP works and later I need to implement it into my project. As far as i know, the protocol requirement to build this project are:
UDP
RTP
As for my project, it doesn't requires me to write a complex coding. I just need to provide a server that can be used as a bridge for clients to communicate. So, is there any resources that I can used for my reference to start programming my project?
Maybe these will be helpful to look at:
Open source RTP library:
jrtplib:
Open source RTSP, RTP with a SIP client AFAIR:
liveMedia
Open source SIP library: reSIProcate
Your best bet is pjsip.
http://www.pjsip.org/
It runs on all kinds of OSes
OpenSipStack is quite nice, it's 100% C++.
The project also contains a library for creating clients using ATL.
Take a look at OPAL. It allows you to write applications that will support SIP, H.323 and IAX2.

How to create simple http server with boost capable of receiving data editing it and sharing?

So using any free opensource cross platform library like boost how to create a web service capable of reciving a data stream (for example stream of mp3 frames) on one URL like http://adress:port/service1/write/ and capable of sharing latest recived data to all consumers on http://adress:port/service1/read/ so of course mp3 is just an example of packed stream-able data - generally it can be anything packed. How to create such thing?
Generaly I am honesly triing to understend how to do such thing with C++ Network Library but it is just quite unclear to me.
The boost::asio documentation has four examples of complete HTTP server implementations, each with a slightly different threading architecture.
http://www.boost.org/doc/libs/1_43_0/doc/html/boost_asio/examples.html
You do not say what platform to use, but if Windows is an alternative, the Windows HTTP API easy to use and a great performer.
http://msdn.microsoft.com/en-us/library/aa364510(VS.85).aspx

Designing live video stream for wxWidgets

In my application we will present the video stream from a traffic camera to a client viewer. (And eventually several client viewers.) The client should have the ability to watch the live video or rewind the video and watch earlier footage including video that occurred prior to connecting with the video stream. We intend to use wxWidgets to view the video and within that we will probably use the wxMediaCtrl.
Now, from the above statements some of you might be thinking "Hey, he doesn't know what he's talking about." And you would be correct! I'm new to these concepts and I confused by the surplus of information. Are the statements above reasonable? Can anyone recommend a basic server/client architecture for this? We will definitely be using C++ wxWidgets for the GUI, but perhaps wxMediaCtrl is not what I want... should I be directly using something like the ffmpeg libraries?
Our current method seems less than optimal. The server extracts a bitmap from each video frame and then waits for the single client to send a "next frame" message, at which point the server sends the bitmap. Effectively we've recreated our own awkward, non-standard, inefficient, and low-functionality video streaming protocol and viewer. There has to be something better!
You should check out this C++ RTMP Server: http://www.rtmpd.com/. I quickly downloaded, compiled and successfully tested it without any real problems (on Ubuntu Maverick). The documentation is pretty good if a little all over the place. I suspect that once you have a streaming media server capable of supporting the typical protocols (which rtmpd seems to do), then writing a client should fall into place naturally, especially if you're using wxWidgets as the interface api. Of course, it's easy to write that here, from the comfort of my living room, it'll be a different story when you're knee deep in code :)
you can modify your software such that:
The server connect, server grabs an image, passes it to ffmpeg establishing stream, then copy the encoded data from ffmpeg stream and send to client via network, if the connection drops, close the ffmpeg stream.
Maybe you can use the following to your own advantage:
http://www.kirsle.net/blog.html?u=kirsle&id=63
There is a player called VLC. It has a library for c++ and you can use it to embed the player in your GUI application. It supports a very wide range of protocols. So you should leave connecting, retrieving and playing jobs to VLC and take care of the starting and stopping jobs only. It would be easy and probably a better solution than doing it yourself.
For media playing facility, both music and audio, you can a look on GStream. And talking about the server, I think Twisted (A network library in Python) should be good option. The famous live video social website justin.tv is based on Twisted. Here you can read the story from here. Also, I built a group of server for streaming audio on Twisted, too. They can serve thousands of listener on line in same time.

How to get started implementing a video streaming server in c/c++?

In my project I need a dedicated server that dispatches the streams over to multiple clients.
More specificly, I've a callback function that gets called to gather the stream data, but no idea how to stream it over to other applications.
What's the best way to get started on this ?
What type of video are you planning to stream?
There's an open source library called liveMedia available at http://www.live555.com. This c++ library is available under LGPL and implements the RTSP, RTP/RTCP protocols and payload formats for many different media types. There is a class called DeviceSource IIRC that facilitates getting data into the library. There is an active mailing list and you should be able to find lots of information by searching the archives.
There are also a bunch of example test projects that illustrate how to stream mpeg, mp3, etc.
Should you choose to use standardized protocols, you might want to read up on RTP and RTSP.
I think you should check communication through network sockets.
There is no network concept in C++, so you have to rely on your system API or libraries ( as boost.asio for instance )