I have an external system which sends individual H264 encoded frames one by one via socket. What I'm trying to do is getting these frames and publishing an RTSP stream to RTSP server that I have.
After getting frames (which is just reading TCP socket in chunks) my current approach is like this:
I read frames, then start a process with following command, and then write every frame to STDIN of the process.
gst-launch-1.0 -e fdsrc fd=0 !
h264parse !
avdec_h264 !
videoconvert !
videorate !
video/x-raw,framerate=25/1 !
avimux !
filesink location=gsvideo3.avi
I know that it writes stream to AVI file, but this is closest I was able to get to a normal video. And it is probably very inefficient and full of redundant pipeline steps.
I am also open to FFMPEG commands, but GStreamer is preferred as I will be able to embed it to my C# project via bindings and keep stuff in-process.
Any help is appreciated, thanks in advance!