Jetson nano gstreamer command pipeline error

Hi,

I am trying the below gstreamer pipeline

gst-launch-1.0 -e v4l2src device=/dev/video1 ! tee name=t1 t1. ! queue ! video/x-raw, width=1920, height=1080, framerate=30/1 ! videorate ! video/x-raw, width=1920, height=1080, framerate=30/1 ! nvvidconv ! queue ! nvv4l2h264enc maxperf-enable=1 bitrate=4000000 profile=4 ! queue ! h264parse ! queue ! mux. pulsesrc device=“alsa_input.usb-VXIS_Inc_ezcap_U3_capture-02.analog-stereo” ! queue ! audio/x-raw,width=16,depth=16,rate=44100,channel=1 ! audioconvert ! voaacenc ! aacparse ! mp4mux name=mux ! filesink location=feed1mp1080HW1.mp4 t1. ! queue ! video/x-raw, width=1920, height=1080, framerate=30/1 ! nvvidconv ! queue ! “video/x-raw(memory:NVMM),width=959,height=540,framerate=30/1,format=NV12” ! queue ! nvoverlaysink overlay-x=0 overlay-y=270 overlay-w=959 overlay-h=540 overlay=1 v4l2src device=/dev/video0 io-mode=2 do-timestamp=true ! tee name=t2 t2. ! queue ! image/jpeg,width=1920,height=1080,framerate=30/1 ! videorate ! image/jpeg,width=1920,height=1080,framerate=30/1 ! nvv4l2decoder mjpeg=1 ! nvvidconv ! video/x-raw,width=1920,height=1080,framerate=30/1 ! nvvidconv ! queue ! “video/x-raw(memory:NVMM),framerate=30/1,format=NV12” ! nvv4l2h264enc maxperf-enable=1 bitrate=4000000 profile=4 ! queue ! h264parse ! queue ! mp4mux ! filesink location=feed2mp1080HW1.mp4 t2. ! queue ! image/jpeg,width=1920,height=1080,framerate=30/1 ! nvv4l2decoder mjpeg=1 ! nvvidconv ! video/x-raw,framerate=30/1 ! nvvidconv ! queue ! “video/x-raw(memory:NVMM),framerate=30/1,format=NV12” ! queue ! nvoverlaysink overlay-x=960 overlay-y=270 overlay-w=960 overlay-h=540 overlay=2

This pipeline works without any errors in command line.

I tried to call the same pipeline in a php script using exec() function I get the below error

WARNING: erroneous pipeline: no element “nvvidconv”

What can be the issue for this ?

Thanks in advanced

Hi,
Looks like the prebuilt libs are missing in the environment. We have a list in
https://docs.nvidia.com/jetson/l4t/index.html#page/Tegra%20Linux%20Driver%20Package%20Development%20Guide/accelerated_gstreamer.html#wwpID0E06E0HA
Please check if you include the files.

1 Like

try gst-inspect-1.0 | fgrep nvvid

Should show:
gst-inspect-1.0 | fgrep nvvid
nvvidconv: nvvidconv: NvVidConv Plugin
nvvideosinks: nv3dsink: Nvidia 3D sink
nvvideosink: nvvideosink: nVidia Video Sink
nvvideo4linux2: nvv4l2decoder: NVIDIA v4l2 video decoder
nvvideo4linux2: nvv4l2h264enc: V4L2 H.264 Encoder
nvvideo4linux2: nvv4l2h265enc: V4L2 H.265 Encoder
nvvideo4linux2: nvv4l2vp8enc: V4L2 VP8 Encoder
nvvideo4linux2: nvv4l2vp9enc: V4L2 VP9 Encoder
nvvideocuda: videocuda: CUDA Post processor
tbuckley@BaseSystem_0_5:~/tmp$

1 Like

Hi @terrysu50z

I get the below output

gst-inspect-1.0 | fgrep nvvid
nvvideosink: nvvideosink: nVidia Video Sink
nvvideocuda: videocuda: CUDA Post processor
nvvideosinks: nv3dsink: Nvidia 3D sink
nvvidconv: nvvidconv: NvVidConv Plugin
nvvideo4linux2: nvv4l2vp9enc: V4L2 VP9 Encoder
nvvideo4linux2: nvv4l2vp8enc: V4L2 VP8 Encoder
nvvideo4linux2: nvv4l2h265enc: V4L2 H.265 Encoder
nvvideo4linux2: nvv4l2h264enc: V4L2 H.264 Encoder
nvvideo4linux2: nvv4l2decoder: NVIDIA v4l2 video decoder

The pipeline is working properly in the command line the issue is coming when it is called from exec() command from a php script

Thank You

Hi @DaneLLL

The pipeline is running properly in command line the issue comes when called from a php script

Thank you

my gstreamer app is a c/c++ app, I use
mPipeline = gst_parse_launch(CMDLINE, &pGerr);

Maybe there is something similar in php?

Terry

I also wrote some plugins and had a problem finding them, can’t remember if LIBPATHs or install fixed the “Can’t find plugin” for me.

nvvidconv is in the correct place and since gst-launch-1.0 and gst-inspect-1.0 find them.

Sorry
Terry

Hi,
We don’t have much experience in php script. So other gstreamer plugins are available and only NVIDIA plugins are missing?

It might not help but can try to clean the cache:

$ rm .cache/gstreamer-1.0/registry.aarch64.bin

Thanks I will look in to it

Thank you I will check these out.

Hi @terrysu50z @DaneLLL @kayccc

To make the gstreamer pipeline work in php you need to give the proper permissions to the www-data in the visudo file. All the other elements were working except for the pulsesrc, So I had to replace it with alsasrc now the pipelines are functioning through php script

1 Like