Skip to content

fftools/ffprobe: Add YAML output writer #55

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

softworkz
Copy link
Collaborator

@softworkz softworkz commented Feb 19, 2025

fftools/ffprobe: Add YAML output writer

Motivation

While YAML might not be the greatest format as such, its strengths are in human readability, probably better than any other format we have currently, which makes it worthwhile to add afaic.

@softworkz
Copy link
Collaborator Author

/submit

Copy link

Submitted as [email protected]

To fetch this version into FETCH_HEAD:

git fetch https://github.com/ffstaging/FFmpeg pr-ffstaging-55/softworkz/submit_yaml-v1

To fetch this version to local tag pr-ffstaging-55/softworkz/submit_yaml-v1:

git fetch --no-tags https://github.com/ffstaging/FFmpeg tag pr-ffstaging-55/softworkz/submit_yaml-v1

@@ -1980,6 +1980,150 @@ static Writer xml_writer = {
.priv_class = &xml_class,
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On the FFmpeg mailing list, Stefano Sabatini wrote (reply to this):

On date Wednesday 2025-02-19 20:07:55 +0000, softworkz wrote:
> From: softworkz <[email protected]>
> 
> Signed-off-by: softworkz <[email protected]>
> ---
>  fftools/ffprobe.c | 147 +++++++++++++++++++++++++++++++++++++++++++++-
>  1 file changed, 146 insertions(+), 1 deletion(-)

Should this be postponed to the ffprobe.c formats refactoring?

Also missing entry in the changelog.

[...]

Looks good to me otherwise, thanks.
_______________________________________________
ffmpeg-devel mailing list
[email protected]
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
[email protected] with subject "unsubscribe".

@@ -626,6 +626,22 @@ This option automatically sets @option{fully_qualified} to 1.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On the FFmpeg mailing list, Stefano Sabatini wrote (reply to this):

On date Wednesday 2025-02-19 20:07:56 +0000, softworkz wrote:
> From: softworkz <[email protected]>
> 
> Signed-off-by: softworkz <[email protected]>
> ---
>  doc/ffprobe.texi | 16 ++++++++++++++++
>  1 file changed, 16 insertions(+)
> 
> diff --git a/doc/ffprobe.texi b/doc/ffprobe.texi
> index ceedc8793b..106d865e18 100644
> --- a/doc/ffprobe.texi
> +++ b/doc/ffprobe.texi
> @@ -626,6 +626,22 @@ This option automatically sets @option{fully_qualified} to 1.
>  
>  For more information about the XML format, see
>  @url{https://www.w3.org/XML/}.
> +
> +@section yaml
> +YAML based format.
> +
> +Each section is printed using YAML notation.
> +
> +The description of the accepted options follows.
> +
> +@table @option
> +
> +@item blank_lines
> +If set to 1, blank lines are inserted between sections for
> +better readability. Default value is 1.
> +@end table
> +
> +For more information about YAML, see @url{https://yaml.org/}.

I'd move this note before the options description.

LGTM otherwise.
_______________________________________________
ffmpeg-devel mailing list
[email protected]
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
[email protected] with subject "unsubscribe".

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On the FFmpeg mailing list, Soft Works wrote (reply to this):



> -----Original Message-----
> From: Stefano Sabatini <[email protected]>
> Sent: Samstag, 8. M�rz 2025 16:06
> To: FFmpeg development discussions and patches <[email protected]>
> Cc: softworkz <[email protected]>
> Subject: Re: [FFmpeg-devel] [PATCH 2/2] docs: Add documentation about
> YAML output writer
> 
> On date Wednesday 2025-02-19 20:07:56 +0000, softworkz wrote:
> > From: softworkz <[email protected]>
> >
> > Signed-off-by: softworkz <[email protected]>
> > ---
> >  doc/ffprobe.texi | 16 ++++++++++++++++
> >  1 file changed, 16 insertions(+)
> >
> > diff --git a/doc/ffprobe.texi b/doc/ffprobe.texi
> > index ceedc8793b..106d865e18 100644
> > --- a/doc/ffprobe.texi
> > +++ b/doc/ffprobe.texi
> > @@ -626,6 +626,22 @@ This option automatically sets
> @option{fully_qualified} to 1.
> >
> >  For more information about the XML format, see
> >  @url{https://www.w3.org/XML/}.
> > +
> > +@section yaml
> > +YAML based format.
> > +
> > +Each section is printed using YAML notation.
> > +
> > +The description of the accepted options follows.
> > +
> > +@table @option
> > +
> > +@item blank_lines
> > +If set to 1, blank lines are inserted between sections for
> > +better readability. Default value is 1.
> > +@end table
> > +
> > +For more information about YAML, see @url{https://yaml.org/}.
> 
> I'd move this note before the options description.
> 
> LGTM otherwise.

Thanks, I'll submit this in the new context after the it has been merged.
I left this one out to make it not too heavyweight.

sw

_______________________________________________
ffmpeg-devel mailing list
[email protected]
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
[email protected] with subject "unsubscribe".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant