LINUX上开发ffmpeg程序,查看链接的库
程序员文章站
2022-07-01 23:25:39
...
相信阁下ffmpeg已经编译完成了。编译自己的程序时,需要链接各种库。怎么办?
- 查看ffmpeg依赖库
ldd ffmpeg
linux-vdso.so.1 => (0x00007ffcb5b55000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f482be0b000)
libxcb.so.1 => /usr/lib/x86_64-linux-gnu/libxcb.so.1 (0x00007f482bbe9000)
libxcb-shm.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-shm.so.0 (0x00007f482b9e5000)
libxcb-shape.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-shape.so.0 (0x00007f482b7e1000)
libxcb-xfixes.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-xfixes.so.0 (0x00007f482b5d9000)
libnppig.so.9.2 => /usr/local/cuda/lib64/libnppig.so.9.2 (0x00007f4829a69000)
libnppicc.so.9.2 => /usr/local/cuda/lib64/libnppicc.so.9.2 (0x00007f4829446000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f4829242000)
libbz2.so.1.0 => /lib/x86_64-linux-gnu/libbz2.so.1.0 (0x00007f4829032000)
libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f4828e18000)
liblzma.so.5 => /lib/x86_64-linux-gnu/liblzma.so.5 (0x00007f4828bf6000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f48289d9000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f482860f000)
/lib64/ld-linux-x86-64.so.2 (0x00007f482c114000)
libXau.so.6 => /usr/lib/x86_64-linux-gnu/libXau.so.6 (0x00007f482840b000)
libXdmcp.so.6 => /usr/lib/x86_64-linux-gnu/libXdmcp.so.6 (0x00007f4828205000)
libnppc.so.9.2 => /usr/local/cuda/lib64/libnppc.so.9.2 (0x00007f4827f90000)
librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f4827d88000)
libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f4827a06000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f48277f0000)
- 查看ffmpe*生了哪些库
./ffmpeg
ffmpeg version 4.0.2 Copyright (c) 2000-2018 the FFmpeg developers
built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.10) 20160609
configuration: --disable-asm --disable-x86asm --enable-cuda --enable-cuvid --enable-nvenc --enable-nonfree --enable-libnpp --extra-cflags=-I/usr/local/cuda/include --extra-cflags=-fPIC --extra-ldflags=-L/usr/local/cuda/lib64
libavutil 56. 14.100 / 56. 14.100
libavcodec 58. 18.100 / 58. 18.100
libavformat 58. 12.100 / 58. 12.100
libavdevice 58. 3.100 / 58. 3.100
libavfilter 7. 16.100 / 7. 16.100
libswscale 5. 1.100 / 5. 1.100
libswresample 3. 1.100 / 3. 1.100
Hyper fast Audio and Video encoder
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...