1)FFmpeg转码错误
Cannot load libcuda.so.1,
解决办法安装x264库
2)ffmpeg转码错误
[h264_v4l2m2m @ 0x16e233d0] Could not find a valid device
[h264_v4l2m2m @ 0x16e233d0] can't configure encoder
Error initializing output stream 0:0 -- Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
解决办法,安装x264
Linux下安装x264库
1)下载x264
git clone http://git.videolan.org/git/x264.git
2)安装
cd x264
sudo ./configure --enable-shared --disable-asm
sudo make && make install
3)添加环境变量
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH
echo $PKG_CONFIG_PATH
注意:解决警告(WARNING: using libx264 without pkg-config)
4)重新编译ffmpeg
sudo ./configure --disable-yasm --enable-libx264 --enable-swscale --enable-avresample --enable-gpl --enable-sharedsudo make && make install
本文解决了FFmpeg在转码过程中遇到的两个常见错误:无法加载libcuda.so.1及找不到有效的设备配置编码器的问题。提供了详细的解决方案,包括下载、安装x264库,并在Linux环境下进行配置和重新编译FFmpeg的具体步骤。
941

被折叠的 条评论
为什么被折叠?



