How To send a RSTP stream with the newest FFmpeg(NOT BY COMMAND) - c++

Can any body give me a example or indicate to use FFmpeg library to capture the USB video (or capture the internet RSTP stream )and send the information to our own server by RTSP stream.Very Thanks your answer

Related

Live RTMPS stream to Wowza

I set up a Wowza server and succeeded to stream RTMP to it from an Android device using a third party library.
The library can also stream RTMPS.
I checked the Wowza documentation and I didn't see that it can ingest RTMPS or any other encrypted stream (although can stream RTMPS to players).
It is possible to ingest RTMPS live stream with Wowza?
If your Android library you are using is attempting to push the stream into Wowza, it would not be supported. If somehow you are trying to ingest the stream from the device, this should likely work.
Using the Stream lock you can deliver the RTMPS to the Player..
Option 1 : Stream lock - Self Signed - https://www.wowza.com/docs/how-to-request-an-ssl-certificate-from-a-certificate-authority
Option 2 : Stream Lock - You will get 2 Stream lock .JKS file from wowza if you are using any subscription based streaming engine.
After configuring the Stream Lock you can deliver the RTMPS from wowza.

Receive rtsp stream using gstreamer

I want to receive rtsp stream using gstreamer I knw rtspsrc can be used for this purpose but the problem is that it only receives it as a client but in my case i have a ffmpeg application which streams the video as a client and waits for a server to connect with it before streaming. So i want gstreamer to act as server and receive the stream from ffmpeg
I haven't used it myself, but I believe there is a separate package for RTSP server functionality. In Debian based systems it should be under something like:
libgstrtspserver-0.10-0

C++ RTSP video capture implementation

I would like to develop a very tiny and small RTSP client to get the video stream from network cameras. Does anybody know where can I find a simple explanation of the protocol and some good examples?
Best regards,
You connect to the camera via RTSP protocol to query its capabilities, identify streams and prepare/start transmission.
RFC 2326 - Real Time Streaming Protocol (RTSP)
As a part of initialization and handshaking, you will discover available streams.
RFC 4566 - SDP Session Description Protocol
Then you will set up RTP session(s) to receive data, over UDP or sharing the same TCP connection.
RFC 3550 - RTP A Transport Protocol for Real-Time Applications
RFC 4571 - Framing Real-time Transport Protocol (RTP) and RTP Control Protocol (RTCP) Packets over Connection-Oriented Trans
To decode media streams you will convert the payload into pure data you need for further processing. With IP cameras your primary interest is perhaps MPEG-4 AVC (H.264):
RFC 3984 - RTP Payload Format for H.264 Video
RFC 6184 - RTP Payload Format for H.264 Video
This looks like some (introductory) reading.
Try GStreammer library. It is modular, wery flexible library, which can be used for streamming (both client and server). Just check the docs and pick right plugins.
GStreammer could be used in two ways: as a commandline tool or as a library in your project, depending on your requirements.

Does RTP Packets using RTSP protocol contain both audio and video

I am developing a client program which will display the media captured from IP camera. So I want to whether the RTP packets using RTSP protocol contain both audio and video if contains both how should I extract it?
RTSP stream does not carry video/audio itself, it provides a method to control independent RTP video and audio streams (they are in turn independent one from another).
One of the options though is when RTP streams are tunnelled through RTSP connection, in which case all communication might be taking place through single TCP connection.
You can read the SDP returned in the SETUP request to the RtspServer.
There should be a MediaInformation for each stream available.
That will tell you if there is audio or video etc...
http://en.wikipedia.org/wiki/Session_Description_Protocol

live555 problem while streaming over the internet

I've compiled with VS the live555 source code, and it works just fine if I try to stream locally a file
e.g.
Command Line:
live555.exe myfile.mp3
VLC Connection String
rtsp://169.254.1.231:8554/myfile.mp3
but if I try to stream it over the internet, VLC communicates with live555, but live555 won't send data to him
Command Line
live555.exe myfile.mp3
VLC Connection String
rtsp://80.223.43.123:8554/myfile.mp3
I've already forwarded the 8554 port (both tcp/udp) and tried to disable my firewall but this doesn't solve.
How is that?
To troubleshoot:
Are you streaming RTP over RTSP: have you checked the "Use RTP over RTSP (TCP)" option in VLC? You can check this in VLC under the preferences: input/codecs->Demuxers->RTP/RTSP. You can try to see if this solves the problem in which case it could be that UDP is blocked.
You speak of forwarding. Do you mean port forwarding from one machine to the RTSP server? if so-> if you are not doing RTP over RTSP, then you would also need to forward the ports for the media which is not the same as the RTSP port (554 or 8554). These ports are exchanged during the RTSP SETUP. If you do RTP over RTSP the media is interleaved over 554 or 8554 and you don't have to worry about this.
Also, another good debugging tool is the live555 openRTSP application. You can run it from the command line and specify "-t" for RTP over RTSP, which is basically what the VLC option does. You can specify "-T" for HTTP tunneling, etc and it allows you to write captured media packets to file, etc.