Need help saving the output from Segmentation sample application for industrial defect detection to jpeg file sink

Hi,

I am trying to make the segmentation app sample from deepstream 5.0 given for the Industrial defects detection work to save the segmentation output into JPEG file sink on Xavier AGX.

The current Gstreamer pipeline for the app supports nveglglessink to render the output and the pipeline looks like follows on Tegra platform:

nvstreammux → nvinfer(segmentation) → nvsegvidsual → nvtiler → transform → video-renderer

To save the output in JPEG file I’m trying to run the app with following pipeline:

nvstreammux → nvinfer(segmentation) → nvsegvidsual → nvtiler → nvjpegenc → filesink

But the pipeline is failing with → Unable to link the elements error.

Any thought how to achieve this?

-Thanks
Sayali