Gstreamer 1.0将rtsp流保存到文件 [英] Gstreamer 1.0 saving rtsp stream to file

查看:994
本文介绍了Gstreamer 1.0将rtsp流保存到文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,我尝试创建管道以获取rtsp流,将其编码为x264并将其保存为mp4文件格式,但似乎不起作用.

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 

推荐答案

Okey我知道了:

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

说明: 使用rtph264depay,我们可以从RTSP中提取h264流,然后使用h264parse对其进行解析,并使用mp4作为容器,然后将其与filesink保存在一起.

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

这篇关于Gstreamer 1.0将rtsp流保存到文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆