tegra_media_api video encode sample make fail

Hi,

I followed steps in file “tegra_multimedia_api/README” to try to make video encode, and get below errors:

ubuntu@tegra-ubuntu:~/tegra_multimedia_api/samples/01_video_encode$ make
g++ -o video_encode video_encode_csvparser.o video_encode_main.o …/common/classes/NvElementProfiler.o …/common/classes/NvElement.o …/common/classes/NvApplicationProfiler.o …/common/classes/NvVideoDecoder.o …/common/classes/NvJpegEncoder.o …/common/classes/NvVideoConverter.o …/common/classes/NvBuffer.o …/common/classes/NvLogging.o …/common/classes/NvEglRenderer.o …/common/classes/NvUtils.o …/common/classes/NvJpegDecoder.o …/common/classes/NvVideoEncoder.o …/common/classes/NvV4l2ElementPlane.o …/common/classes/NvV4l2Element.o -I"/usr/include/aarch64-linux-gnu" -I"…/…/include" -L"/usr/lib/aarch64-linux-gnu" -L"/usr/lib/aarch64-linux-gnu/tegra" -lpthread -lv4l2 -lEGL -lGLESv2 -lX11 -lnvbuf_utils -lnvjpeg
/usr/bin/ld: cannot find -lnvbuf_utils
/usr/bin/ld: cannot find -lnvjpeg
collect2: error: ld returned 1 exit status
Makefile:58: recipe for target ‘video_encode’ failed
make: *** [video_encode] Error 1

I searched libnvbuf_utils and libnvjpeg in TX2, but didn’t find them, could you tell me how to make video encode correctly. Thanks.

“You have to point the location of libnvbuf_utils.so.1.0 by the -L in the gcc parameter.” (ShaneCCC,10/07/2016)

References:
https://devtalk.nvidia.com/default/topic/966938/jetson-tx1/how-to-achieve-the-h-264-encoding-performance-4k-3-840x2-160-30fps-with-openmax-il-api-l4t-r24-1/post/4991605/#4991605

https://devtalk.nvidia.com/default/topic/966938/jetson-tx1/how-to-achieve-the-h-264-encoding-performance-4k-3-840x2-160-30fps-with-openmax-il-api-l4t-r24-1/
http://www.yolinux.com/TUTORIALS/LibraryArchives-StaticAndDynamic.html

Hi Andrey1984,

Can you help to point where libnvbuf_utils.so.1.0 is? We could not find it in TX2.

nvidia@tegra-ubuntu:~$ locate libnvbuf_utils
/usr/lib/aarch64-linux-gnu/tegra/libnvbuf_utils.so
/usr/lib/aarch64-linux-gnu/tegra/libnvbuf_utils.so.1.0.0
nvidia@tegra-ubuntu:~$
  1. please install mlocate : sudo apt-get mlocate
  2. update db: sudo apt-get updatedb
  3. use locate: locate libnvbuf_utils
    Reference link:

https://github.com/madisongh/meta-tegra/blob/master/recipes-bsp/tegra-binaries/tegra-libraries_27.1.0.bb

Hi Andrey1984,

I opened the path /usr/lib/aarch64-linux-gnu, but there is no tegra directory.
I try to search libnvbuf_utils and libnvjpeg in whole TX2 system, but can not find them.

Hi Andrey1984,

Could you help send me these two libs, my e-mail is xuyugui@huawei.com, thanks very much.

The files are represented in the System by default, presuming you have made flashos with Jetpack 3.0 with all packages selected. It results in 27.1 tegra with all corresponding files installed.
I have attached the two files, But I suspect the problem is rooted deeper than there.
It seems that the forum deletes the attachments.
files : https://www.file-upload.com/1b0fukcvic7s

Could you check your tegra installation with

sha1sum -c /etc/nv_tegra_release

and check all is ok ?