Index: Portfile
===================================================================
--- Portfile	(revision 148306)
+++ Portfile	(working copy)
@@ -65,7 +65,6 @@
                     port:avahi \
                     port:bzip2 \
                     port:faad2 \
-                    path:lib/libavcodec.dylib:ffmpeg \
                     port:flac \
                     port:fluidsynth \
                     port:fontconfig \
@@ -131,6 +130,16 @@
                     port:x264 \
                     port:x265
 
+# build upstream specified ffmpeg version 2.7.git as a static library
+# using VLC's contrib build method. The rest comes from MacPorts
+# https://wiki.videolan.org/UnixCompile/#The_.22Contrib.22_method
+
+# additional build dependencies required for the contrib build
+
+depends_build-append \
+                    port:yasm \
+                    port:git
+
 # the +qt5 and/or +qt4 variants of port:opencv currently lead to build errors
 pre-configure {
     if {![active_variants opencv "" {qt4 qt5}]} {
@@ -139,6 +148,12 @@
         after building you can reactivate your preferred opencv variant"
         return -code error "Install or activate port:opencv without a qt variant before building ${subport}"
     }
+
+# setup and build contrib modules restricting build to ffmpeg and its (very) few recommended dependencies.
+# see ${worksrcpath}/contrib/src/ffmpeg/rules.mak
+
+    xinstall -d ${worksrcpath}/contrib/native
+    system "cd ${worksrcpath}/contrib/native && ../bootstrap && cat ${filespath}/config.mak.settings >> config.mak && make"
 }
 
 # VLC 2.2.2 should have full Lua 5.3 compatibility, for now, depend on port:lua52
@@ -168,6 +183,11 @@
                     patch-vlc-no-O4.diff \
                     patch-opencv_includes.diff
 
+# patch contrib/src/ffmpeg/rules.mak to enable libavresample
+# necessary for VLC to build
+
+patchfiles-append   ffmpeg-rules.mak.patch
+
 # The opencv example apparently builds on 10.11 but I'm having issues with it on 10.9
 # it doesn't appear to be indispensable, so simply skip it.
 patchfiles-append   patch-no-opencv_example.diff
@@ -206,7 +226,7 @@
 
 # Other
 configure.args-append \
-                    --with-contrib=${worksrcpath}/contrib \
+                    --with-contrib \
                     --disable-debug --disable-update-check --enable-gnutls \
                     --disable-notify --disable-dbus --enable-lua \
                     --disable-gnomevfs --disable-growl --disable-macosx-vlc-app
@@ -300,7 +320,7 @@
 
 variant pulse description {Enable PulseAudio support} {
     depends_lib-append      port:pulseaudio
-    configure.args-replace  --disable-pulse --enable-pulse 
+    configure.args-replace  --disable-pulse --enable-pulse
 }
 
 variant x11 {
@@ -354,7 +374,7 @@
     configure.args-delete   --disable-macosx \
                             --enable-samplerate \
                             --disable-realrtsp
-    configure.args-append   --enable-macosx 
+    configure.args-append   --enable-macosx
     # taken from VLC's own configure.sh script for OS X:
     configure.args-append   --disable-samplerate \
                             --enable-merge-ffmpeg \
Index: files/config.mak.settings
===================================================================
--- files/config.mak.settings	(nonexistent)
+++ files/config.mak.settings	(working copy)
@@ -0,0 +1,4 @@
+PKGS_DISABLE := a52 caca faad2 gcrypt gettext gme goom growl \
+                kate live555 lua matroska mpcdec postproc shout sidplay2 sparkle \
+  		tiger upnp vncserver zvbi
+PKGS_ENABLE := ffmpeg 
Index: files/ffmpeg-rules.mak.patch
===================================================================
--- files/ffmpeg-rules.mak.patch	(nonexistent)
+++ files/ffmpeg-rules.mak.patch	(working copy)
@@ -0,0 +1,11 @@
+--- contrib/src/ffmpeg/rules.mak.orig	2016-04-30 00:34:57.000000000 -0700
++++ contrib/src/ffmpeg/rules.mak	2016-04-30 00:35:15.000000000 -0700
+@@ -29,7 +29,7 @@
+ 	--disable-protocol=concat \
+ 	--disable-bsfs \
+ 	--disable-bzlib \
+-	--disable-avresample
++	--enable-avresample
+ 
+ ifdef USE_FFMPEG
+ FFMPEGCONF += \
