Dump h264/h265 stream

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Dump h264/h265 stream

Toshick
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?

Thank you in advance,
Best regards,
Anton.

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

AW: Dump h264/h265 stream

Thornton, Keith

Hi,

I solve a similar problem by putting a pad probe on the appsrc and dropping all the frames with the GST_BUFFER_FLAG_DELTA_UNIT flag set. When the first frame arrives without this flag set I remove the pad probe and let the frames flow normally

Grüße

 

Von: gstreamer-devel <[hidden email]> Im Auftrag von Anton Pryima
Gesendet: Donnerstag, 18. Juni 2020 20:56
An: Discussion of the development of and with GStreamer <[hidden email]>
Betreff: Dump h264/h265 stream

 

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?

 

Thank you in advance,

Best regards,

Anton.


_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Dump h264/h265 stream

Nicolas Dufresne-5
In reply to this post by Toshick
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
> [hidden email]
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel