Skip to content

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.

Signed-off-by: softworkz <softworkz@hotmail.com>
Signed-off-by: softworkz <softworkz@hotmail.com>
@softworkz
Copy link
Collaborator Author

/submit

@ffmpeg-codebot
Copy link

Submitted as pull.55.ffstaging.FFmpeg.1739995676.ffmpegagent@gmail.com

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

.print_integer = xml_print_int,
.print_string = xml_print_str,
.flags = WRITER_FLAG_PUT_PACKETS_AND_FRAMES_IN_SAME_CHAPTER,
.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 <softworkz@hotmail.com>
> 
> Signed-off-by: softworkz <softworkz@hotmail.com>
> ---
>  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
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".

compliant. Default value is 0.
This option automatically sets @option{fully_qualified} to 1.
@end table

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 <softworkz@hotmail.com>
> 
> Signed-off-by: softworkz <softworkz@hotmail.com>
> ---
>  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
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".

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 <stefasab@gmail.com>
> Sent: Samstag, 8. M�rz 2025 16:06
> To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
> Cc: softworkz <softworkz@hotmail.com>
> 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 <softworkz@hotmail.com>
> >
> > Signed-off-by: softworkz <softworkz@hotmail.com>
> > ---
> >  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
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".

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