Problem with opening png sequence by gstreamer and nvvidconv

Hi,
I’m trying to open a sequence of png images, and want to do some cuda process by nvivafilter. So the first target is to thransform the data into NVMM NV12/I420 memory type.
I tried the following pipeline first:

gst-launch-1.0 videotestsrc ! videoconvert ! 'video/x-raw,format=NV12' ! nvvidconv ! 'video/x-raw(memory:NVMM),format=NV12' ! nvegltransform ! nveglglessink

and it’s working.

Then the following one:

gst-launch-1.0 multifilesrc location="%06d.png" caps="image/png" ! decodebin ! videoconvert ! 'video/x-raw,format=NV12' ! nvvidconv ! 'video/x-raw(memory:NVMM),format=NV12' ! nvegltransform ! nveglglessink

which is not working.

But this one:

gst-launch-1.0 multifilesrc location="%06d.png" caps="image/png" ! decodebin ! videoconvert ! 'video/x-raw,format=NV12' ! nvvidconv ! 'video/x-raw(memory:NVMM),<b>format=RGBA</b>' ! nvegltransform ! nveglglessink

is working.

So basicly I cannot transform the data type into NVMM NV12/I420 if I use multifilesrc, only NVMM RGBA. Can anyone explain this? Thanks!

BTW, I tried on both JetPack 3.3; L4T r28.2 and JetPack 3.1; L4T r28.1, same results.

Hi,
On r28.2, I can run

$ gst-launch-1.0 videotestsrc num-buffers=60 ! pngenc ! multifilesink location=%06d.png
$ gst-launch-1.0 multifilesrc location="%06d.png" caps="image/png" ! decodebin ! videoconvert ! 'video/x-raw,format=NV12' ! nvvidconv ! 'video/x-raw(memory:NVMM),format=NV12' ! nvegltransform ! nveglglessink

Maybe the pipeline is not working because of your PNG files.

Please try the pipeline with nvivafilter:

$ gst-launch-1.0 multifilesrc location="%06d.png" caps="image/png" ! decodebin ! videoconvert ! 'video/x-raw,format=NV12' ! nvvidconv ! 'video/x-raw(memory:NVMM),format=NV12' ! nvivafilter cuda-process=true customer-lib-name="libnvsample_cudaprocess.so" ! 'video/x-raw(memory:NVMM),format=RGBA' ! nvegltransform ! nveglglessink

Hi DaneLLL,
I find the problem. My png images are 1251*752, and I think NV12/I420 cannot handle odd width/height image. All pipelines are working after I cropping them into even width/height.
Thanks again DaneLLL!