Gstreamer 1.0 saving rtsp stream to file

匿名 (未验证) 提交于 2019-12-03 09:06:55

问题:

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:

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



标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!