# I am aware that ffmpeg noramlly wants full command-lines and unmolested console logs, but in this case it simply wouldn't be
# practical as the output is tens or hundreds of thousands of lines at the best, and megabytes of text output at the worst,
# when more verbosity is enabled. The only snipped output is that which I know for a fact to be absolutely irrelevant.
# The development enviroment is a clone of the production environment, which is up to date Scientific Linux 6 (RHEL) system,
# and the tools used are the latest versions of ffmpeg and relevant libraries, except where the distribution supplied libraries
# are compatible and sufficient, or at a minimum, adaptable to ffmpeg without requiring extensive modification patches to the
# upstream ffmpeg checkouts.
# The build system is fully automated and can be switched to produce valid RPMs at any moment for easy deployment across
# different managed production and development system environments. Currently in the development environment the 12 ffmpeg
# dependencies that are not available through trusted distribution repositories are locally installed into /opt and the
# final binaries into /usr/local, but this is not relevant in any way to the problem at hand and our build system, automated
# testing, and deployments are performing flawlessly. For completeness, 11 of the 12 new dependencies are built as shared
# libraries: xavs, x265, vo-aacenc, soxr, webp, vid.stab, shine, fdk_aac, aacplus, gme, and celt. The last of the tweleve is
# vpx, which is staticly linked with ffmpeg since it is built in such a way that it is binary incompatible with the RHEL
# repository supplied libvpx, and is only used by my ffmpeg anyway.
# The goals of having a) the latest ffmpeg available at all times via package management, b) the ability to update or rollback
# ffmpeg releases across the entire enterprise, and c) having nearly every supported ffmpeg feature enabled with only minimal
# additions of new packages or changes to upstream ffmpeg code was easily achievable thanks to the ease of use of Red
# Hat's superior packaging and build tools. We can test, validate, and push out new releases to several thousand hosts in
# multiple clusters of mixed architectures with near-zero QA effort. Woop.
# I'm prototyping the application first through an unholy mix of awk, sed, ksh, and Object REXX at this time. The final release
# application will be written in C and Erlang and use the ffmpeg libraries directly. This is my first use of ffmpeg and
# handling multimedia or streaming at all (I'm a mainframe guy), so please forgive me for my lack of knowledge.
# System information
$ lsb_release -a
LSB Version: :base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch
Distributor ID: Scientific
Description: Scientific Linux release 6.5 (Carbon)
Release: 6.5
Codename: Carbon
$ file -L ffmpeg
ffmpeg: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.18, stripped
# Dynamically linked dependencies (base)
$ yum list installed `(ldd ffmpeg|awk '{print $3}'|grep '^/.*$'# Dynamically linked dependencies (local)
$ ldd ffmpeg|awk '{print $3}'|grep '^/.*$'|xargs -n1 rpm -qf|sort|uniq|grep \^file|awk '{print $2}'|sort
/opt/celt-local/lib/libcelt0.so.2
/opt/gme-local/lib/libgme.so.0
/opt/libaacplus-local/lib/libaacplus.so.2
/opt/libfdk-aac/lib/libfdk-aac.so.0
/opt/libshine-fxp-local/lib/libshine.so.3
/opt/libvidstab-local/lib/libvidstab.so.0.9
/opt/libwebp-local/lib/libwebp.so.5
/opt/soxr-local/lib/libsoxr.so.0
/opt/vo-aacenc/lib/libvo-aacenc.so.0
/opt/x265-local/lib/libx265.so.28
/opt/xavs-local/lib/libxavs.so.1
/usr/local/ffmpeg/lib/libavcodec.so.55
/usr/local/ffmpeg/lib/libavdevice.so.55
/usr/local/ffmpeg/lib/libavfilter.so.4
/usr/local/ffmpeg/lib/libavformat.so.55
/usr/local/ffmpeg/lib/libavresample.so.1
/usr/local/ffmpeg/lib/libavutil.so.52
/usr/local/ffmpeg/lib/libpostproc.so.52
/usr/local/ffmpeg/lib/libswresample.so.0
/usr/local/ffmpeg/lib/libswscale.so.2
$ (cd ~/src/celt && git log)|head -n3|tail -n1
Date: Wed Sep 14 12:23:04 2011 -0700
$ grep 'VERSION' /opt/gme-local/include/gme/gme.h
#define GME_VERSION 0x000600 /* 1 byte major, 1 byte minor, 1 byte patch-level */
$ ls -l /opt/libaacplus-local/lib/libaacplus.so
lrwxrwxrwx. 1 root root 19 Jul 24 15:41 /opt/libaacplus-local/lib/libaacplus.so -> libaacplus.so.2.0.2*
$ (cd ~/src/fdk-aac && git log)|head -n3|tail -n1
Date: Wed Mar 12 15:23:13 2014 +0200
$ (cd ~/src/shine && git log)|head -n3|tail -n1
Date: Thu Apr 10 15:26:57 2014 -0500
$ (cd ~/src/vid.stab && git log)|head -n4|tail -n1
Date: Fri Jul 11 20:52:24 2014 +0200
$ (cd ~/src/libwebp && git log)|head -n3|tail -n1
Date: Mon Jul 21 14:48:22 2014 -0700
$ grep 'VERSION_STR' /opt/soxr-local/include/*
/opt/soxr-local/include/soxr.h:#define SOXR_THIS_VERSION_STR "0.1.1"
$ (cd ~/src/vo-aacenc && git log)|head -n3|tail -n1
Date: Wed Apr 30 17:56:41 2014 +0300
$ /opt/x265-local/bin/x265 -V|head -n1
x265 [info]: HEVC encoder version 1.2+289-b78d4dc01e2c
$ /opt/xavs-local/bin/xavs -V|head -n1
xavs 0.1.55
# Static linked dependencies (local)
$ (cd ~/src/libvpx && git log)|head -n4|tail -n1
Date: Wed Jul 23 22:45:51 2014 -0700
# ffmpeg itself
$ cat ~/src/ffmpeg-build/configure.build.in.txt ~/src/ffmpeg-build/configure.build.out.txt
PKG_CONFIG_PATH=/opt/libwebp-local/lib/pkgconfig:/opt/libaacplus-local/lib/pkgconfig:/opt/libvidstab-local/lib/pkgconfig:/opt/soxr-local/lib/pkgconfig:/opt/x265-local/lib/pkgconfig:/opt/libshine-fxp-local/lib/pkgconfig:/opt/libfdk-aac/lib/pkgconfig:/opt/xavs-local/lib/pkgconfig:/opt/vo-aacenc/lib/pkgconfig:/opt/gme-local/lib/pkgconfig:/opt/frei0r-local/lib/pkgconfig:$PKG_CONFIG_PATH ../ffmpeg/configure --enable-gpl --enable-nonfree --enable-version3 --enable-pic --enable-libfaac --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-librtmp --enable-libschroedinger --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc --enable-libvo-aacenc --enable-libx264 --arch=x86_64 --cpu=native --enable-gray --enable-avisynth --enable-avisynth --enable-fontconfig --enable-iconv --enable-libspeex --enable-libxvid --enable-openal --enable-libtheora --enable-libvorbis --enable-libv4l2 --enable-libgsm --enable-libopus --enable-libcaca --enable-ladspa --enable-libass --enable-libfribidi --enable-opengl --enable-libsoxr --enable-libx265 --enable-libcdio --enable-libilbc --enable-libopencv --enable-libzvbi --enable-libfreetype --enable-libmodplug --enable-libopenjpeg --enable-libzmq --enable-libwavpack --enable-librtmp --enable-libsmbclient --enable-libvpx --enable-libmp3lame --enable-openssl --enable-x11grab --enable-libpulse --enable-libiec61883 --enable-libbluray --enable-libbs2b --enable-libcelt --enable-libdc1394 --enable-libwebp --enable-libaacplus --enable-libvidstab --enable-postproc --enable-shared --enable-avresample --enable-frei0r --enable-libshine --enable-libfdk-aac --enable-libxavs --enable-libgme --extra-cflags="-O2 -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 -m64 -march=native -I/opt/celt-local/include -I/opt/libvpx-local/include -I/opt/libwebp-local/include -I/opt/libvidstab-local/include -I/opt/libaacplus-local/include -I/opt/soxr-local/include -I/opt/x265-local/include -I/opt/libshine-fxp-local/include -I/opt/libfdk-aac/include -I/opt/xavs-local/include -I/opt/vo-aacenc/include -I/opt/gme-local/include -I/opt/frei0r-local/include" --extra-ldflags="-L/opt/celt-local/lib -L/opt/libvpx-local/lib -L/opt/libwebp-local/lib -L/opt/libvidstab-local/lib -L/opt/libaacplus-local/lib -L/opt/soxr-local/lib -L/opt/x265-local/lib -L/opt/libshine-fxp-local/lib -L/opt/libfdk-aac/lib -L/opt/xavs-local/lib -L/opt/vo-aacenc/lib -L/opt/gme-local/lib -L/opt/frei0r-local/lib" --prefix=/usr/local/ffmpeg-2014-07-25 --extra-version="local-trnsz"
install prefix /usr/local/ffmpeg-2014-07-25
source path ~/src/ffmpeg
C compiler gcc
C library glibc
ARCH x86 (native)
version string suffix local-trnsz
big-endian no
runtime cpu detection yes
yasm yes
MMX enabled yes
MMXEXT enabled yes
3DNow! enabled yes
3DNow! extended enabled yes
SSE enabled yes
SSSE3 enabled yes
AVX enabled yes
XOP enabled yes
FMA3 enabled yes
FMA4 enabled yes
i686 features enabled yes
CMOV is fast yes
EBX available yes
EBP available yes
debug symbols yes
strip symbols yes
optimize for size no
optimizations yes
static yes
shared yes
postprocessing support yes
new filter support yes
network support yes
threading support pthreads
safe bitstream reader yes
SDL support yes
opencl enabled no
texi2html enabled yes
perl enabled yes
pod2man enabled yes
makeinfo enabled yes
External libraries:
avisynth libiec61883 libvidstab
bzlib libilbc libvo_aacenc
frei0r libmodplug libvo_amrwbenc
iconv libmp3lame libvorbis
ladspa libopencore_amrnb libvpx
libaacplus libopencore_amrwb libwavpack
libass libopencv libwebp
libbluray libopenjpeg libx264
libbs2b libopus libx265
libcaca libpulse libxavs
libcdio librtmp libxvid
libcelt libschroedinger libzmq
libdc1394 libshine libzvbi
libfaac libsmbclient openal
libfdk_aac libsoxr opengl
libfontconfig libspeex openssl
libfreetype libssh x11grab
libfribidi libtheora xlib
libgme libtwolame zlib
libgsm libv4l2
Enabled decoders:
aac bink gsm_ms
aac_latm binkaudio_dct h261
aasc binkaudio_rdft h263
ac3 bintext h263i
ac3_fixed bmp h263p
adpcm_4xm bmv_audio h264
adpcm_adx bmv_video h264_vdpau
adpcm_afc brender_pix hevc
adpcm_ct c93 hnm4_video
adpcm_dtk cavs huffyuv
adpcm_ea cdgraphics iac
adpcm_ea_maxis_xa cdxl idcin
adpcm_ea_r1 cinepak idf
adpcm_ea_r2 cljr iff_byterun1
adpcm_ea_r3 cllc iff_ilbm
adpcm_ea_xas comfortnoise imc
adpcm_g722 cook indeo2
adpcm_g726 cpia indeo3
adpcm_g726le cscd indeo4
adpcm_ima_amv cyuv indeo5
adpcm_ima_apc dca interplay_dpcm
adpcm_ima_dk3 dfa interplay_video
adpcm_ima_dk4 dirac jacosub
adpcm_ima_ea_eacs dnxhd jpeg2000
adpcm_ima_ea_sead dpx jpegls
adpcm_ima_iss dsd_lsbf jv
adpcm_ima_oki dsd_lsbf_planar kgv1
adpcm_ima_qt dsd_msbf kmvc
adpcm_ima_rad dsd_msbf_planar lagarith
adpcm_ima_smjpeg dsicinaudio libcelt
adpcm_ima_wav dsicinvideo libfdk_aac
adpcm_ima_ws dvbsub libgsm
adpcm_ms dvdsub libgsm_ms
adpcm_sbpro_2 dvvideo libilbc
adpcm_sbpro_3 dxa libopencore_amrnb
adpcm_sbpro_4 dxtory libopencore_amrwb
adpcm_swf eac3 libopenjpeg
adpcm_thp eacmv libopus
adpcm_vima eamad libschroedinger
adpcm_xa eatgq libspeex
adpcm_yamaha eatgv libvorbis
aic eatqi libvpx_vp8
alac eightbps libvpx_vp9
alias_pix eightsvx_exp libzvbi_teletext
als eightsvx_fib loco
amrnb escape124 mace3
amrwb escape130 mace6
amv evrc mdec
anm exr metasound
ansi ffv1 microdvd
ape ffvhuff mimic
ass ffwavesynth mjpeg
asv1 fic mjpegb
asv2 flac mlp
atrac1 flashsv mmvideo
atrac3 flashsv2 motionpixels
atrac3p flic movtext
aura flv mp1
aura2 fourxm mp1float
avrn fraps mp2
avrp frwu mp2float
avs g2m mp3
avui g723_1 mp3adu
ayuv g729 mp3adufloat
bethsoftvid gif mp3float
bfi gsm mp3on4
mp3on4float pgssub tscc
mpc7 pictor tscc2
mpc8 pjs tta
mpeg1_vdpau png twinvq
mpeg1video ppm txd
mpeg2video prores ulti
mpeg4 prores_lgpl utvideo
mpeg4_vdpau ptx v210
mpeg_vdpau qcelp v210x
mpegvideo qdm2 v308
mpl2 qdraw v408
msa1 qpeg v410
msmpeg4v1 qtrle vb
msmpeg4v2 r10k vble
msmpeg4v3 r210 vc1
msrle ra_144 vc1_vdpau
mss1 ra_288 vc1image
mss2 ralf vcr1
msvideo1 rawvideo vima
mszh realtext vmdaudio
mts2 rl2 vmdvideo
mvc1 roq vmnc
mvc2 roq_dpcm vorbis
mxpeg rpza vp3
nellymoser rv10 vp5
nuv rv20 vp6
on2avc rv30 vp6a
opus rv40 vp6f
paf_audio s302m vp7
paf_video sami vp8
pam sanm vp9
pbm sgi vplayer
pcm_alaw sgirle vqa
pcm_bluray shorten wavpack
pcm_dvd sipr webp
pcm_f32be smackaud webvtt
pcm_f32le smacker wmalossless
pcm_f64be smc wmapro
pcm_f64le smvjpeg wmav1
pcm_lxf snow wmav2
pcm_mulaw sol_dpcm wmavoice
pcm_s16be sonic wmv1
pcm_s16be_planar sp5x wmv2
pcm_s16le srt wmv3
pcm_s16le_planar ssa wmv3_vdpau
pcm_s24be subrip wmv3image
pcm_s24daud subviewer wnv1
pcm_s24le subviewer1 ws_snd1
pcm_s24le_planar sunrast xan_dpcm
pcm_s32be svq1 xan_wc3
pcm_s32le svq3 xan_wc4
pcm_s32le_planar tak xbin
pcm_s8 targa xbm
pcm_s8_planar targa_y216 xface
pcm_u16be text xl
pcm_u16le theora xsub
pcm_u24be thp xwd
pcm_u24le tiertexseqvideo y41p
pcm_u32be tiff yop
pcm_u32le tmv yuv4
pcm_u8 truehd zero12v
pcm_zork truemotion1 zerocodec
pcx truemotion2 zlib
pgm truespeech zmbv
pgmyuv
Enabled encoders:
a64multi libopenjpeg pcm_u24le
a64multi5 libopus pcm_u32be
aac libschroedinger pcm_u32le
ac3 libshine pcm_u8
ac3_fixed libspeex pcx
adpcm_adx libtheora pgm
adpcm_g722 libtwolame pgmyuv
adpcm_g726 libvo_aacenc png
adpcm_ima_qt libvo_amrwbenc ppm
adpcm_ima_wav libvorbis prores
adpcm_ms libvpx_vp8 prores_aw
adpcm_swf libvpx_vp9 prores_ks
adpcm_yamaha libwavpack qtrle
alac libwebp r10k
alias_pix libx264 r210
amv libx264rgb ra_144
ass libx265 rawvideo
asv1 libxavs roq
asv2 libxvid roq_dpcm
avrp ljpeg rv10
avui mjpeg rv20
ayuv movtext s302m
bmp mp2 sgi
cinepak mp2fixed snow
cljr mpeg1video sonic
comfortnoise mpeg2video sonic_ls
dca mpeg4 srt
dnxhd msmpeg4v2 ssa
dpx msmpeg4v3 subrip
dvbsub msvideo1 sunrast
dvdsub nellymoser svq1
dvvideo pam targa
eac3 pbm tiff
ffv1 pcm_alaw tta
ffvhuff pcm_f32be utvideo
flac pcm_f32le v210
flashsv pcm_f64be v308
flashsv2 pcm_f64le v408
flv pcm_mulaw v410
g723_1 pcm_s16be vorbis
gif pcm_s16be_planar wavpack
h261 pcm_s16le webvtt
h263 pcm_s16le_planar wmav1
h263p pcm_s24be wmav2
huffyuv pcm_s24daud wmv1
jpeg2000 pcm_s24le wmv2
jpegls pcm_s24le_planar xbm
libaacplus pcm_s32be xface
libfaac pcm_s32le xsub
libfdk_aac pcm_s32le_planar xwd
libgsm pcm_s8 y41p
libgsm_ms pcm_s8_planar yuv4
libilbc pcm_u16be zlib
libmp3lame pcm_u16le zmbv
libopencore_amrnb pcm_u24be
Enabled hwaccels:
h263_vdpau mpeg2_vdpau vc1_vdpau
h264_vdpau mpeg4_vdpau wmv3_vdpau
mpeg1_vdpau
Enabled parsers:
aac dvd_nav mpegvideo
aac_latm dvdsub opus
ac3 flac png
adx gsm pnm
bmp h261 rv30
cavsvideo h263 rv40
cook h264 tak
dca hevc vc1
dirac mjpeg vorbis
dnxhd mlp vp3
dpx mpeg4video vp8
dvbsub mpegaudio vp9
Enabled demuxers:
aac h261 nc
ac3 h263 nistsphere
act h264 nsv
adf hevc nut
adp hls nuv
adx hnm ogg
aea ico oma
afc idcin paf
aiff idf pcm_alaw
amr iff pcm_f32be
anm ilbc pcm_f32le
apc image2 pcm_f64be
ape image2_alias_pix pcm_f64le
aqtitle image2_brender_pix pcm_mulaw
asf image2pipe pcm_s16be
ass image_bmp_pipe pcm_s16le
ast image_dpx_pipe pcm_s24be
au image_exr_pipe pcm_s24le
avi image_j2k_pipe pcm_s32be
avisynth image_pictor_pipe pcm_s32le
avr image_png_pipe pcm_s8
avs image_sgi_pipe pcm_u16be
bethsoftvid image_sunrast_pipe pcm_u16le
bfi image_tiff_pipe pcm_u24be
bink ingenient pcm_u24le
bintext ipmovie pcm_u32be
bit ircam pcm_u32le
bmv iss pcm_u8
boa iv8 pjs
brstm ivf pmp
c93 jacosub pva
caf jv pvf
cavsvideo latm qcp
cdg libgme r3d
cdxl libmodplug rawvideo
cine live_flv realtext
concat lmlm4 redspark
data loas rl2
daud lrc rm
dfa lvf roq
dirac lxf rpl
dnxhd m4v rsd
dsf matroska rso
dsicin mgsts rtp
dts microdvd rtsp
dtshd mjpeg sami
dv mlp sap
dxa mlv sbg
ea mm sdp
ea_cdata mmf sdr2
eac3 mov segafilm
epaf mp3 shorten
ffm mpc siff
ffmetadata mpc8 sln
filmstrip mpegps smacker
flac mpegts smjpeg
flic mpegtsraw smush
flv mpegvideo sol
fourxm mpl2 sox
frm mpsub spdif
g722 msnwc_tcp srt
g723_1 mtv str
g729 mv subviewer
gif mvi subviewer1
gsm mxf swf
gxf mxg tak
tedcaptions vmd wsaud
thp vobsub wsvqa
tiertexseq voc wtv
tmv vplayer wv
truehd vqf xa
tta w64 xbin
tty wav xmv
txd wc3 xwma
vc1 webm_dash_manifest yop
vc1t webvtt yuv4mpegpipe
vivo
Enabled muxers:
a64 ipod pcm_s24be
ac3 ircam pcm_s24le
adts ismv pcm_s32be
adx ivf pcm_s32le
aiff jacosub pcm_s8
amr latm pcm_u16be
asf lrc pcm_u16le
asf_stream m4v pcm_u24be
ass matroska pcm_u24le
ast matroska_audio pcm_u32be
au md5 pcm_u32le
avi microdvd pcm_u8
avm2 mjpeg psp
bit mkvtimestamp_v2 rawvideo
caf mlp rm
cavsvideo mmf roq
crc mov rso
data mp2 rtp
daud mp3 rtsp
dirac mp4 sap
dnxhd mpeg1system segment
dts mpeg1vcd smjpeg
dv mpeg1video smoothstreaming
eac3 mpeg2dvd sox
f4v mpeg2svcd spdif
ffm mpeg2video speex
ffmetadata mpeg2vob srt
filmstrip mpegts stream_segment
flac mpjpeg swf
flv mxf tee
framecrc mxf_d10 tg2
framemd5 null tgp
g722 nut truehd
g723_1 oga uncodedframecrc
gif ogg vc1
gxf oma vc1t
h261 opus voc
h263 pcm_alaw w64
h264 pcm_f32be wav
hds pcm_f32le webm
hevc pcm_f64be webm_dash_manifest
hls pcm_f64le webvtt
ico pcm_mulaw wtv
ilbc pcm_s16be wv
image2 pcm_s16le yuv4mpegpipe
image2pipe
Enabled protocols:
bluray https mmst
cache librtmp pipe
concat librtmpe rtp
crypto librtmps sctp
data librtmpt srtp
file librtmpte subfile
ftp libsmbclient tcp
gopher libssh tls
hls md5 udp
http mmsh unix
httpproxy
Enabled filters:
aconvert dejudder owdenoise
adelay delogo pad
aecho deshake pan
aeval drawbox perms
aevalsrc drawgrid perspective
afade drawtext phase
aformat earwax pixdesctest
ainterleave ebur128 pp
allpass edgedetect psnr
alphaextract elbg pullup
alphamerge equalizer removelogo
amerge extractplanes replaygain
amix fade resample
amovie field rgbtestsrc
anull fieldmatch rotate
anullsink fieldorder sab
anullsrc flanger scale
apad format select
aperms fps sendcmd
aphaser framepack separatefields
aresample framestep setdar
aselect frei0r setfield
asendcmd frei0r_src setpts
asetnsamples geq setsar
asetpts gradfun settb
asetrate haldclut showcqt
asettb haldclutsrc showinfo
ashowinfo hflip showspectrum
asplit highpass showwaves
ass histeq shuffleplanes
astats histogram signalstats
astreamsync hqdn3d silencedetect
asyncts hqx sine
atempo hue smartblur
atrim idet smptebars
avectorscope il smptehdbars
azmq interlace split
bandpass interleave spp
bandreject join stereo3d
bass kerndeint subtitles
bbox ladspa super2xsai
biquad life swapuv
blackdetect lowpass telecine
blackframe lut testsrc
blend lut3d thumbnail
boxblur lutrgb tile
bs2b lutyuv tinterlace
cellauto mandelbrot transpose
channelmap mcdeint treble
channelsplit mergeplanes trim
color movie unsharp
colorbalance mp vflip
colorchannelmixer mpdecimate vidstabdetect
colormatrix mptestsrc vidstabtransform
compand negate vignette
concat noformat volume
copy noise volumedetect
crop null w3fdif
cropdetect nullsink yadif
curves nullsrc zmq
dctdnoiz ocv zoompan
decimate overlay
Enabled bsfs:
aac_adtstoasc imx_dump_header mp3_header_decompress
chomp mjpeg2jpeg noise
dump_extradata mjpega_dump_header remove_extradata
h264_mp4toannexb mov2textsub text2movsub
Enabled indevs:
alsa lavfi oss
dv1394 libcdio pulse
fbdev libdc1394 v4l2
iec61883 openal x11grab
Enabled outdevs:
alsa opengl sdl
caca oss v4l2
fbdev pulse
License: nonfree and unredistributable
Creating config.mak, config.h, and doc/config.texi...
# (Build process stdout and stderr output is available if needed)
$ ffmpeg -version
ffmpeg version N-64952-gc508adb-local-trnsz Copyright (c) 2000-2014 the FFmpeg developers
built on Jul 25 2014 11:18:39 with gcc 4.4.7 (GCC) 20120313 (Red Hat 4.4.7-4)
configuration: --enable-gpl --enable-nonfree --enable-version3 --enable-pic --enable-libfaac --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-librtmp --enable-libschroedinger --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc --enable-libvo-aacenc --enable-libx264 --arch=x86_64 --cpu=native --enable-gray --enable-avisynth --enable-avisynth --enable-fontconfig --enable-iconv --enable-libspeex --enable-libxvid --enable-openal --enable-libtheora --enable-libvorbis --enable-libv4l2 --enable-libgsm --enable-libopus --enable-libcaca --enable-ladspa --enable-libass --enable-libfribidi --enable-opengl --enable-libsoxr --enable-libx265 --enable-libcdio --enable-libilbc --enable-libopencv --enable-libzvbi --enable-libfreetype --enable-libmodplug --enable-libopenjpeg --enable-libzmq --enable-libwavpack --enable-librtmp --enable-libsmbclient --enable-libvpx --enable-libmp3lame --enable-openssl --enable-x11grab --enable-libpulse --enable-libiec61883 --enable-libbluray --enable-libbs2b --enable-libcelt --enable-libdc1394 --enable-libwebp --enable-libaacplus --enable-libvidstab --enable-postproc --enable-shared --enable-avresample --enable-frei0r --enable-libshine --enable-libfdk-aac --enable-libxavs --enable-libgme --extra-cflags='-O2 -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 -m64 -march=native -I/opt/celt-local/include -I/opt/libvpx-local/include -I/opt/libwebp-local/include -I/opt/libvidstab-local/include -I/opt/libaacplus-local/include -I/opt/soxr-local/include -I/opt/x265-local/include -I/opt/libshine-fxp-local/include -I/opt/libfdk-aac/include -I/opt/xavs-local/include -I/opt/vo-aacenc/include -I/opt/gme-local/include -I/opt/frei0r-local/include' --extra-ldflags='-L/opt/celt-local/lib -L/opt/libvpx-local/lib -L/opt/libwebp-local/lib -L/opt/libvidstab-local/lib -L/opt/libaacplus-local/lib -L/opt/soxr-local/lib -L/opt/x265-local/lib -L/opt/libshine-fxp-local/lib -L/opt/libfdk-aac/lib -L/opt/xavs-local/lib -L/opt/vo-aacenc/lib -L/opt/gme-local/lib -L/opt/frei0r-local/lib' --prefix=/usr/local/ffmpeg-2014-07-25 --extra-version=local-trnsz
libavutil 52. 92.101 / 52. 92.101
libavcodec 55. 69.100 / 55. 69.100
libavformat 55. 49.100 / 55. 49.100
libavdevice 55. 13.102 / 55. 13.102
libavfilter 4. 11.102 / 4. 11.102
libavresample 1. 3. 0 / 1. 3. 0
libswscale 2. 6.100 / 2. 6.100
libswresample 0. 19.100 / 0. 19.100
libpostproc 52. 3.100 / 52. 3.100
# Here is my use of the ffmpeg command, where $PIPE is a Unix FIFO, and ${INPUT} is replaced with arbitrary text specifying the input source, (usually another live stream), which is read directly by the ffmpeg(1) process.
# Prevent FIFO from closing if the ffmpeg(1) process exits, to allow uninterrupted streaming.
$ (while [ /bin/true ]; do sleep 99999999; done) > av.nut &
# Process 1 accepts arbritrary input from ${INPUT}, and converts it a common standard for further downstream processing via $PIPE
# [Assume $INPUT be rtmp://streamer.a1.net:1935/rtmplive/redundant/channels/Sporttime/SporttimeTV/mp4:channel1_800 for this example]
$ ffmpeg(1) -y -threads 0 -re -i ${INPUT} -vsync 2 -s 1280x720 -r:v 25 -async 1 -vcodec rawvideo -pix_fmt yuv420p -acodec pcm_s16le -ac 2 -ar 44100 -f nut -write_index 0 $PIPE > 1.output
# Process 2 accepts input from the $PIPE and outputs a live stream to be served via HTTPS
$ ffmpeg(2) -y -fflags +genpts+igndts -i $PIPE -map 0:0 -map 0:1 -vsync 2 -async 1 -c:a libfaac -ab:a 128k -ac 2 -c:v libx264 -s 1280x720 -r 25 -b:v 1000k -vprofile baseline -preset superfast -tune zerolatency -force_key_frames 50 -flags -global_header -fflags +genpts+igndts -f segment -segment_time 10 -segment_list_size 6 -segment_wrap 10 -segment_list out/stream.m3u8 -segment_list_flags +live-cache out/stream%04d.ts > 2.output
Here is 1.output (which is a tty):
ffmpeg version N-64952-gc508adb-local-trnsz Copyright (c) 2000-2014 the FFmpeg developers
[...]
HandShake: client signature does not match!
Metadata:
duration 0.00
width 640.00
height 360.00
videodatarate 838602.00
audiodatarate 64005.00
Input #0, flv, from 'rtmp://streamer.a1.net:1935/rtmplive/redundant/channels/Sporttime/SporttimeTV/mp4:channel1_800':
Duration: 00:00:00.00, start: 0.000000, bitrate: N/A
Stream #0:0: Video: h264 (Constrained Baseline), yuv420p, 640x360, 858728 kb/s, 25 fps, 25 tbr, 1k tbn, 50 tbc
Stream #0:1: Audio: aac, 44100 Hz, stereo, fltp, 65541 kb/s
-async is forwarded to lavfi similarly to -af aresample=async=1:min_hard_comp=0.100000:first_pts=0.
Output #0, nut, to 'av.nut':
Metadata:
encoder : Lavf55.49.100
Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p, 1280x720, q=2-31, 200 kb/s, 25 fps, 51200 tbn, 25 tbc
Metadata:
encoder : Lavc55.69.100 rawvideo
Stream #0:1: Audio: pcm_s16le (PSD[16] / 0x10445350), 44100 Hz, stereo, s16, 1411 kb/s
Metadata:
encoder : Lavc55.69.100 pcm_s16le
Stream mapping:
Stream #0:0 -> #0:0 (h264 (native) -> rawvideo (native))
Stream #0:1 -> #0:1 (aac (native) -> pcm_s16le (native))
Press [q] to stop, [?] for help
frame=ffff fps= 25 q=0.0 size= ssssssskB time=tt:tt:tt.tt bitrate=rrrrrr.rkbits/s
Here is 2.output (also a tty):
ffmpeg version N-64952-gc508adb-local-trnsz Copyright (c) 2000-2014 the FFmpeg developers
[...]
Guessed Channel Layout for Input Stream #0.1 : stereo
Input #0, nut, from 'av.nut':
Metadata:
encoder : Lavf55.49.100
Duration: N/A, start: 0.000000, bitrate: 1411 kb/s
Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p, 1280x720, 25 fps, 25 tbr, 51200 tbn, 51200 tbc
Metadata:
encoder : Lavc55.69.100 rawvideo
Stream #0:1: Audio: pcm_s16le (PSD[16] / 0x10445350), 44100 Hz, 2 channels, s16, 1411 kb/s
Metadata:
encoder : Lavc55.69.100 pcm_s16le
-async is forwarded to lavfi similarly to -af aresample=async=1:min_hard_comp=0.100000:first_pts=0.
[libx264 @ 0xfb78a0] using cpu capabilities: none!
[libx264 @ 0xfb78a0] profile Constrained Baseline, level 3.1
[segment @ 0xfb6a00] Codec for stream 0 does not use global headers but container format requires global headers
[segment @ 0xfb6a00] Codec for stream 1 does not use global headers but container format requires global headers
[mpegts @ 0x1520a60] Using AVStream.codec.time_base as a timebase hint to the muxer is deprecated. Set AVStream.time_base instead.
Last message repeated 1 times
Output #0, segment, to 'out/stream%04d.ts':
Metadata:
encoder : Lavf55.49.100
Stream #0:0: Video: h264 (libx264), yuv420p, 1280x720, q=-1--1, 1000 kb/s, 25 fps, 25 tbn, 25 tbc
Metadata:
encoder : Lavc55.69.100 libx264
Stream #0:1: Audio: aac (libfaac), 44100 Hz, stereo, s16, 128 kb/s
Metadata:
encoder : Lavc55.69.100 libfaac
Stream mapping:
Stream #0:0 -> #0:0 (rawvideo (native) -> h264 (libx264))
Stream #0:1 -> #0:1 (pcm_s16le (native) -> aac (libfaac))
Press [q] to stop, [?] for help
[mpegts @ 0x1a48020] Using AVStream.codec.time_base as a timebase hint to the muxer is deprecated. Set AVStream.time_base instead.
Last message repeated 1 times
[mpegts @ 0x1a48020] Using AVStream.codec.time_base as a timebase hint to the muxer is deprecated. Set AVStream.time_base instead.
Last message repeated 1 times
[mpegts @ 0x1a48020] Using AVStream.codec.time_base as a timebase hint to the muxer is deprecated. Set AVStream.time_base instead.
Last message repeated 1 times
[mpegts @ 0x1a48020] Using AVStream.codec.time_base as a timebase hint to the muxer is deprecated. Set AVStream.time_base instead.
Last message repeated 1 times
[ ... snip ... ]
frame=ffff fps= 25 q=33.0 size=N/A time=tt:tt:tt.tt bitrate=N/A
# At this point everything is great, and the output video is served to all clients via HTTPS and has been tested
# with ffplay, iOS, and VLC. The problem is that if ffmpeg(1) exits, and restarts with ${INPUT} redefined.
# Ex: ${INPUT} is now http://acaooyalahd2-lh.akamaihd.net/i/TBN01_delivery@186239/master.m3u8 and ffmpeg(1) is restarted with
# the same command line. ffmpeg(2) continues to read $PIPE.
Here is 1.output:
ffmpeg version N-64952-gc508adb-local-trnsz Copyright (c) 2000-2014 the FFmpeg developers
[...]
[h264 @ 0x1ea99a0] non-existing PPS 0 referenced
Last message repeated 1 times
[h264 @ 0x1ea99a0] decode_slice_header error
[h264 @ 0x1ea99a0] no frame!
[h264 @ 0x1ea99a0] non-existing PPS 0 referenced
[ ... snip ... ] # repeats for several thousand lines of output instantly as the stream syncs up.
[hls,applehttp @ 0x1e84000] Estimating duration from bitrate, this may be inaccurate
Input #0, hls,applehttp, from 'http://acaooyalahd2-lh.akamaihd.net/i/TBN01_delivery@186239/master.m3u8':
Duration: 00:00:00.08, start: 42253.676678, bitrate: 230 kb/s
Program 0
Metadata:
variant_bitrate : 282000
Stream #0:0: Video: h264 (Baseline) ([27][0][0][0] / 0x001B), yuv420p(tv, GBR), 256x144 [SAR 1:1 DAR 16:9], 29.97 tbr, 90k tbn, 59.94 tbc
Metadata:
variant_bitrate : 282000
Stream #0:1: Audio: aac ([15][0][0][0] / 0x000F), 44100 Hz, stereo, fltp, 31 kb/s
Metadata:
variant_bitrate : 282000
Stream #0:2: Data: timed_id3 (ID3 / 0x20334449)
Metadata:
variant_bitrate : 282000
Program 1
Metadata:
variant_bitrate : 282000
Stream #0:3: Video: h264 (Baseline) ([27][0][0][0] / 0x001B), yuv420p(tv, GBR), 256x144 [SAR 1:1 DAR 16:9], 29.97 tbr, 90k tbn, 59.94 tbc
Metadata:
variant_bitrate : 282000
Stream #0:4: Audio: aac ([15][0][0][0] / 0x000F), 44100 Hz, stereo, fltp, 31 kb/s
Metadata:
variant_bitrate : 282000
Stream #0:5: Data: timed_id3 (ID3 / 0x20334449)
Metadata:
variant_bitrate : 282000
Program 2
Metadata:
variant_bitrate : 564000
Stream #0:6: Video: h264 (Baseline) ([27][0][0][0] / 0x001B), yuv420p(tv, GBR), 512x288 [SAR 1:1 DAR 16:9], 29.97 tbr, 90k tbn, 59.94 tbc
Metadata:
variant_bitrate : 564000
Stream #0:7: Audio: aac ([15][0][0][0] / 0x000F), 44100 Hz, stereo, fltp, 63 kb/s
Metadata:
variant_bitrate : 564000
Stream #0:8: Data: timed_id3 (ID3 / 0x20334449)
Metadata:
variant_bitrate : 564000
Program 3
Metadata:
variant_bitrate : 564000
Stream #0:9: Video: h264 (Baseline) ([27][0][0][0] / 0x001B), yuv420p(tv, GBR), 512x288 [SAR 1:1 DAR 16:9], 29.97 tbr, 90k tbn, 59.94 tbc
Metadata:
variant_bitrate : 564000
Stream #0:10: Audio: aac ([15][0][0][0] / 0x000F), 44100 Hz, stereo, fltp, 63 kb/s
Metadata:
variant_bitrate : 564000
Stream #0:11: Data: timed_id3 (ID3 / 0x20334449)
Metadata:
variant_bitrate : 564000
Program 4
Metadata:
variant_bitrate : 1164000
Stream #0:12: Video: h264 (Baseline) ([27][0][0][0] / 0x001B), yuv420p(tv, GBR), 640x360 [SAR 1:1 DAR 16:9], 29.97 tbr, 90k tbn, 59.94 tbc
Metadata:
variant_bitrate : 1164000
Stream #0:13: Audio: aac ([15][0][0][0] / 0x000F), 44100 Hz, stereo, fltp, 61 kb/s
Metadata:
variant_bitrate : 1164000
Stream #0:14: Data: timed_id3 (ID3 / 0x20334449)
Metadata:
variant_bitrate : 1164000
Program 5
Metadata:
variant_bitrate : 1164000
Stream #0:15: Video: h264 (Baseline) ([27][0][0][0] / 0x001B), yuv420p(tv, GBR), 640x360 [SAR 1:1 DAR 16:9], 29.97 tbr, 90k tbn, 59.94 tbc
Metadata:
variant_bitrate : 1164000
Stream #0:16: Audio: aac ([15][0][0][0] / 0x000F), 44100 Hz, stereo, fltp, 61 kb/s
Metadata:
variant_bitrate : 1164000
Stream #0:17: Data: timed_id3 (ID3 / 0x20334449)
Metadata:
variant_bitrate : 1164000
Program 6
Metadata:
variant_bitrate : 1728000
Stream #0:18: Video: h264 (Baseline) ([27][0][0][0] / 0x001B), yuv420p(tv, GBR), 848x480 [SAR 1:1 DAR 53:30], 29.97 tbr, 90k tbn, 59.94 tbc
Metadata:
variant_bitrate : 1728000
Stream #0:19: Audio: aac ([15][0][0][0] / 0x000F), 44100 Hz, stereo, fltp, 127 kb/s
Metadata:
variant_bitrate : 1728000
Stream #0:20: Data: timed_id3 (ID3 / 0x20334449)
Metadata:
variant_bitrate : 1728000
Program 7
Metadata:
variant_bitrate : 1728000
Stream #0:21: Video: h264 (Baseline) ([27][0][0][0] / 0x001B), yuv420p(tv, GBR), 848x480 [SAR 1:1 DAR 53:30], 29.97 tbr, 90k tbn, 59.94 tbc
Metadata:
variant_bitrate : 1728000
Stream #0:22: Audio: aac ([15][0][0][0] / 0x000F), 44100 Hz, stereo, fltp, 127 kb/s
Metadata:
variant_bitrate : 1728000
Stream #0:23: Data: timed_id3 (ID3 / 0x20334449)
Metadata:
variant_bitrate : 1728000
Program 8
Metadata:
variant_bitrate : 2528000
Stream #0:24: Video: h264 (Baseline) ([27][0][0][0] / 0x001B), yuv420p(tv, GBR), 1280x720 [SAR 1:1 DAR 16:9], 29.97 tbr, 90k tbn, 59.94 tbc
Metadata:
variant_bitrate : 2528000
Stream #0:25: Audio: aac ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 135 kb/s
Metadata:
variant_bitrate : 2528000
Stream #0:26: Data: timed_id3 (ID3 / 0x20334449)
Metadata:
variant_bitrate : 2528000
Program 9
Metadata:
variant_bitrate : 2528000
Stream #0:27: Video: h264 (Baseline) ([27][0][0][0] / 0x001B), yuv420p(tv, GBR), 1280x720 [SAR 1:1 DAR 16:9], 29.97 tbr, 90k tbn, 59.94 tbc
Metadata:
variant_bitrate : 2528000
Stream #0:28: Audio: aac ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 135 kb/s
Metadata:
variant_bitrate : 2528000
Stream #0:29: Data: timed_id3 (ID3 / 0x20334449)
Metadata:
variant_bitrate : 2528000
Program 10
Metadata:
variant_bitrate : 32000
Stream #0:30: Audio: aac ([15][0][0][0] / 0x000F), 44100 Hz, stereo, fltp, 28 kb/s
Metadata:
variant_bitrate : 32000
Stream #0:31: Data: timed_id3 (ID3 / 0x20334449)
Metadata:
variant_bitrate : 32000
Program 11
Metadata:
variant_bitrate : 32000
Stream #0:32: Audio: aac ([15][0][0][0] / 0x000F), 44100 Hz, stereo, fltp, 32 kb/s
Metadata:
variant_bitrate : 32000
Stream #0:33: Data: timed_id3 (ID3 / 0x20334449)
Metadata:
variant_bitrate : 32000
-async is forwarded to lavfi similarly to -af aresample=async=1:min_hard_comp=0.100000:first_pts=0.
Output #0, nut, to 'av.nut':
Metadata:
encoder : Lavf55.49.100
Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], q=2-31, 200 kb/s, 25 fps, 51200 tbn, 25 tbc
Metadata:
variant_bitrate : 2528000
encoder : Lavc55.69.100 rawvideo
Stream #0:1: Audio: pcm_s16le (PSD[16] / 0x10445350), 44100 Hz, stereo, s16, 1411 kb/s
Metadata:
variant_bitrate : 282000
encoder : Lavc55.69.100 pcm_s16le
Stream mapping:
Stream #0:24 -> #0:0 (h264 (native) -> rawvideo (native))
Stream #0:1 -> #0:1 (aac (native) -> pcm_s16le (native))
Press [q] to stop, [?] for help
[hls,applehttp @ 0x1e84000] No longer receiving playlist 1
[hls,applehttp @ 0x1e84000] No longer receiving playlist 2
[hls,applehttp @ 0x1e84000] No longer receiving playlist 3
[hls,applehttp @ 0x1e84000] No longer receiving playlist 4
[hls,applehttp @ 0x1e84000] No longer receiving playlist 5
[hls,applehttp @ 0x1e84000] No longer receiving playlist 6
[hls,applehttp @ 0x1e84000] No longer receiving playlist 7
[hls,applehttp @ 0x1e84000] No longer receiving playlist 9
[hls,applehttp @ 0x1e84000] No longer receiving playlist 10
[hls,applehttp @ 0x1e84000] No longer receiving playlist 11
frame= 12 fps= 25 q=0.0 size= ssssssskB time=tt:tt:tt.tt bitrate=276716.2kbits/s dup=0 drop=dddd
# The "problem" shows when the new frames are being sent from a new run of ffmpeg(1) to the long-running ffmpeg(2).
# The 2.output shows:
[rawvideo @ 0x21fb160] Invalid buffer size, packet size 14495 < expected frame_size 1382400
Error while decoding stream #0:0: Invalid argument
[nut @ 0x21f82a0] Last frame must have been damaged 1666262460 > 1666219235 + 32767
[ ... all good, it syncs now ... ]
frame= 1199 fps= 12 q=27.0 size=N/A time=00:00:48.76 bitrate=N/A dup=0 drop=1067
# The stream itself freezes until the new ffmpeg(2) process consumes as many frames as necessary to reach the number
# where it left off. In this case it's 1199. At soon as ffmpeg(1) sends ffmpeg(2) frame 1200, it stops dropping
# frames and continues to play. In the meantime, the stream appears "frozen" to any playing client, and starts up
# again just fine once 'that frame' (in this example, 1200) is sent through the pipe.
# I assume I have to do some sort of PTS/DTS molesting here, possibly with setpts? What I'd like is for the stream
# to resume as soon as valid frames are consumed again. If the stream has been up for 1 hours and 10 seconds, there
# isn't any need to drop the first 1 hour and 10 seconds of the next input and only start again when the 2nd ${INPUT}
# hits 1 hour and 11 seconds of data sent.
# I hope this is enough information to explain the isolated problem in the prototype application.
# I humbly request any assistance that might be offered by anyone willing to look into my (obviously noobish) problem,
# or offer other suggestions or optimizations.