From owner-freebsd-multimedia@FreeBSD.ORG Sun Mar 2 05:43:22 2014 Return-Path: Delivered-To: freebsd-multimedia@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9ADB04BF; Sun, 2 Mar 2014 05:43:22 +0000 (UTC) Received: from na01-by2-obe.outbound.protection.outlook.com (mail-by2lp0240.outbound.protection.outlook.com [207.46.163.240]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 29F721D2F; Sun, 2 Mar 2014 05:43:21 +0000 (UTC) Received: from BY2PRD0310HT001.namprd03.prod.outlook.com (10.255.80.36) by BL2PR03MB497.namprd03.prod.outlook.com (10.141.93.142) with Microsoft SMTP Server (TLS) id 15.0.888.9; Sun, 2 Mar 2014 05:43:19 +0000 Received: from [10.0.0.66] (98.240.141.71) by pod51008.outlook.com (10.255.80.36) with Microsoft SMTP Server (TLS) id 14.16.423.0; Sun, 2 Mar 2014 05:43:18 +0000 Message-ID: <5312C4F4.7060109@my.hennepintech.edu> Date: Sat, 1 Mar 2014 23:43:16 -0600 From: Andrew Berg User-Agent: Mozilla/5.0 (Windows NT 6.2; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.3.0 MIME-Version: 1.0 To: Subject: FFmpeg and x264 circular dependency Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [98.240.141.71] X-Forefront-PRVS: 0138CD935C X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009001)(6009001)(428001)(189002)(199002)(75432001)(74366001)(76482001)(93136001)(46102001)(90146001)(63696002)(54356001)(53806001)(92566001)(86362001)(56816005)(54316002)(47736001)(56776001)(47976001)(85852003)(65956001)(66066001)(50986001)(93516002)(50466002)(74706001)(92726001)(51856001)(47776003)(85306002)(83072002)(80022001)(77982001)(59766001)(79102001)(59896001)(4396001)(95416001)(23676002)(33656001)(47446002)(76786001)(76796001)(80316001)(83322001)(80976001)(81686001)(74662001)(74876001)(81542001)(49866001)(94316002)(74502001)(69226001)(19580395003)(15975445006)(83506001)(81342001)(76176001)(31966008)(87936001)(81816001)(95666003); DIR:OUT; SFP:1101; SCL:1; SRVR:BL2PR03MB497; H:BY2PRD0310HT001.namprd03.prod.outlook.com; CLIP:98.240.141.71; FPR:2CCCE306.AE3253C3.91ECB0B0.8ED844E3.20301; MLV:sfv; PTR:InfoNoRecords; MX:1; A:0; LANG:en; Received-SPF: None (: my.HennepinTech.edu does not designate permitted sender hosts) X-OriginatorOrg: my.hennepintech.edu Cc: koobs@freebsd.org X-BeenThere: freebsd-multimedia@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Multimedia discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Mar 2014 05:43:22 -0000 Currently, FFmpeg and x264 depend on each other, though not completely. FFmpeg needs libx264 to do H.264 encoding, which is fine. However, the x264 CLI utility requires libavcodec and libavformat (which FFmpeg supplies) in order to provide lavf support (demuxing and decoding a standard video file instead of requiring raw video). This has likely not been noticed before since x264 will build without FFmpeg (and if FFmpeg is not present, x264 will simply not have lavf support). The issue is that if there is an update to x264 and it is rebuilt while FFmpeg is present, it will link to several libav libraries in order to get lavf/lavc support. pkg will detect this and register FFmpeg as a dependency of x264. In order to avoid this, there are currently 3 ideas between the x264 maintainer (who is cc'd) and I: - Disable libav support in x264 entirely - Split FFmpeg and libav into separate ports, thereby making x264 dependent on libav and not FFmpeg - Split x264 into x264cli and libx264, thereby making FFmpeg dependent only on libx264 The first is not preferable since it removes a feature that many people use. The third is a little better, but it might be clunky to make x264 explicitly dependent on FFmpeg. I much prefer the second since libav is widely used and things that use it do not necessarily need FFmpeg itself. What would it take to separate libav into its own port? I realize the change would be disruptive, but it seems a lot cleaner than keeping it bundled with FFmpeg, even if FFmpeg bundles libav upstream, and it would solve this issue and potentially some similar issues with other ports that use libav. There is a separate git repository for libav[1], however, I do not know how well it works with the rest of FFmpeg[2]. [1] https://git.libav.org/?p=libav.git;a=summary [2] https://github.com/FFmpeg/FFmpeg