项目上需要用到ffmpeg的接收功能,把rtp流转封装为ts吐udp组播流,不涉及编码,所以需要精简一下脚本如下:
#!/bin/bash
dir=$(pwd)
echo $dir
rm -rf $dir/exe
export PATH="$PATH:/root/yasm/exe/bin"
comm="--prefix=$dir/exe "
rm -rf ffmpeg-3.1.
tar -xf ffmpeg-3.1..tar.bz2
cd ffmpeg-3.1.
./configure --prefix=$dir/exe --enable-static --disable-shared --enable-gpl --enable-version3 --enable-nonfree \
--disable-ffplay --disable-ffprobe --disable-ffserver \
--disable-decoders --enable-decoder=aac --enable-decoder=aac_fixed --enable-decoder=mp3 --enable-decoder=mp2 --enable-decoder=ac3 --enable-decoder=h264 --enable-decoder=hevc \
--disable-encoders --disable-filters \
--disable-parsers --enable-parser=mpegaudio --enable-parser=aac --enable-parser=aac_latm --enable-parser=ac3 --enable-parser=h264 --enable-parser=hevc \
--disable-muxers --enable-muxer=mpegts --disable-demuxers --enable-demuxer=mpegts \
--disable-bsfs --enable-bsf=aac_adtstoasc --enable-protocols --disable-indevs --disable-outdevs --enable-small \
--disable-protocols --enable-protocol=file --enable-protocol=udp --enable-protocol=http --enable-protocol=hls --enable-protocol=rtp --enable-protocol=rtmp --enable-protocol=tcp
make
make install
cd ..
rm -rf ffmpeg-3.1.
echo "-----------------------------------------------------"
$dir/exe/bin/ffmpeg -i http://192.168.4.169:8080 -vcodec copy -acodec copy -f mpegts udp://230.0.0.1:8000
手机扫一扫
移动阅读更方便
你可能感兴趣的文章