jpsdr
15th September 2015, 14:12
FFMPEG
In "C:\x264_Prg\" create a file named Build_ffmpeg_x264.sh.
Put the following inside :
cd ./ffmpeg-stable/Build_x264
_dir="/local-x264"
[[ "$1" = "32" ]] && _dir="${_dir}_x86"
[[ "$1" = "64" ]] && _dir="${_dir}_x64"
[[ "$2" = "posix" ]] && _dir="${_dir}/posix"
[[ "$2" = "win32" ]] && _dir="${_dir}/Win32threads"
[[ "$3" = "original" ]] && _dir="${_dir}/Original"
[[ "$3" = "tmod" ]] && _dir="${_dir}/t_mod"
[[ "$3" = "jpsdr" ]] && _dir="${_dir}/jpsdr"
_arch="x86"
_cf="-mfpmath=sse -march=pentium3 -msse -mtune=pentium3"
_ld="-static"
_threads="--enable-pthreads --disable-w32threads"
_cpu="--cpu=pentium3"
_extra="--enable-avresample --disable-hwaccels --disable-network --disable-bsfs --disable-indevs --disable-outdevs --disable-devices --disable-avdevice --disable-d3d11va"
[[ "$3" = "tmod" ]] && _extra="${_extra} --enable-protocol=file --enable-swscale --enable-version3 --enable-nonfree"
[[ "$3" = "tmod" ]] && _extra="${_extra} --disable-decoder=alac,amrnb,amrwb,ape,ass,atrac1,atrac3,atrac3p,ccaption,mpc7,mpc8,mpl2,msmpeg4_crystalhd,nellymoser,opus,paf_audio,comfortnoise,cook,dsd_*,dsicinaudio,dvbsub,dvdsub,evrc,g723_1,g729,pgssub,pictor,pjs,qcelp,qdm2,ra_144,ra_288,ralf,realtext,roq_dpcm,sami,shorten,sipr,smackaud,sol_dpcm,sonic,srt,ssa,stl,subrip,subviewer,subviewer1,tak,text,gsm,gsm_ms,iac,idf,imc,interplay_dpcm,jacosub,lib*,mace3,mace6,metasound,microdvd,movtext,truespeech,tta,twinvq,vc1_crystalhd,vc1_vdpau,ws_snd1,xan_dpcm,xbin,xsub"
[[ "$3" = "jpsdr" ]] && _extra="${_extra} --enable-protocol=file --enable-swscale --enable-version3 --enable-nonfree"
[[ "$3" = "jpsdr" ]] && _extra="${_extra} --disable-decoder=alac,amrnb,amrwb,ape,ass,atrac1,atrac3,atrac3p,ccaption,mpc7,mpc8,mpl2,msmpeg4_crystalhd,nellymoser,opus,paf_audio,comfortnoise,cook,dsd_*,dsicinaudio,dvbsub,dvdsub,evrc,g723_1,g729,pgssub,pictor,pjs,qcelp,qdm2,ra_144,ra_288,ralf,realtext,roq_dpcm,sami,shorten,sipr,smackaud,sol_dpcm,sonic,srt,ssa,stl,subrip,subviewer,subviewer1,tak,text,gsm,gsm_ms,iac,idf,imc,interplay_dpcm,jacosub,lib*,mace3,mace6,metasound,microdvd,movtext,truespeech,tta,twinvq,vc1_crystalhd,vc1_vdpau,ws_snd1,xan_dpcm,xbin,xsub"
[[ "$3" = "original" ]] && _extra="${_extra} --disable-protocols --enable-protocol=file"
[[ "$3" = "original" ]] && _extra="${_extra} --disable-muxers --enable-muxer=avi,rawvideo,yuv4mpegpipe"
[[ "$3" = "original" ]] && _extra="${_extra} --disable-encoders --disable-filters"
[[ "$3" = "original" ]] && _extra="${_extra} --disable-parser=aac,aac_latm,ac3,cook,dca,dvbsub,dvd_nav,dvdsub,flac,gsm,mlp,mpegaudio,opus,tak,vorbis"
[[ "$3" = "original" ]] && _extra="${_extra} --disable-demuxer=aac,ac3,act,adf,adp,adx,aea,afc,aiff,amr,apc,ape,aqtitle,ass,ast,au,avr,bintext,bit,boa,brstm,caf,concat,daud,dsf,dts,dtshd,ea_cdata,eac3,epaf,ffmetadata,flac,g722,g723_1,g729,gsm,srt,stl,subviewer,subviewer1,sup,tak,tedcaptions,truehd,idf,ilbc,ircam,iss,jacosub,latm,libgme,libquvi,live_flv,loas,lrc,microdvd,mlp,mmf,mp3,mpc,mpc8,mpl2,mpsub,tta,txd,vobsub,voc,vplayer,vqf,w64,wav,msnwc_tcp,nistsphere,ogg,oma,pcm_*,pjs,pvf,qcp,realtext,redspark,rsd,rso,rtp,rtsp,sami,sap,sbg,sdp,shorten,sln,sol,sox,spdif,webm_dash_manifest,webvtt,wsaud,wv,xa,xwma"
[[ "$3" = "original" ]] && _extra="${_extra} --disable-decoder=aac,aac_latm,ac3,ac3_fixed,adpcm_*,alac,amrnb,amrwb,ape,ass,atrac1,atrac3,atrac3p,ccaption,mp3,mp3adu,mp3adufloat,mp3float,mp3on4,mp3on4float,mpc7,mpc8,mpeg1_vdpau,mpeg2_crystalhd,mpeg4_crystalhd,mpeg4_vdpau,mpeg_vdpau,mpeg_xvmc,mpl2,msmpeg4_crystalhd,nellymoser,opus,paf_audio,pcm_*,binkaudio_*,bmv_audio,comfortnoise,cook,dca,dsd_*,dsicinaudio,dvbsub,dvdsub,eac3,evrc,ffwavesynth,flac,g723_1,g729,pcm_*,pgssub,pictor,pjs,qcelp,qdm2,ra_144,ra_288,ralf,realtext,roq_dpcm,sami,shorten,sipr,smackaud,sol_dpcm,sonic,srt,ssa,stl,subrip,subviewer,subviewer1,tak,text,gsm,gsm_ms,h264_crystalhd,h264_vda,h264_vdpau,iac,idf,imc,interplay_dpcm,jacosub,lib*,mace3,mace6,metasound,microdvd,mlp,movtext,mp1,mp1float,mp2,mp2float,truehd,truespeech,tta,twinvq,vc1_crystalhd,vc1_vdpau,vmdaudio,vorbis,vplayer,wavpack,webvtt,wma*,wmv3_crystalhd,wmv3_vdpau,ws_snd1,xan_dpcm,xbin,xsub"
[[ "$1" = "64" ]] && _arch="${_arch}_64"
[[ "$3" = "original" ]] && _cf="${_cf} -U__STRICT_ANSI__"
[[ "$3" = "jpsdr" ]] && _cf=""
[[ "$1" = "64" ]] && _cf="-m64"
[[ "$3" = "jpsdr" ]] && _cf="${_cf} -mfpmath=sse -march=haswell -mavx -mavx2 -mtune=haswell"
[[ "$1" = "64" ]] && _ld="${_ld} -m64"
[[ "$2" = "win32" ]] && _threads="--disable-pthreads --enable-w32threads"
[[ "$1" = "64" ]] && _cpu=""
[[ "$3" = "jpsdr" ]] && _cpu="--cpu=haswell"
../configure --prefix=${_dir} --target-os=mingw32 --arch=${_arch} \
--extra-cflags="${_cf}" --extra-ldflags="${_ld}" \
--enable-static --disable-shared ${_threads} --enable-gpl \
--disable-debug --disable-programs --disable-doc \
${_extra} \
--enable-runtime-cpudetect --enable-memalign-hack --enable-postproc ${_cpu}
make -j1
make install
make clean
If you want to compile for x86, in msys2, start the mingw32 shell. If you want to compile for x64, start the mingw64 shell.
Warning : It seems for ffmpeg that to compile for x64, you have to be under an x64 OS.
In the mingw shell you have opened, go into the "C:\x264_Prg\" directory with the following command :
cd c:/x264_Prg
Now, you can launch the building script with the following command :
./Build_ffmpeg_x264.sh param1 param2 param3
Values of parameters are :
param1 : 32 or 64 : You will set if you target x86 or x64. You must nevertheless have launched the proper mingw shell.
param2 : posix or win32 : You will set if you will compile using posix or win32 threads.
param3 : original, tmod or jpsdr (well... this is the script i'm using... ;)).
- original : You'll build the libraries for original version, don't need to much extra, will just be a little smaller.
- tmod : You'll build the libraries for tmod and others versions, add a little more stuff.
- jpsdr : Identical to tmod, but compile targeting haswell cpu and use of avx/avx2 instructions. Not checked, but probably works only of you have an haswell on the PC you compile with.
Build all the versions you need, and be patient...
Now, we'll build l-smash.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.