We have a RTSP stream running. this is the gstreamer pipeline we use to run the stream.
./test-launch "nvarguscamerasrc
! video/x-raw(memory:NVMM), width=(int)1280, height=(int)960, framerate=(fraction)30/1, format=(string)NV12
! nvvidconv
! nvv4l2h264enc maxperf-enable=1 poc-type=2 preset-level=1 bitrate=40000000
! rtph264pay name=pay0 pt=96 config-interval=1"
I want to read the stream with 10 FPS and video scale of width 640 height 480 after that the received frames are passed for the Object detection.
this is the pipeline I am using to read the stream.
"rtspsrc location=rtsp://127.0.0.1:8554/test max-rtcp-rtp-time-diff=-1 udp-buffer-size=2147483647 buffer-mode=2 " \
"! decodebin " \
"! autovideoconvert " \
"! nvjpegenc " \
"! appsink name=sink emit-signals=True"
I am able to get frames with appsink callback with above approach, but whenever I try to use videoscale and videorate plugins to the existing pipeline I am not getting any output with the appsink callback.
I even used this approach to get the frames but this didn't work either. I am not getting any error but I don't receive any frames on the the appsink callback.
rtspsrc location=rtsp://127.0.0.1:8554/test
! rtph264depay ! h264parse ! nvv4l2decoder
! videoconvert ! videoscale ! videorate ! video/x-raw,framerate=15/1 ! appsink …
when I try to execute the gstreamer in python application I am getting this error I suspect the reason for not being able to change the video size is due to this missing plugin but I am able to continue without this plugin as long as I am not changing the video size and frame rate.
dlopen failed for /usr/lib/aarch64-linux-gnu/libv4l/plugins-wrapped/libv4l2_nvvidconv.so:
/usr/lib/aarch64-linux-gnu/libv4l/plugins-wrapped/libv4l2_nvvidconv.so:
cannot open shared object file: No such file or directory
Your problem may be that nvv4l2decoder outputs into NVMM memory, but videoconvert can't read from NVMM memory. Try nvvidconv instead of both videoconvert and videoscale:
rtspsrc location=rtsp://127.0.0.1:8554/test ! rtph264depay ! h264parse ! nvv4l2decoder ! nvvidconv ! video/x-raw,width=640,height=480 ! videorate ! video/x-raw,framerate=15/1 ! appsink