/usr/local/lib/libavcodec.so: undefined reference to `v4l2_open'

When I try use FFmpeg open RTSP, I get these errors.How can I slove it.
I do not want to use deepstream and commond line such as ffmpeg -i xxxxxxxxxx.
I need use C++ to do it.

You can check the Makefile and see if it links to the correct path:

$ ll /usr/lib/aarch64-linux-gnu/libv4l2.so
lrwxrwxrwx 1 root root 12 Apr  6 05:05 /usr/lib/aarch64-linux-gnu/libv4l2.so -> libv4l2.so.0
$ ll /usr/lib/aarch64-linux-gnu/libv4l2.so.0
lrwxrwxrwx 1 root root 21 Mar  9 02:02 /usr/lib/aarch64-linux-gnu/libv4l2.so.0 -> libv4l2.so.0.0.999999
$ ll /usr/lib/aarch64-linux-gnu/libv4lconvert.so.0
lrwxrwxrwx 1 root root 27 Mar  9 02:02 /usr/lib/aarch64-linux-gnu/libv4lconvert.so.0 -> libv4lconvert.so.0.0.999999

Please try this:
Libavcodec.so: undefined reference to `v4l2_open’ - #8 by DaneLLL

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.