From owner-freebsd-questions@FreeBSD.ORG Sat Jun 29 03:57:17 2013 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 7A906693; Sat, 29 Jun 2013 03:57:17 +0000 (UTC) (envelope-from FreeBSD@shaneware.biz) Received: from ipmail04.adl6.internode.on.net (ipmail04.adl6.internode.on.net [IPv6:2001:44b8:8060:ff02:300:1:6:4]) by mx1.freebsd.org (Postfix) with ESMTP id DACFC1613; Sat, 29 Jun 2013 03:57:16 +0000 (UTC) Received: from ppp247-71.static.internode.on.net (HELO leader.local) ([203.122.247.71]) by ipmail04.adl6.internode.on.net with ESMTP; 29 Jun 2013 13:27:15 +0930 Message-ID: <51CE5B18.6030302@ShaneWare.Biz> Date: Sat, 29 Jun 2013 13:27:12 +0930 From: Shane Ambler User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:17.0) Gecko/20130516 Thunderbird/17.0.6 MIME-Version: 1.0 To: Giorgos Keramidas , Simon , FreeBSD-questions Subject: Re: FFMpeg and FreeBSD References: <20130627002803.32786E67@hub.freebsd.org> <51CBA997.8040006@ShaneWare.Biz> <67um8rhagimbsb.fsf@saturn.laptop> In-Reply-To: <67um8rhagimbsb.fsf@saturn.laptop> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Jun 2013 03:57:17 -0000 On 29/06/2013 02:07, Giorgos Keramidas wrote: >> I have had no problems using ffmpeg1 with my version of blender >> for several months now. It has a cmake option for lib names and >> then I added include/ffmpeg1 to C/CXXFLAGS and lib/ffmpeg1 to >> LDFLAGS. > > Hi Shane, > > This should probably be in the multimedi chapter of the Handbook or > the FAQ, or in the UPDATING file of the ports. Would you mind if I > copied parts of the text and added them to e.g the FAQ? sure - I'm thinking FAQ. Maybe start with the following - To use ffmpeg1 with an existing port. The first step is to get the ffmpeg1 headers and libs found, this should be easily accomplished with the following (an easy way to first check that the port compiles with ffmpeg1) - CFLAGS+= -I${LOCALBASE}/include/ffmpeg1 CXXFLAGS+= -I${LOCALBASE}/include/ffmpeg1 LDFLAGS+= -L${LOCALBASE}/lib/ffmpeg1 If the project source hasn't kept up with ffmpeg changes then you may be able to replace some of the old functions to quickly keep it working with the newer version. Blender can be source of inspiration for this - http://projects.blender.org/scm/viewvc.php/trunk/blender/intern/ffmpeg/ffmpeg_compat.h?view=markup&root=bf-blender The next step is to get it linking with the new lib names, these are the ffmpeg lib names with a 1 appended to them eg. libavcodec1 instead of libavcodec. Some ports may have options to make this easy for example graphics/blender has a cmake variable called FFMPEG_LIBRARIES so adding CMAKE_ARGS+=-DFFMPEG_LIBRARIES:STRING="avformat1;avcodec1;avutil1;avdevice1;swscale1" to the port Makefile handles that. Other ports may need a search and replace such as sed 's|avcodec|avcodec1|g' or a patch manually made for their Makefiles.