Re: [FFmpeg-devel] [PATCH 5/8] lavu: add a JSON writer API (WIP)

2023-05-01 Thread Jean-Baptiste Kempf
On Mon, 1 May 2023, at 08:57, Leo Izen wrote: > On 4/29/23 14:33, Nicolas George wrote: >> Anton Khirnov (12023-04-29): >>> libavfilter is a C library with a C API. Any structured output from >>> filters should be in the form of a C object, typically a struct. I do >>> not see why are you so in

Re: [FFmpeg-devel] [PATCH 5/8] lavu: add a JSON writer API (WIP)

2023-05-01 Thread Nicolas George
Leo Izen (12023-05-01): > > Yes, strings are a terrible API, but our project is not only a set of > > libraries, it is also a set of command-line tools, and command-line > > tools work with strings and nothing else. > This is a good argument for putting the code in fftools/ and not libavutil, >

Re: [FFmpeg-devel] [PATCH 5/8] lavu: add a JSON writer API (WIP)

2023-05-01 Thread Nicolas George
Michael Niedermayer (12023-04-30): > There are many projects which use libavcodec, format, filter > Human users use these projects > > If the standarization is at a C struct level only then the human interface > for each application can be different. > Thats fine if the 2 cases use fundamentally

Re: [FFmpeg-devel] [PATCH 5/8] lavu: add a JSON writer API (WIP)

2023-05-01 Thread Leo Izen
On 4/29/23 14:33, Nicolas George wrote: Anton Khirnov (12023-04-29): libavfilter is a C library with a C API. Any structured output from filters should be in the form of a C object, typically a struct. I do not see why are you so in love with strings, they make for terrible APIs. Yes,

Re: [FFmpeg-devel] [PATCH 5/8] lavu: add a JSON writer API (WIP)

2023-05-01 Thread Vittorio Giovara
On Sat, Apr 29, 2023 at 8:29 PM Kieran Kunhya wrote: > On Sat, 29 Apr 2023 at 05:07, Derek Buitenhuis > > wrote: > > > On 4/29/2023 10:41 AM, Anton Khirnov wrote: > > > ffprobe: > > > * is not one of the libraries, but rather their caller > > > * we are not in business of providing random

Re: [FFmpeg-devel] [PATCH 5/8] lavu: add a JSON writer API (WIP)

2023-04-30 Thread Kieran Kunhya
> There are many projects which use libavcodec, format, filter > Human users use these projects > > If the standarization is at a C struct level only then the human interface > for each application can be different. > Thats fine if the 2 cases use fundamentally different interfaces like a > GUI

Re: [FFmpeg-devel] [PATCH 5/8] lavu: add a JSON writer API (WIP)

2023-04-30 Thread Michael Niedermayer
On Sat, Apr 29, 2023 at 08:27:32PM +0200, Anton Khirnov wrote: > Quoting Nicolas George (2023-04-29 19:11:52) > > Anton Khirnov (2023-04-29): > > > As far as I can see, there are exactly two places in the codebase that > > > produce JSON: af_loudnorm and ffprobe. > > > > I think I remember

Re: [FFmpeg-devel] [PATCH 5/8] lavu: add a JSON writer API (WIP)

2023-04-29 Thread Kieran Kunhya
On Sat, 29 Apr 2023 at 05:07, Derek Buitenhuis wrote: > On 4/29/2023 10:41 AM, Anton Khirnov wrote: > > ffprobe: > > * is not one of the libraries, but rather their caller > > * we are not in business of providing random non-multimedia-related > > services to callers, unless they are useful in

Re: [FFmpeg-devel] [PATCH 5/8] lavu: add a JSON writer API (WIP)

2023-04-29 Thread Nicolas George
Anton Khirnov (12023-04-29): > libavfilter is a C library with a C API. Any structured output from > filters should be in the form of a C object, typically a struct. I do > not see why are you so in love with strings, they make for terrible > APIs. Yes, strings are a terrible API, but our project

Re: [FFmpeg-devel] [PATCH 5/8] lavu: add a JSON writer API (WIP)

2023-04-29 Thread Anton Khirnov
Quoting Nicolas George (2023-04-29 19:11:52) > Anton Khirnov (2023-04-29): > > As far as I can see, there are exactly two places in the codebase that > > produce JSON: af_loudnorm and ffprobe. > > I think I remember finding a few other places, but it does not matter > much. > > Users have been

Re: [FFmpeg-devel] [PATCH 5/8] lavu: add a JSON writer API (WIP)

2023-04-29 Thread Nicolas George
James Almer (12023-04-29): > It should be exporting frame metadata Not really. Exporting information to frame data is a hack, “this looks pointy, we have a hammer, let's nail it”. It only works if the data is very flat. It does not work for data that comes at the end of the stream. It still

Re: [FFmpeg-devel] [PATCH 5/8] lavu: add a JSON writer API (WIP)

2023-04-29 Thread Nicolas George
Anton Khirnov (12023-04-29): > As far as I can see, there are exactly two places in the codebase that > produce JSON: af_loudnorm and ffprobe. I think I remember finding a few other places, but it does not matter much. Users have been asking¹ for parse-friendly output from filters for years, and

Re: [FFmpeg-devel] [PATCH 5/8] lavu: add a JSON writer API (WIP)

2023-04-29 Thread Derek Buitenhuis
On 4/29/2023 10:41 AM, Anton Khirnov wrote: > ffprobe: > * is not one of the libraries, but rather their caller > * we are not in business of providing random non-multimedia-related > services to callers, unless they are useful in our libraries; > if this code is only useful in ffprobe then it

Re: [FFmpeg-devel] [PATCH 5/8] lavu: add a JSON writer API (WIP)

2023-04-29 Thread James Almer
On 4/29/2023 6:41 AM, Anton Khirnov wrote: Quoting Nicolas George (2023-04-29 11:11:59) Nicolas George (12023-04-28): Signed-off-by: Nicolas George --- libavutil/Makefile | 1 + libavutil/json.c | 368 +++ libavutil/json.h | 470

Re: [FFmpeg-devel] [PATCH 5/8] lavu: add a JSON writer API (WIP)

2023-04-29 Thread Anton Khirnov
Quoting Nicolas George (2023-04-29 11:11:59) > Nicolas George (12023-04-28): > > Signed-off-by: Nicolas George > > --- > > libavutil/Makefile | 1 + > > libavutil/json.c | 368 +++ > > libavutil/json.h | 470 + > >

Re: [FFmpeg-devel] [PATCH 5/8] lavu: add a JSON writer API (WIP)

2023-04-29 Thread Nicolas George
Nicolas George (12023-04-28): > Signed-off-by: Nicolas George > --- > libavutil/Makefile | 1 + > libavutil/json.c | 368 +++ > libavutil/json.h | 470 + > 3 files changed, 839 insertions(+) > create mode 100644

[FFmpeg-devel] [PATCH 5/8] lavu: add a JSON writer API (WIP)

2023-04-28 Thread Nicolas George
Signed-off-by: Nicolas George --- libavutil/Makefile | 1 + libavutil/json.c | 368 +++ libavutil/json.h | 470 + 3 files changed, 839 insertions(+) create mode 100644 libavutil/json.c create mode 100644