Gstreamer 1.0 saving rtsp stream to file

2020-07-25 12:44发布

Hi I tried to create pipeline in which I get rtsp stream ,encode it to x264 and save it to mp4 file format but it doesn't seem to work .

gst-launch-1.0 rtspsrc location=rtsp://ip/url ! videoconvert ! queue ! x264enc ! mp4mux ! filesink location=test.mp4 

1条回答
家丑人穷心不美
2楼-- · 2020-07-25 13:13

Okey I got it:

gst-launch-1.0 rtspsrc location=rtsp://ip/url ! rtph264depay ! h264parse ! mp4mux ! filesink location=file.mp4

Explanation: With rtph264depay we extract h264 streams from RTSP then we parse it with h264parse we use mp4 as container and then we save it with filesink

查看更多
登录 后发表回答