树莓派ffmpeg 编译

安装x264 编码器
cd /root/
mkdir ffmpeg
cd ffmpeg
git clone https://code.videolan.org/videolan/x264.git
cd x264/
ls
./configure --prefix=/usr/local/ffmpeg_install --enable-shared --enable-debug=3
make install

安装ffmpeg
git clone https://git.ffmpeg.org/ffmpeg.git ffmpeg
./configure --enable-shared --prefix=/usr/local/ffmpeg_install --enable-gpl --enable-libx264 
--enable-omx-rpi --enable-mmal --enable-hwaccel=h264_mmal --enable-decoder=h264_mmal 
--enable-encoder=h264_omx --enable-omx --extra-cflags=-I/usr/local/ffmpeg_install/include 
--extra-ldflags=-L/usr/local/ffmpeg_install/lib --extra-ldflags="-latomic"
make install

遇到的问题

/usr/bin/ld: undefined reference to `__atomic_store_8'
/usr/bin/ld: undefined reference to '__atomic_fetch_add_8'
/usr/bin/ld: undefined reference to '__atomic_load_8'

办法 ./configure最后加上如下配置

--extra-ldflags="-latomic"

编译好的库放在/usr/local/ffmpeg_install下,包括x264
树莓派ffmpeg 编译_第1张图片

 

安装samba

sudo apt-get install samba samba-common-bin
sudo systemctl restart smbd
 vim /etc/samba/smb.conf
树莓派ffmpeg 编译_第2张图片

 

你可能感兴趣的:(音视频)