Mis*_*ray 10 ffmpeg raspberry-pi
我正在尝试在我的 Raspberry Pi Zero W 上安装 ffmpeg,但我收到了几条错误消息。
操作系统:Raspberry Pi 操作系统(32 位)精简版(2020 年 5 月)
我已经执行了以下命令:
sudo apt update
sudo apt full-upgrade
sudo apt install git
git clone https://github.com/FFmpeg/FFmpeg.git
cd FFmpeg
./configure --arch=armel --target-os=linux --enable-gpl --enable-omx --enable-omx-rpi --enable-nonfree
make -j2
sudo make install
Run Code Online (Sandbox Code Playgroud)
最后一条命令的输出:
...
LD ffmpeg_g
/usr/bin/ld: libavformat/libavformat.a(fifo.o): in function `fifo_init':
/home/pi/FFmpeg/libavformat/fifo.c:519: undefined reference to `__atomic_store_8'
/usr/bin/ld: libavformat/libavformat.a(fifo.o): in function `fifo_write_trailer':
/home/pi/FFmpeg/libavformat/fifo.c:624: undefined reference to `__atomic_fetch_add_8'
/usr/bin/ld: /home/pi/FFmpeg/libavformat/fifo.c:631: undefined reference to `__atomic_store_8'
/usr/bin/ld: libavformat/libavformat.a(fifo.o): in function `fifo_thread_write_packet':
/home/pi/FFmpeg/libavformat/fifo.c:188: undefined reference to `__atomic_fetch_sub_8'
/usr/bin/ld: libavformat/libavformat.a(fifo.o): in function `fifo_consumer_thread':
/home/pi/FFmpeg/libavformat/fifo.c:457: undefined reference to `__atomic_load_8'
/usr/bin/ld: libavformat/libavformat.a(fifo.o): in function `fifo_write_packet':
/home/pi/FFmpeg/libavformat/fifo.c:597: undefined reference to `__atomic_fetch_add_8'
collect2: error: ld returned 1 exit status
make: *** [Makefile:114: ffmpeg_g] Error 1
Run Code Online (Sandbox Code Playgroud)
也许另一个包丢失了?我必须更改配置中的任何内容吗?
Mud*_*4ce 10
将以下内容添加到 ./configure 参数中。
--extra-ldflags="-latomic"
Run Code Online (Sandbox Code Playgroud)
所以你的命令变成:
./configure --extra-ldflags="-latomic" --arch=armel --target-os=linux --enable-gpl --enable-omx --enable-omx-rpi --enable-nonfree
Run Code Online (Sandbox Code Playgroud)
在安装了最新版本“ something ”的arm 平台上,我遇到了几个程序(包括 ffmpeg),它们似乎不再自动链接原子库,给你这个或类似的错误。我还没有时间确切地找出导致它的原因或原因。
上面的命令手动告诉配置脚本在链接时包含原子。
尝试启用 Pi 的硬件 h264 编码?
| 归档时间: |
|
| 查看次数: |
4874 次 |
| 最近记录: |