Could not open device '/dev/nvhost-msenc': Inappropriate ioctl for device

Hello,

I’m using the latest JetPack (4.6) on a Xavier NX development kit and getting this error in multimedia-api (32.6.1) when call NvVideoEncoder::createVideoEncoder():

libv4l2: error getting capabilities: Inappropriate ioctl for device
[ERROR] (/home/jlv/Code/jetson/usr/src/jetson_multimedia_api/samples/common/classes/NvV4l2Element.cpp:63) <enc0> Could not open device '/dev/nvhost-msenc': Inappropriate ioctl for device
[ERROR] (/home/jlv/Code/jetson/usr/src/jetson_multimedia_api/samples/common/classes/NvV4l2ElementPlane.cpp:498) <enc0> Output Plane:Error in VIDIOC_REQBUFS at output plane: Bad file descriptor
[ERROR] (/home/jlv/Code/jetson/usr/src/jetson_multimedia_api/samples/common/classes/NvV4l2ElementPlane.cpp:498) <enc0> Capture Plane:Error in VIDIOC_REQBUFS at output plane: Bad file descriptor

As far as I can tell, the h264 encoder is working using gstream as I can run:

gst-launch-1.0 videotestsrc is-live=true ! video/x-raw, format=I420,width=1920, height=1080 ! omxh264enc ! qtmux ! filesink location=test.h264 -e

Any suggestion(s) on what could be wrong?

Thanks.

Hi,
Do you observe the issue by running 01_video_encode? The reference samples are verified and tested in each release and should work fine.

No, it worked fine with the sample. I actually tracked down the issue to me linking against a custom build of V4L2 (static) library instead of using the shared library that is on the OS image.