ffprobe: error while loading shared libraries: libavdevice.so.58: cannot open shared object file: No
Posted 棉晗榜
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了ffprobe: error while loading shared libraries: libavdevice.so.58: cannot open shared object file: No相关的知识,希望对你有一定的参考价值。
异常消息
[root@localhost video_list]# ffprobe
ffprobe: error while loading shared libraries: libavdevice.so.58: cannot open shared object file: No such file or directory
[root@localhost video_list]# ffprobe
ffprobe: error while loading shared libraries: libavdevice.so.58: cannot open shared object file: No such file or directory
解决(方式一):
[root@localhost video_list]# whereis ffprobe
ffprobe: /usr/bin/ffprobe /usr/local/bin/ffprobe
查找到ffprobe安装在/usr/bin/ffprobe
则执行命令获取视频信息
/usr/bin/ffprobe -select_streams v -show_entries format=duration,size,bit_rate,filename -show_streams -v quiet -of json -i /video_list/IMG_0837.MOV
执行成功后:
[root@localhost video_list]# /usr/bin/ffprobe -select_streams v -show_entries format=duration,size,bit_rate,filename -show_streams -v quiet -of json -i /video_list/IMG_0837.MOV
{
"streams": [
{
"index": 0,
"codec_name": "hevc",
"codec_long_name": "H.265 / HEVC (High Efficiency Video Coding)",
"profile": "Main",
"codec_type": "video",
"codec_time_base": "8177/490800",
"codec_tag_string": "hvc1",
"codec_tag": "0x31637668",
"width": 3840,
"height": 2160,
"coded_width": 3840,
"coded_height": 2160,
"closed_captions": 0,
"has_b_frames": 2,
"pix_fmt": "yuv420p",
"level": 153,
"color_range": "tv",
"color_space": "bt709",
"color_transfer": "bt709",
"color_primaries": "bt709",
"refs": 1,
"r_frame_rate": "60/1",
"avg_frame_rate": "490800/8177",
"time_base": "1/600",
"start_pts": 0,
"start_time": "0.000000",
"duration_ts": 8177,
"duration": "13.628333",
"bit_rate": "50336483",
"nb_frames": "818",
"disposition": {
"default": 1,
"dub": 0,
"original": 0,
"comment": 0,
"lyrics": 0,
"karaoke": 0,
"forced": 0,
"hearing_impaired": 0,
"visual_impaired": 0,
"clean_effects": 0,
"attached_pic": 0,
"timed_thumbnails": 0
},
"tags": {
"creation_time": "2020-11-26T05:12:48.000000Z",
"language": "und",
"handler_name": "Core Media Video",
"encoder": "HEVC"
}
}
],
"format": {
"filename": "/video_list/IMG_0837.MOV",
"duration": "13.628333",
"size": "86244581",
"bit_rate": "50626635"
}
}
[root@localhost video_list]# /usr/bin/ffprobe
ffprobe version 4.3.2-static https://johnvansickle.com/ffmpeg/ Copyright (c) 2007-2021 the FFmpeg developers
built with gcc 8 (Debian 8.3.0-6)
configuration: --enable-gpl --enable-version3 --enable-static --disable-debug --disable-ffplay --disable-indev=sndio --disable-outdev=sndio --cc=gcc --enable-fontconfig --enable-frei0r --enable-gnutls --enable-gmp --enable-libgme --enable-gray --enable-libaom --enable-libfribidi --enable-libass --enable-libvmaf --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librubberband --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libvorbis --enable-libopus --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libdav1d --enable-libxvid --enable-libzvbi --enable-libzimg
libavutil 56. 51.100 / 56. 51.100
libavcodec 58. 91.100 / 58. 91.100
libavformat 58. 45.100 / 58. 45.100
libavdevice 58. 10.100 / 58. 10.100
libavfilter 7. 85.100 / 7. 85.100
libswscale 5. 7.100 / 5. 7.100
libswresample 3. 7.100 / 3. 7.100
libpostproc 55. 7.100 / 55. 7.100
Simple multimedia streams analyzer
usage: ffprobe [OPTIONS] [INPUT_FILE]
You have to specify one input file.
Use -h to get full help or, even better, run 'man ffprobe'.
解决方式二(推荐)
查找libavdevice.so.58在哪个目录下,发现在/usr/local/lib下面,则需要将/usr/local/lib添加到
文件/etc/ld.so.conf末尾中
查找命令
whereis libavdevice.so.58
[root@localhost lib]# whereis libavdevice.so.58
libavdevice.so: /usr/local/lib/libavdevice.so.58 /usr/local/lib/libavdevice.so
#编辑/etc/ld.so.conf
sudo vi /etc/ld.so.conf
#在文件/etc/ld.so.conf末尾追加/usr/local/lib
[root@localhost lib]# cat /etc/ld.so.conf
include ld.so.conf.d/*.conf
/usr/local/lib
#保存后,更新环境变量
sudo ldconfig
以上是关于ffprobe: error while loading shared libraries: libavdevice.so.58: cannot open shared object file: No的主要内容,如果未能解决你的问题,请参考以下文章
openssl error while loading serial number
error while loading shared libraries错误解决
error while loading shared libraries错误解决
error while loading shared libraries: libmcrypt.so.4
error while loading shared libraries: libaio.so.1
解决tpcc_load 报错 error while loading shared libraries: libmysqlclient.so.20