how to save rtsp h.264 stream frame by frame

Carl Karsten carl at nextdayvideo.com
Fri Oct 18 15:14:11 UTC 2019


On Fri, Oct 18, 2019 at 6:51 AM venkata.subbarao <
rao.subba.venkata at gmail.com> wrote:

> Hi All,
>
> I have two questions which are related. Kindly help me.
>
> 1) openRTSP, a RTSP client from live555 has option to save rtsp stream as
> frame by frame using -m option. How can I acheive this using gstreamer ?
>
> I have created a pipeline in my C program as follows. In the callback of
> appsink, I am trying to save frame by frame. But, I have no idea how to do
> this.
>
> rtspsrc location=rtsp://<rtsp url> ! queue ! rtph264depay ! h264parse !
> appsink name=test sync=false
>


gst-launch-1.0 videotestsrc num-buffers=30 ! pngenc ! multifilesink
location="frame-%06d.png"

frame-000000.png
frame-000001.png
frame-000002.png
frame-000003.png
...



>
> 2) I tried to save the stream to a file using following command. The
> recorded file can be played back. One thing I noticed is that this does not
> have a start code 0x0 0x0 0x0 0x1 at the beginning of each frame like in
> openRTSP saved file. Any reason why ?
>
> gst-launch-1.0 rtspsrc location=<rtsp url> ! queue ! rtph264depay !
> h264parse ! mpegtsmux ! filesink location=test.h264
>
>
I would start a 2nd thread for your 2nd question.


> Thanks,
> Subbarao
>
>
>
> --
> Sent from: http://gstreamer-devel.966125.n4.nabble.com/
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel



-- 
Carl K
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20191018/7e2b848d/attachment.html>


More information about the gstreamer-devel mailing list