How to save a RTSP video stream to MP4 file via gstreamer?

后端 未结 3 1393
旧时难觅i
旧时难觅i 2021-01-11 12:24

I need to get a video stream from my camera via RTSP and save it to a file. All of this needs to be done via gstreamer.

After some google searching, I tried the foll

3条回答
  •  天涯浪人
    2021-01-11 13:22

    You need to add -e flag (end of stream) so that mp4mux can finalize file or else you'll get corrupted non playable file.

     gst-launch -e rtspsrc location=url ! decodebin ! x264enc ! mp4mux ! filesink location=file.mp4
    

提交回复
热议问题