转:树莓派 FFmpeg 支持GPU硬解码

来自 http://blog.csdn.net/aphero/article/details/78316747

1. 安装x264


git clone git://git.videolan.org/x264.git

./configure --enable-shared --enable-static --enable-strip --disable-cli

make

sudo make install 


2. 安装ffmpeg

git clone git://source.ffmpeg.org/ffmpeg.git 


./configure --enable-gpl --enable-version3 --enable-nonfree --enable-static --enable-shared --enable-ffmpeg --enable-ffplay --enable-ffprobe --enable-ffserver --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --enable-libx264 --enable-mmal --enable-omx --enable-omx-rpi --disable-debug --disable-opencl --disable-thumb --disable-pic --disable-stripping --disable-everything --enable-encoder=libx264 --enable-decoder=h264 --enable-encoder=aac --enable-decoder=aac --enable-encoder=ac3 --enable-decoder=ac3 --enable-encoder=rawvideo --enable-decoder=rawvideo --enable-muxer=flv --enable-demuxer=flv --enable-muxer=mp4 --enable-demuxer=mpegvideo --enable-muxer=matroska --enable-demuxer=matroska --enable-muxer=wav --enable-demuxer=wav --enable-muxer='pcm*' --enable-demuxer='pcm*' --enable-muxer=rawvideo --enable-demuxer=rawvideo --enable-muxer=rtsp --enable-demuxer=rtsp --enable-demuxer=sdp --enable-parser=h264 --enable-parser=aac --enable-protocol=file --enable-protocol=tcp --enable-protocol=rtmp --enable-protocol=cache --enable-protocol=pipe --enable-filter=aresample --enable-filter=allyuv --enable-filter=scale --enable-indev=v4l2 --enable-indev=alsa --enable-encoder=h264_omx --enable-hwaccel=h264_mmal --enable-decoder=h264_mmal


make

sudo make install


---------------------
--enable-muxer=rtsp --enable-demuxer=rtsp --enable-muxer=sdp --enable-demuxer=sdp
--enable-encoder=mjpeg --enable-decoder=mjpeg


-----------test---------
ffmpeg -f v4l2 -r 15 -video_size vga -pix_fmt yuv420p -i /dev/video0 -b:v 500k -c:v h264_omx -an -f flv rtmp://192.168.1.5/live/picam
ffmpeg -f v4l2 -r 15 -video_size vga -pix_fmt yuv420p -i /dev/video0 -b:v 500k -c:v h264_omx -an -f rtsp rtsp://192.168.1.5/live/picam
ffmpeg -f v4l2 -r 15 -video_size vga -pix_fmt yuv420p -i /dev/video0 -b:v 500k -c:v h264_omx -an -f rtsp rtsp://..........................

你可能感兴趣的:(树莓派)