简体   繁体   中英

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.

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!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM