Hi.
I have following pipeline:
rtspsrc ! rtph264depay ! h264parse ! tee name=tp
tp. ! queue ! splitmuxsink \ *
tp. ! queue ! avdec_h264 ! jpegenc ! tee name=tp2
tp2. ! appsink \ **
tp2. ! multipartmux boundary=abcd ! tcpserversink port = 5555 ***
So, given rtsp stream I convert it to video files (*), manually handle frames in jpeg(**) and send frames to tcp server sink in order to stream from it over http later.
Pipeline seems to be working, but I have few questions about it:
-
while I’m testing it in console (gst-launch) I see lots of redistribute latency messages, is it ok?
-
I have following code which responsible for streaming via http:
//this part of http get handler
using (var tcpClient = new TcpClient())
{
await tcpClient.ConnectAsync("localhost", 5555);
using (var netStream = tcpClient.GetStream())
{
Response.ContentType = "multipart/x-mixed-replace; boundary=abcd ";
await netStream.CopyToAsync(Response.Body, 1024 * 1024);
}
}
but video in browser sometimes has glitches – it sometimes hangs then fast forward, rewinds back and forth. I believe it is ok to have some seconds of delay in favour of smooth video stream, how can I achieve that? Some queue tuning?
- I would be thankful for pipeline review, improvements and criticisms. It is quite complex (as I see it) pipeline and maybe it has sense to split it into separate pipelines, at least part responsible for http streaming? I wanted to use only single connection to ip camera and reuse rtsp stream as much as possible but maybe it is not the best strategy?
Thanks in advance.