這里寫目錄標題 ./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 developersbuilt with gcc 8 (GCC)configuration: libavutil 56. 22.100 / 56. 22.100libavcodec 58. 35.100 / 58. 35.100libavformat 58. 20.100 / 58. 20.100libavdevice 58. 5.100 / 58. 5.100libavfilter 7. 40.101 / 7. 40.101libswscale 5. 3.100 / 5. 3.100libswresample 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 : isomminor_version : 512compatible_brands: isomiso2avc1mp41creation_time : 2021-11-10T13:33:37.000000ZDuration: 00:20:32.12, start: 0.000000, bitrate: 691 kb/sStream #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.000000Zhandler_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.gitcd x264 //進入x264源碼文件目錄下
./configure --enable-shared
make
sudo make install
sudo cp /usr/local/lib/libx264.so.164 /lib //生成文件的默認路徑為:/usr/local/libcd 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 的解決辦法下載 nasmhttps://www.nasm.us/pub/nasm/releasebuilds/2.13.03/解壓tar -zxvf nasm-2.13.03.tar.gz進入目錄cd nasm-2.13.03安裝即可./configuremakemake install安裝nasm之后再進入x264目錄 ./configure
總結
以上是生活随笔 為你收集整理的ffmpeg测试本地文件推流报错 Could not find a valid device can‘t configure encoder解决办法 的全部內容,希望文章能夠幫你解決所遇到的問題。
如果覺得生活随笔 網站內容還不錯,歡迎將生活随笔 推薦給好友。