Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Gstreamer 1.0 saving rtsp stream to file

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 
like image 844
harisk92 Avatar asked Oct 20 '25 14:10

harisk92


1 Answers

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

like image 64
Haris Kovacevic Avatar answered Oct 23 '25 07:10

Haris Kovacevic



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!