libav streaming h264 over mpegts to rtmp server - c++

I'm working on an application where I want to stream h264 over mpegts
to a rtmp server (FMS, C++ RTMP Server, Wowza). I'm looking at the
output-example.c of libav. I stripped all the audio for now to keep it
simple.
I'm using this code as a test (not working):
https://gist.github.com/fb450aee77471a1d86f3#comments
What am I doing wrong there?
Thanks

Related

Convert RTP to RTSP in Jetson Nano

How Do I convert the RTP (provided by jetson.utils.videoOutput(“rtp://#:1234”)) to RTSP so that the same can ve streamed and be viewed over network.
I tried with FFserver as well as Streamer, but don't have much of an expertise in those.
The dev branch of jetson-inference/jetson-utils has native support for RTSP output. See:
https://forums.developer.nvidia.com/t/convert-rtp-to-rtsp/239731/3

RTSP Streaming Server C++

I would like to write a RTSP streaming server using C++. Multiple clients will be connected to this server for receiving the streamed data.
What I understand is that I need to do socket programming in C++ for client server architecture.
I know FFMPEG has command line support for streaming audio/video. But my requirement is writing a client server socket model in C++.
I had a look at https://www.medialan.de/usecase0001.html
I am also looking at this. https://www.youtube.com/watch?v=MEMzo59CPr8
but I am not sure if this will help me.
For streaming the audio/video data, Do i need to use FFMEPG APIs. If yes, which libraries of FFMPEG i need to use?.
I think I will use gstreamer RTSP server.
Gstreamer is easy to use.
I tried sample example and I was able to stream a video over RTSP.
No, you don’t need ffmpeg to write an RTSP server.

multipeer Connectivity using H264 encoding and decoding?

MultiPeer connectivity for Live Video Streaming between Phones that are connected.Which i have Done the streaming using this but the streaming is very slow and Quality of the Video is very low. So Decided to Add H264 encoding and decoding method. How can we Implement this Method using Peer to Peer.
My Question is "Is it Possible to encode and decode the video and Stream through MultiPeer connectivity which the Devices we are connected?"
I have used this Links for H264 And Multipeer Connectivity
H264 which is in objective-C i converted the code to Swift.
https://mobisoftinfotech.com/resources/mguide/h264-encode-decode-using-videotoolbox/
MultiPeerConnectivity which is in objective-C i converted the code to Swift
https://github.com/pj4533/AVCaptureMultipeerVideoDataOutput

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

OpenCV and RTMP

I want to be able to create an application that can read and publish an RTMP stream.
Using OpenCV i could read rtp due to it's ffmpeg backend.
Stream video from ffmpeg and capture with OpenCV
C++ RTMP is another possibility, but this is an RTMP server so it mainly requests and sends files. Although open source, i am unsure how to build or integrate this into a Visual Studio application in such a way as to make the function calls available to my project.
OTher sources indicate that OpenCV's RTSP isn't great.
http://workingwithcomputervision.blogspot.co.nz/2012/06/issues-with-opencv-and-rtsp.html
How can you run a streaming server, such as RTMP C++ and get the raw data out. OpenCV can encode and decode image data for streaming, but how can you link the two?
Could a C++ application pipe a stream together? How could i interface with that stream to send it more images? Also, for receiving images?
Regards,
cRMTPServer and LibRTMP works well.