[ffmpeg]安装

Posted 每天进步一点点点

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了[ffmpeg]安装相关的知识,希望对你有一定的参考价值。

下载源码:

我们选择去官网http://ffmpeg.org下载。版本和打包方式譬如:ffmpeg-3.1.11.tar.bz2

安装过程:

  • tar   -jxvf ./ffmpeg-3.1.11.tar.bz2
  • cd ./ffmpeg-3.1.11
  •  ./configure --enable-static --disable-shared --disable-yasm --enable-memalign-hack
  • make
  • make install

修改/etc/ld.so.conf,增加以下内容:

include ld.so.conf.d/*.conf
/usr/local/ffmpeg/lib
/usr/local/lib

安装了哪些文件:

INSTALL doc/ffmpeg.1
INSTALL doc/ffprobe.1
INSTALL doc/ffserver.1
INSTALL doc/ffmpeg-all.1
INSTALL doc/ffprobe-all.1
INSTALL doc/ffserver-all.1
INSTALL doc/ffmpeg-utils.1
INSTALL doc/ffmpeg-scaler.1
INSTALL doc/ffmpeg-resampler.1
INSTALL doc/ffmpeg-codecs.1
INSTALL doc/ffmpeg-bitstream-filters.1
INSTALL doc/ffmpeg-formats.1
INSTALL doc/ffmpeg-protocols.1
INSTALL doc/ffmpeg-devices.1
INSTALL doc/ffmpeg-filters.1
INSTALL doc/libavutil.3
INSTALL doc/libswscale.3
INSTALL doc/libswresample.3
INSTALL doc/libavcodec.3
INSTALL doc/libavformat.3
INSTALL doc/libavdevice.3
INSTALL doc/libavfilter.3
INSTALL doc/ffmpeg.1
INSTALL doc/ffprobe.1
INSTALL doc/ffserver.1
INSTALL doc/ffmpeg-all.1
INSTALL doc/ffprobe-all.1
INSTALL doc/ffserver-all.1
INSTALL doc/ffmpeg-utils.1
INSTALL doc/ffmpeg-scaler.1
INSTALL doc/ffmpeg-resampler.1
INSTALL doc/ffmpeg-codecs.1
INSTALL doc/ffmpeg-bitstream-filters.1
INSTALL doc/ffmpeg-formats.1
INSTALL doc/ffmpeg-protocols.1
INSTALL doc/ffmpeg-devices.1
INSTALL doc/ffmpeg-filters.1
INSTALL doc/libavutil.3
INSTALL doc/libswscale.3
INSTALL doc/libswresample.3
INSTALL doc/libavcodec.3
INSTALL doc/libavformat.3
INSTALL doc/libavdevice.3
INSTALL doc/libavfilter.3
INSTALL install-progs-yes
INSTALL ffmpeg
INSTALL ffprobe
INSTALL ffserver
INSTALL presets/libvpx-1080p50_60.ffpreset
INSTALL presets/libvpx-1080p.ffpreset
INSTALL presets/libvpx-360p.ffpreset
INSTALL presets/libvpx-720p50_60.ffpreset
INSTALL presets/libvpx-720p.ffpreset
INSTALL doc/ffprobe.xsd
INSTALL doc/examples/avio_dir_cmd.c
INSTALL doc/examples/avio_reading.c
INSTALL doc/examples/decoding_encoding.c
INSTALL doc/examples/demuxing_decoding.c
INSTALL doc/examples/extract_mvs.c
INSTALL doc/examples/filter_audio.c
INSTALL doc/examples/filtering_audio.c
INSTALL doc/examples/filtering_video.c
INSTALL doc/examples/http_multiclient.c
INSTALL doc/examples/metadata.c
INSTALL doc/examples/muxing.c
INSTALL doc/examples/qsvdec.c
INSTALL doc/examples/remuxing.c
INSTALL doc/examples/resampling_audio.c
INSTALL doc/examples/scaling_video.c
INSTALL doc/examples/transcode_aac.c
INSTALL doc/examples/transcoding.c
INSTALL doc/examples/Makefile
INSTALL doc/examples/README
INSTALL presets/libvpx-1080p50_60.ffpreset
INSTALL presets/libvpx-1080p.ffpreset
INSTALL presets/libvpx-360p.ffpreset
INSTALL presets/libvpx-720p50_60.ffpreset
INSTALL presets/libvpx-720p.ffpreset
INSTALL doc/ffprobe.xsd
INSTALL doc/examples/avio_dir_cmd.c
INSTALL doc/examples/avio_reading.c
INSTALL doc/examples/decoding_encoding.c
INSTALL doc/examples/demuxing_decoding.c
INSTALL doc/examples/extract_mvs.c
INSTALL doc/examples/filter_audio.c
INSTALL doc/examples/filtering_audio.c
INSTALL doc/examples/filtering_video.c
INSTALL doc/examples/http_multiclient.c
INSTALL doc/examples/metadata.c
INSTALL doc/examples/muxing.c
INSTALL doc/examples/qsvdec.c
INSTALL doc/examples/remuxing.c
INSTALL doc/examples/resampling_audio.c
INSTALL doc/examples/scaling_video.c
INSTALL doc/examples/transcode_aac.c
INSTALL doc/examples/transcoding.c
INSTALL doc/examples/Makefile
INSTALL doc/examples/README
INSTALL libavdevice/libavdevice.a
INSTALL libavfilter/libavfilter.a
INSTALL libavformat/libavformat.a
INSTALL libavcodec/libavcodec.a
INSTALL libswresample/libswresample.a
INSTALL libswscale/libswscale.a
INSTALL libavutil/libavutil.a
INSTALL libavdevice/avdevice.h
INSTALL libavdevice/version.h
INSTALL libavdevice/libavdevice.pc
INSTALL libavfilter/avfilter.h
INSTALL libavfilter/avfiltergraph.h
INSTALL libavfilter/buffersink.h
INSTALL libavfilter/buffersrc.h
INSTALL libavfilter/version.h
INSTALL libavfilter/libavfilter.pc
INSTALL libavformat/avformat.h
INSTALL libavformat/avio.h
INSTALL libavformat/version.h
INSTALL libavformat/libavformat.pc
INSTALL libavcodec/avcodec.h
INSTALL libavcodec/avdct.h
INSTALL libavcodec/avfft.h
INSTALL libavcodec/d3d11va.h
INSTALL libavcodec/dirac.h
INSTALL libavcodec/dv_profile.h
INSTALL libavcodec/dxva2.h
INSTALL libavcodec/jni.h
INSTALL libavcodec/qsv.h
INSTALL libavcodec/vaapi.h
INSTALL libavcodec/vda.h
INSTALL libavcodec/vdpau.h
INSTALL libavcodec/version.h
INSTALL libavcodec/videotoolbox.h
INSTALL libavcodec/vorbis_parser.h
INSTALL libavcodec/xvmc.h
INSTALL libavcodec/libavcodec.pc
INSTALL libswresample/swresample.h
INSTALL libswresample/version.h
INSTALL libswresample/libswresample.pc
INSTALL libswscale/swscale.h
INSTALL libswscale/version.h
INSTALL libswscale/libswscale.pc
INSTALL libavutil/adler32.h
INSTALL libavutil/aes.h
INSTALL libavutil/aes_ctr.h
INSTALL libavutil/attributes.h
INSTALL libavutil/audio_fifo.h
INSTALL libavutil/avassert.h
INSTALL libavutil/avstring.h
INSTALL libavutil/avutil.h
INSTALL libavutil/base64.h
INSTALL libavutil/blowfish.h
INSTALL libavutil/bprint.h
INSTALL libavutil/bswap.h
INSTALL libavutil/buffer.h
INSTALL libavutil/cast5.h
INSTALL libavutil/camellia.h
INSTALL libavutil/channel_layout.h
INSTALL libavutil/common.h
INSTALL libavutil/cpu.h
INSTALL libavutil/crc.h
INSTALL libavutil/des.h
INSTALL libavutil/dict.h
INSTALL libavutil/display.h
INSTALL libavutil/downmix_info.h
INSTALL libavutil/error.h
INSTALL libavutil/eval.h
INSTALL libavutil/fifo.h
INSTALL libavutil/file.h
INSTALL libavutil/frame.h
INSTALL libavutil/hash.h
INSTALL libavutil/hmac.h
INSTALL libavutil/hwcontext.h
INSTALL libavutil/hwcontext_cuda.h
INSTALL libavutil/hwcontext_dxva2.h
INSTALL libavutil/hwcontext_vaapi.h
INSTALL libavutil/hwcontext_vdpau.h
INSTALL libavutil/imgutils.h
INSTALL libavutil/intfloat.h
INSTALL libavutil/intreadwrite.h
INSTALL libavutil/lfg.h
INSTALL libavutil/log.h
INSTALL libavutil/macros.h
INSTALL libavutil/mathematics.h
INSTALL libavutil/mastering_display_metadata.h
INSTALL libavutil/md5.h
INSTALL libavutil/mem.h
INSTALL libavutil/motion_vector.h
INSTALL libavutil/murmur3.h
INSTALL libavutil/opt.h
INSTALL libavutil/parseutils.h
INSTALL libavutil/pixdesc.h
INSTALL libavutil/pixelutils.h
INSTALL libavutil/pixfmt.h
INSTALL libavutil/random_seed.h
INSTALL libavutil/rc4.h
INSTALL libavutil/rational.h
INSTALL libavutil/replaygain.h
INSTALL libavutil/ripemd.h
INSTALL libavutil/samplefmt.h
INSTALL libavutil/sha.h
INSTALL libavutil/sha512.h
INSTALL libavutil/stereo3d.h
INSTALL libavutil/threadmessage.h
INSTALL libavutil/time.h
INSTALL libavutil/timecode.h
INSTALL libavutil/timestamp.h
INSTALL libavutil/tree.h
INSTALL libavutil/twofish.h
INSTALL libavutil/version.h
INSTALL libavutil/xtea.h
INSTALL libavutil/tea.h
INSTALL libavutil/lzo.h
INSTALL libavutil/avconfig.h
INSTALL libavutil/ffversion.h
INSTALL libavutil/libavutil.pc

推流:

ffmpeg -i rtmp://*******(源地址) -c:v copy -c:a copy -f flv -y rtmp://*******(服务器地址)

 

ffmpeg -i rtmp://live.hkstv.hk.lxdns.com/live/hks -c:v copy -c:a copy -f flv -y rtmp://

 

ffmpeg处理RTMP流媒体的命令大全

转载 2013年09月25日 21:23:55
 
1、将文件当做直播送至live
  1. ffmpeg -re -i localFile.mp4 -c copy -f flv rtmp://server/live/streamName  

 

  1. ffmpeg -i rtmp://server/live/streamName -c copy dump.flv  

3、将其中一个直播流,视频改用h264压缩,音频不变,送至另外一个直播服务流

4、将其中一个直播流,视频改用h264压缩,音频改用faac压缩,送至另外一个直播服务流

  1. ffmpeg -i rtmp://server/live/originalStream -c:a libfaac -ar 44100 -ab 48k -c:v libx264 -vpre slow -vpre baseline -f flv rtmp://server/live/h264Stream  
6、将一个高清流,复制为几个不同视频清晰度的流重新发布,其中音频不变
  1. ffmpeg -re -i rtmp://server/live/high_FMLE_stream -acodec copy -vcodec x264lib -s 640×360 -b 500k -vpre medium -vpre baseline rtmp://server/live/baseline_500k -acodec copy -vcodec x264lib -s 480×272 -b 300k -vpre medium -vpre baseline rtmp://server/live/baseline_300k -acodec copy -vcodec x264lib -s 320×200 -b 150k -vpre medium -vpre baseline rtmp://server/live/baseline_150k -acodec libfaac -vn -ab 48k rtmp://server/live/audio_only_AAC_48k  
8、将当前摄像头,视频h264、音频faac压缩后发布
  1. ffmpeg -r 25 -f dshow -s 640×480 -i video=”video source name”:audio=”audio source name” -vcodec libx264 -b 600k -vpre slow -acodec libfaac -ab 128k -f flv rtmp://server/application/stream_name  
经过h264压缩循环输出为mp4视频
  1. ffmpeg.exe -i INPUT.jpg -an -vcodec libx264 -coder 1 -flags +loop -cmp +chroma -subq 10 -qcomp 0.6 -qmin 10 -qmax 51 -qdiff 4 -flags2 +dct8x8 -trellis 2 -partitions +parti8x8+parti4x4 -crf 24 -threads 0 -r 25 -g 25 -y OUTPUT.mp4  
10、将普通流视频改用h264压缩,音频不变,送至高清流服务(新版本FMS live=1)
  1. ffmpeg -i rtmp://server/live/originalStream -c:a copy -c:v libx264 -vpre slow -f flv “rtmp://server/live/h264Stream live=1″ 

以上是关于[ffmpeg]安装的主要内容,如果未能解决你的问题,请参考以下文章

ffmpeg安装之mac安装

mac安装ffmpeg经验总结

如何在windows10上下载并安装ffmpeg软件

ffmpeg安装之docker安装

FFmpeg编译安装

Linux系统安装ffmpeg & 升级ffmpeg