From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <ffmpeg-devel-bounces@ffmpeg.org> Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTPS id 7349E4E719 for <ffmpegdev@gitmailbox.com>; Fri, 14 Mar 2025 16:13:36 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id B971968E3A5; Fri, 14 Mar 2025 18:13:32 +0200 (EET) Received: from mail-wm1-f53.google.com (mail-wm1-f53.google.com [209.85.128.53]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 6D11068B61D for <ffmpeg-devel@ffmpeg.org>; Fri, 14 Mar 2025 18:13:26 +0200 (EET) Received: by mail-wm1-f53.google.com with SMTP id 5b1f17b1804b1-43d0359b1fcso15566775e9.0 for <ffmpeg-devel@ffmpeg.org>; Fri, 14 Mar 2025 09:13:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1741968806; x=1742573606; darn=ffmpeg.org; h=in-reply-to:from:content-language:references:to:subject:user-agent :mime-version:date:message-id:from:to:cc:subject:date:message-id :reply-to; bh=/h6KhOU6JJU5+9ds6FiyS9mnHcrW3qIUBbvOL842YnU=; b=HeL2nGm5tGYZepn5w7Gz3vjus2l/lSo4afKS5AVC9kp6PJoYuTvogJ5uqpTegMg81p DCm+Qf0zUTbWryFxZf6u2Q3XEyxIrVIDhsdf4UaT8OiamuASKwWAiMnTknxNg1gIEOCk OoYuswxwEXlIWxEs8O1uMOQzf83+5r3DNGZcq7+NLqb4D7x5bIM49S1ZI2Mvmai/OFD/ UA38dYYB+a4ZXYE9UlizHA2GN4aXa5vtc+g1PvqbnpJMEUGLdeLzjk4mqYMaIfzQckQJ VERgpGfZytstPdpvz4ROmnyPEShCNzb29WgrFaFQTws4VVzV6Zsz0qzqod4G/V32yQ0u XPEg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741968806; x=1742573606; h=in-reply-to:from:content-language:references:to:subject:user-agent :mime-version:date:message-id:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to; bh=/h6KhOU6JJU5+9ds6FiyS9mnHcrW3qIUBbvOL842YnU=; b=AW0QGeKZaegh4inIQKSscMpBFz7Ki0LwnY+10gGhWq/LCcpBLIYg3BCSeifHhE/Noz 1c7UtOMjsN7RHIscyuoVCwmyZNOLJcSOxzgEHOJwg9HjeHYsIux9DSbb3+Cz9uAwW/4Z jzCZc5cCgieOG25mCQUnFSYTHXZ30dcvJzEx+uBWuJwdaNPRabQUglYldPPrjFmf1Yti Ck4t7oZMOzb9IHDPGZ4/uMsaBG81qllkoMvcTZ/2wX54Tk2LXiw/LKxcmeCahepeDMjI YIbPsDoHNYXqxGxhLECogdC8zHJIuofMFNA9rIeMNjXwHcPc+tstCDqRaZfMIrIoMa4N jJyg== X-Gm-Message-State: AOJu0Yz8qq0LZ1r8+3SYH0a6ZXi/0Hq3fg6qeNT17YvnbpVWYrVStbXI fORwXOxaKOwJKqiv/vmlDVQA6FC7hWueT4Zt7j1/n/S+HRTj4zNhKDbRKRWt7+Q= X-Gm-Gg: ASbGncu0S7UEA4cA0IurKRCR56RsflUtqnqCjK2TwEzOR9IJ4vMlcj/FkoMPZU014K8 7tvwDfvAg0aamceE70ofa6qcT0sep4BY2YYZwSTj7F+QudW17NZulAWBaY3BtW5/pD/xtz44OA6 i6JksySfyAkHiP9R1mlYF9HdmKm0PpGrAKAwMgVl4Tuak59ENEWI04MKcJjDCvZZvg0LDvpsuZy G+jkYwi4FYZN23i+Ga2+Bk+OhOP22NZONo3RxROtAbwMRG+YoTzFECvFqZGtDJuL/opQ7f/qwyS qD2xBUkwznB1pXh1Wb4s8HDWb2cU/1Z1nTszOhBhj8B28JQ11fZSuenj86eoLkD+waOpA7roLl8 W6MAtl3J+lXW9 X-Google-Smtp-Source: AGHT+IHmGeuHTTvggmn6eCql9prpxwP2HyK/FP1aBh5Ef969AEp/WtUCQcGKf8STq07UNuEQHZV2ZQ== X-Received: by 2002:a05:600c:4e4a:b0:43b:c857:e9d7 with SMTP id 5b1f17b1804b1-43d242921acmr6544285e9.5.1741968805351; Fri, 14 Mar 2025 09:13:25 -0700 (PDT) Received: from [192.168.178.23] (i53870FF8.versanet.de. [83.135.15.248]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-43d1ffb627csm21628825e9.5.2025.03.14.09.13.24 for <ffmpeg-devel@ffmpeg.org> (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 14 Mar 2025 09:13:24 -0700 (PDT) Message-ID: <66647849-682a-45d1-8015-e6173a8e51f8@gmail.com> Date: Fri, 14 Mar 2025 17:13:23 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org> References: <6bef7ee3-6e0b-496a-9018-ce02d5e8cd63@gmail.com> <20250314150455.GJ4991@pb2> Content-Language: en-US From: Leandro Santiago <leandrosansilva@gmail.com> In-Reply-To: <20250314150455.GJ4991@pb2> X-Content-Filtered-By: Mailman/MimeDel 2.1.29 Subject: Re: [FFmpeg-devel] [PATCH] avfilter: POC: enable out-of-tree filters X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches <ffmpeg-devel.ffmpeg.org> List-Unsubscribe: <https://ffmpeg.org/mailman/options/ffmpeg-devel>, <mailto:ffmpeg-devel-request@ffmpeg.org?subject=unsubscribe> List-Archive: <https://ffmpeg.org/pipermail/ffmpeg-devel> List-Post: <mailto:ffmpeg-devel@ffmpeg.org> List-Help: <mailto:ffmpeg-devel-request@ffmpeg.org?subject=help> List-Subscribe: <https://ffmpeg.org/mailman/listinfo/ffmpeg-devel>, <mailto:ffmpeg-devel-request@ffmpeg.org?subject=subscribe> Reply-To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org> Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" <ffmpeg-devel-bounces@ffmpeg.org> Archived-At: <https://master.gitmailbox.com/ffmpegdev/66647849-682a-45d1-8015-e6173a8e51f8@gmail.com/> List-Archive: <https://master.gitmailbox.com/ffmpegdev/> List-Post: <mailto:ffmpegdev@gitmailbox.com> On 3/14/25 16:04, Michael Niedermayer wrote: > Hi > > On Thu, Mar 13, 2025 at 01:18:49PM +0100, Leandro Santiago wrote: >> This is a POC/prototype that aims to enable out of tree filters on >> FFmpeg. >> >> Here I name them "extra filters". >> Thinking now, "extra filters" is not a good name. Maybe "external" or "oot" >> It introduces the program `jq` as a new build dependency. > I dont think this dependency is needed to achieve linking to filters > in another directory To make it clear, the "extra filters" are linked in the same way the current filters are: direct as part libavfilter.(so|a). They are not dynamically linked. > i think its worth the few hours extra time to find a clean/nice way to do it > with no new depeandancies I used json as a quick way to define the filter metadata (thus the usage of JQ to query them), but I confess it could have been any other format. I used json to get the proof of concept done :-) Ideally it would be written in a native format to the build system, if something like CMake or Meson was being used. Maybe the metadata could even be in a Makefile or spread over multiple files with no structure. The use of json was for pure convenience. Would you have any format to suggest? Is there anything similar in the codebase I could have a look at? This is an example of metadata file at the moment: { "ldflags":"-ljson-c", "cflags":"-DFOO=234", "check":"require_pkg_config json json-c json-c/json.h json_c_version_num", "symbols":["ff_vf_foo","ff_vf_bar"] } A simpler way to represent it would be put each field in a different pure text file, for instance: symbols.txt: ff_vf_foo ff_vf_bar The most important aspect here is that the filter metadata (symbols, names, flags) need to be in a format easy to parse from the `configure` script. I did some improvements on my patch and I managed to get the filter to pass extra flags on building. Although the use of forgejo is not yet official, I am keeping my changes on it for now, as I still struggle with the email workflow: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/13 The "example" filter can be found at: https://gitlab.com/leandrosansilva/ffmpeg-extra-filter-example/ To use it, simply clone this repo and build ffmpeg with `--extra-filter=/path/to/ffmpeg-extra-filter-example`. > > also there is the quite intriguing option of using "git merge" to include > external filters > What i mean here is that there could be a script lets call it ffmerge How would it work when using release tarballs, without git? > "ffmerge available" would check some online repository and list whats > compatible with the current checkout > > "ffmerge merge shiny_filter" would then merge the shiny filter repository/branch Wouldn't it put more burden over the devs to maintain such catalog/repository and the tooling around it? I am fine with that, I just wonder how the community would accept it. Having no filter catalog/repo feels to be the simplest step one could take at the moment. > > Advanatge would be that this is more powerfull than just linking external > filters. > Disadvantage is that for this to work care needs to be taken that conflicts > do not occur I see that simply keeping the filter outside and linking them at build time put almost no burden on the ffmpeg devs. As, provided there is no promise of a stable API, it's up to the developers of the "extra" filters to make their filters build. > > thx > > [...] > > > _______________________________________________ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > To unsubscribe, visit link above, or email > ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe". _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".