栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 系统运维 > 运维 > Linux

ffmpeg测试本地文件推流报错 Could not find a valid device can‘t configure encoder解决办法

Linux 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

ffmpeg测试本地文件推流报错 Could not find a valid device can‘t configure encoder解决办法

这里写目录标题
    • ./configure --enable-shared编译想264报错Found no assembler

[root@VM-16-6-centos ~]# ffmpeg -re -i "/root/ZLMediaKit/release/linux/Debug/www/record/rtp/0BEBE85B/2021-11-10/21-33-37.mp4" -vcodec h264 -acodec aac -f flv rtmp://127.0.0.1/live/test
ffmpeg version 4.1.6 Copyright (c) 2000-2020 the FFmpeg developers
  built with gcc 8 (GCC)
  configuration: 
  libavutil      56. 22.100 / 56. 22.100
  libavcodec     58. 35.100 / 58. 35.100
  libavformat    58. 20.100 / 58. 20.100
  libavdevice    58.  5.100 / 58.  5.100
  libavfilter     7. 40.101 /  7. 40.101
  libswscale      5.  3.100 /  5.  3.100
  libswresample   3.  3.100 /  3.  3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/root/ZLMediaKit/release/linux/Debug/www/record/rtp/0BEBE85B/2021-11-10/21-33-37.mp4':
  metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    creation_time   : 2021-11-10T13:33:37.000000Z
  Duration: 00:20:32.12, start: 0.000000, bitrate: 691 kb/s
    Stream #0:0(und): Video: h264 (baseline) (avc1 / 0x31637661), yuvj420p(pc, bt709), 1920x1080, 690 kb/s, 25.02 fps, 25 tbr, 1k tbn, 50 tbc (default)
    metadata:
      creation_time   : 2021-11-10T13:33:37.000000Z
      handler_name    : VideoHandler
Stream mapping:
  Stream #0:0 -> #0:0 (h264 (native) -> h264 (h264_v4l2m2m))
Press [q] to stop, [?] for help
[h264_v4l2m2m @ 0x2f2c640] Could not find a valid device
[h264_v4l2m2m @ 0x2f2c640] can't configure encoder
#下载x264源码编译生成libx264.so库,重新编译FFmpeg并将x264添加进去
[root@VM-16-6-centos ~]# git clone https://code.videolan.org/videolan/x264.git

cd x264			//进入x264源码文件目录下
./configure --enable-shared
make
sudo make install
sudo cp /usr/local/lib/libx264.so.164 /lib	     	//生成文件的默认路径为:/usr/local/lib

cd ffmpeg    	//进入ffmpeg源码文件目录下
./configure --enable-shared --disable-yasm --enable-libx264  --enable-gpl  --prefix=/home/jiajia/ffmpeg-x64
make
make install
 
./configure --enable-shared编译想264报错Found no assembler

Minimum version is nasm-2.13 处理方式如下

 Linux下编译x264 If you really want to compile without asm, configure with --disable-asm 的解决办法

下载 nasm

https://www.nasm.us/pub/nasm/releasebuilds/2.13.03/

解压

tar -zxvf nasm-2.13.03.tar.gz

进入目录

cd nasm-2.13.03

安装即可

./configure

make

make install

安装nasm之后再进入x264目录 

./configure 
转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/613721.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号