Dump h264/h265 stream

Nicolas Dufresne nicolas at ndufresne.ca
Fri Jun 19 12:15:08 UTC 2020


Le jeudi 18 juin 2020 à 21:56 +0300, Anton Pryima a écrit :
> Hello all.
> 
> I have rtsp camera which streams h264 to the appsink. Then, sometimes, I need
> to grab it by appsrc and write it to the file.
> I was able to make it with the following pipelines:
> rtspsrc->rtph264depay->appsink
> appsrc->h264parse->matroskamux->filesink.
> 
> Everything works as expected. But, as in h264 stream, I-frames can be
> transmitted once per 20 - 30 seconds, sometimes I've got 10 seconds of
> corrupted video before the fist I-frame and good video starts.
> Is there are any way, to ignore everything before first I-frame or start file
> form first i-frame? I've tried with splitmuxsink and tried to google, but with
> no success.
> 
> Any suggestions?

Decoder will by default prefer movement over clean images. But you can use
identity to drop the corrupted buffer.

  ..dec ! identity drop-buffer-flags=corrupted ! ...

Decoders should mark as corrupted any decoded buffer for which some reference
frame were missing. Not doing so is a bug and shoud be reported.

Also, note that for transcoding RTSP server, or RTSP server encoding on the fly,
there should be a way to speed this up by enabling key frame request, I don't
know on top of my head how this is enable within RTSP, but I know it is
supported by GStreamer RTP stack.

> 
> Thank you in advance,
> Best regards,
> Anton.
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel



More information about the gstreamer-devel mailing list