From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id 61B3640AB5 for ; Thu, 3 Feb 2022 17:27:39 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id D871B68B0D8; Thu, 3 Feb 2022 19:27:37 +0200 (EET) Received: from mail-wr1-f47.google.com (mail-wr1-f47.google.com [209.85.221.47]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id E842F68AFBD for ; Thu, 3 Feb 2022 19:27:30 +0200 (EET) Received: by mail-wr1-f47.google.com with SMTP id e8so6495865wrc.0 for ; Thu, 03 Feb 2022 09:27:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=LLAiRV9vg7WF4H6uHOV4Ra/b59DzlY+SnSRB0TJ8wNU=; b=MOL8cZAG9wSo4Do4wZeO/vhEKkB9vXj5H/x3xNhTGTTDoajlvX1LHHdhgNw+oCcq3W H5DNMc/PZUhJgemoY3DywvJCIwkPQyr6uwhs9wbInOqhGSiuasBTrOCO5A9OYOQgie4U 8MW/Ve9jKCDSkIPpTkRDm+JjEObiAzTOP0MOQF2MU/m1r9lFzEBcx9ux9wLNP1v164pQ /Eo93jzsDlT13cGhZhOA7sqNhBmOT1hySDSy9dNnX2rnv6DKE0eELtPAkK6YaWKVZpzA eWnrg/K67kY5pejSksNk6TtwcU8PT6qhZSziQNNl5RcIPSjilZJixFx8+OBPBSuiQdiK E4uA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=LLAiRV9vg7WF4H6uHOV4Ra/b59DzlY+SnSRB0TJ8wNU=; b=SN5Bo+PCsnZ5V0LNkP/j+9xRfnhlOTQtESql5/63O3gMHTa0w+LVUhs9dgTHJW9Ohd M41rfI1G/Bgsc4qFGaA7HxLrhfoWAoipCwJmQB/P4IWdbXUWswGEBnhZeP2gP59pdfWR lEiiFk/U9BY+j3IXnYGbScCdLEWAegHbQCh6KpCbfUUEnvw5C2xbYOZ/Sr9H2s4aeXJe xjNrwrYyq40UI4hv85otOIPCcdF4SiKyflCJoxUqZUStD9m6w/686J/0yI1sFCL5ACW1 Qp4rK0xy2bG+jlWUtoO2ndYhe9BFoK1FeZKjog3+xCkCYf6LwlGPDDoCN7KMzJQlDBci UiQg== X-Gm-Message-State: AOAM531XiGxuAKkq9Fmp1nyyCctTSttRQ91nGyPhaJOnYFGaZLu3lfuP FBDAfGMSM5oq8wOU11OO3tD1OxObi5jIcPgwYdt9vGofwpA= X-Google-Smtp-Source: ABdhPJyAKzaM0upo8oSf1pbCl6yZbnxFLOfXtydnXzOArJTy4ppVOY8BcFrsCCPS6f6cK0f4iywrgdbFO2IzCNo2++c= X-Received: by 2002:adf:fb0f:: with SMTP id c15mr31103529wrr.42.1643909250046; Thu, 03 Feb 2022 09:27:30 -0800 (PST) MIME-Version: 1.0 References: <20220203172507.21121-1-markg85@gmail.com> In-Reply-To: <20220203172507.21121-1-markg85@gmail.com> From: Mark Gaiser Date: Thu, 3 Feb 2022 18:26:09 +0100 Message-ID: To: FFmpeg development discussions and patches X-Content-Filtered-By: Mailman/MimeDel 2.1.29 Subject: Re: [FFmpeg-devel] [PATCH v2 0/1] Add IPFS protocol support. X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: Ignore this one, the title went wrong. On Thu, Feb 3, 2022 at 6:26 PM Mark Gaiser wrote: > Hi, > > This patch series adds support for IPFS. > V3: > - A lot of style changes > - Made url checks a lot more strict > - av_asprintf leak fixes > - So many changes that a diff to v2 is again not sensible. > V2: > - Squashed and changed so much that a diff to v1 was not sensible. > > The following is a short summary. In the IPFS ecosystem you access it's > content > by a "Content IDentifier" (CID). This CID is, in simplified terms, a hash > of > the content. IPFS itself is a distributed network where any user can run a > node > to be part of the network and access files by their CID. If any reachable > node > within that network has the CID, you can get it. > > IPFS (as a technology) has two protocols, ipfs and ipns. > The ipfs protocol is the immutable way to access content. > The ipns protocol is a mutable layer on top of it. It's essentially a new > CID > that points to a ipfs CID. This "pointer" if you will can be changed to > point > to something else. > Much more information on how this technology works can be found here [1]. > > This patch series allows to interact natively with IPFS. That means being > able > to access files like: > - ffplay ipfs:// > - ffplay ipns:// > > There are multiple ways to access files on the IPFS network. This patch > series > uses the gateway driven way. An IPFS node - by default - exposes a local > gateway (say http://localhost:8080) which is then used to get content > from IPFS. > The gateway functionality on the IPFS side contains optimizations to > be as ideal to streaming data as it can be. Optimizations that the http > protocol > in ffmpeg also has and are thus reused for free in this approach. > > A note on other "more appropiate" ways, as I received some feedback on > that. > For ffmpeg purposes the gateway approach is ideal! There is a "libipfs" but > that would spin up an ipfs node with the overhead of: > - bootstrapping > - connecting to nodes > - finding other nodes to connect too > - finally finding your file > > This alternative approach could take minutes before a file is played. The > gateway approach immediately connects to an already running node thus gives > the file the fastest. > > Much of the logic in this patch series is to find that gateway and > essentially > rewrite: > > "ipfs://" > > to: > > "http://localhost:8080/ipfs/" > > Once that's found it's forwared to the protocol handler where eventually > the > http protocol is going to handle it. Note that it could also be https. > There's > enough flexibility in the implementation to allow the user to provide a > gateway. There are also public https gateways which can be used just as > well. > > After this patch is accepted, I'll work on getting IPFS supported in: > - mpv (requires this ffmpeg patch) > - vlc (prefers this patch but can be made to work without this patch) > - kodi (requires this ffmpeg patch) > > Best regards, > Mark Gaiser > > [1] https://docs.ipfs.io/concepts/ > > Mark Gaiser (1): > avformat: Add IPFS protocol support. > > configure | 2 + > doc/protocols.texi | 30 ++++ > libavformat/Makefile | 2 + > libavformat/ipfsgateway.c | 329 ++++++++++++++++++++++++++++++++++++++ > libavformat/protocols.c | 2 + > 5 files changed, 365 insertions(+) > create mode 100644 libavformat/ipfsgateway.c > > -- > 2.35.1 > > _______________________________________________ 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".