Monica Gawas
Monica Gawas

Reputation: 21

How to use GStreamer to stream from IP RTMP Camera to v4l2loopback Camera?

I am trying to use GStreamer to connect RTMP/RTSP stream to a v4l2loopback Virtual Device.


Works 1 - RTMP to AutoVideoSink
sudo gst-launch-1.0 rtspsrc location=rtsp://192.168.xxx.xxx/live/av0 ! decodebin ! autovideosink
sudo gst-launch-1.0 rtmpsrc location=rtmp://192.168.xxx.xxx/live/av0 ! decodebin ! autovideosink


Works 2 - TestSrc to Dummy Video5
sudo gst-launch-1.0 videotestsrc ! v4l2sink device=/dev/video5


Does not work - RTMP to Dummy Video5 – No error but does not show the video
sudo gst-launch-1.0 rtspsrc location=rtsp://192.168.xxx.xxx/live/av0 do-timestamp=true
protocols="tcp" ! rtph264depay ! h264parse ! decodebin ! v4l2sink device=/dev/video5


I highly suspect there are some parameters of Gstreamer that are required and I am unaware of.
Because the log file has a lot of entries on unknown pixel format, default values, etc.


Please could you give me some pointers of which parameters to set?
The source is a high-quality PTZ camera which supports either RTMP and RTSP.
The sink is V4L2 loopback device.

Upvotes: 1

Views: 1735

Answers (1)

Sean DuBois
Sean DuBois

Reputation: 4242

You might need a videoconvert after the decodebin

Try running your pipeline with GST_DEBUG=3 and that will give you more info on why caps negotiation failed!

Upvotes: 1

Related Questions