问题
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.
回答1:
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!
来源:https://stackoverflow.com/questions/61303646/how-to-use-gstreamer-to-stream-from-ip-rtmp-camera-to-v4l2loopback-camera