From: "Thilo Borgmann" <thilo.borgmann@mail.de>
To: "FFmpeg development discussions and patches" <ffmpeg-devel@ffmpeg.org>
Subject: Re: [FFmpeg-devel] [PATCH v2 2/4] ffmpeg: Add display_matrix option
Date: Sat, 20 Aug 2022 15:32:36 +0200
Message-ID: <B9C9AC8A-DFCE-44FB-A445-35B36DFC0FE6@mail.de> (raw)
In-Reply-To: <adedf4f1-c712-290d-7940-a5c80839c0d8@gyani.pro>
On 18 Aug 2022, at 12:58, Gyan Doshi wrote:
> On 2022-08-17 05:55 pm, Anton Khirnov wrote:
>> Quoting Gyan Doshi (2022-08-17 12:53:11)
>>>
>>> On 2022-08-17 02:35 pm, Anton Khirnov wrote:
>>>> Quoting Gyan Doshi (2022-08-17 10:50:43)
>>>>> On 2022-08-17 01:48 pm, Anton Khirnov wrote:
>>>>>> Quoting Thilo Borgmann (2022-08-16 20:48:57)
>>>>>>> Am 16.08.22 um 16:10 schrieb Anton Khirnov:
>>>>>>>> Quoting Thilo Borgmann (2022-08-15 22:02:09)
>>>>>>>>> $subject
>>>>>>>>>
>>>>>>>>> -Thilo
>>>>>>>>> From fe2ff114cb004f897c7774753d9cf28298eba82d Mon Sep 17
>>>>>>>>> 00:00:00 2001
>>>>>>>>> From: =?UTF-8?q?Jan=20Ekstr=C3=B6m?= <jeebjp@gmail.com>
>>>>>>>>> Date: Mon, 15 Aug 2022 21:09:27 +0200
>>>>>>>>> Subject: [PATCH v2 2/4] ffmpeg: Add display_matrix option
>>>>>>>>>
>>>>>>>>> This enables overriding the rotation as well as
>>>>>>>>> horizontal/vertical
>>>>>>>>> flip state of a specific video stream on the input side.
>>>>>>>>>
>>>>>>>>> Additionally, switch the singular test that was utilizing the
>>>>>>>>> rotation
>>>>>>>>> metadata to instead override the input display rotation, thus
>>>>>>>>> leading
>>>>>>>>> to the same result.
>>>>>>>>> ---
>>>>>>>> I still don't see how it's better to squash multiple options
>>>>>>>> into a
>>>>>>>> single option.
>>>>>>>>
>>>>>>>> It requires all this extra infrastructure and in the end it's
>>>>>>>> less
>>>>>>>> user-friendly, because user-understandable things like rotation
>>>>>>>> or flips
>>>>>>>> are now hidden under "display matrix". How many users would
>>>>>>>> know what a
>>>>>>>> display matrix is?
>>>>>>> FWIW I think Gyan's request to do this all in one option that
>>>>>>> effect one thing (the display matrix) is valid.
>>>>>> I don't.
>>>>>>
>>>>>> It may be one thing internally, but modeling user interfaces
>>>>>> based on
>>>>>> internal representation is a sinful malpractice. More
>>>>>> importantly, I see
>>>>>> no advantage from doing it - it only makes the option parsing
>>>>>> more
>>>>>> complicated.
>>>>> It's not based on ffmpeg's 'internal representation'. All
>>>>> transform
>>>>> attributes are stored as a composite in one mathematical object.
>>>> Keyword "stored". It is internal representation. Users should not
>>>> care
>>>> how it is stored, the entire point point of our project is to
>>>> shield
>>>> them from that as much as possible.
>>>>
>>>>> Evaluating the matrix values will need to look at all sources of
>>>>> contribution. So gathering and presenting all these attributes in
>>>>> a single
>>>>> option (+ docs) makes it clearer to the user at the cost of an
>>>>> initial
>>>>> learning curve.
>>>> Are you seriously expecting all users who want to mark a video as
>>>> rotated or flipped to learn about display matrices?
>>> They don't need to know how to encode or decode the matrix if they
>>> don't
>>> want to. Only that it is the container.
>>>
>>> The difference is between
>>>
>>> -rotate:v:0 90 -hflip:v:0 1 -scale:v:0 2
>>>
>>> and
>>>
>>> -display_matrix:v:0 rotate=90:hflip=1:scale=2
>>>
>>> The latter syntax is all too familiar to users from AVFrame filters
>>> and
>>> BSFs.
>> The syntax similarity is misleading - filters are applied in the
>> order
>> you list them, while these options are always applied in fixed order.
>> The analogous filters are also called rotate, [vf]flip, and scale -
>> there is no display_matrix filter.
>
> The display matrix is effected as a single matrix multiplication to
> obtain output pixel co-ordinates which incorporates all the
> encoded transforms so it is analogous to multiple options within a
> filter like eq or hue, not multiple filters.
>
> About SEI messaging, the h264 metadata BSF still obtains (and
> extracts) those attributes as a display matrix as that is the internal
> messaging format regardless of ultimate storage form.
Thanks for all your comments! Unfortunately, I don’t see real
consensus emerging here.
I see a single option finds more acceptance (3:1),
I see using to use AVDict is frowned upon by 1, though the alternative
suggestion with a parser for SVG-style (new syntax) is not backup up by
s.o. else.
Therefore my interpretation would be to go with majority and stick with
one option and stick with AVDict.
However, I don’t want to shortcut the discussion or override s.o.
opinion. Going to pick this up next week and if no more arguments
emerge, I’ll continue with that.
Thanks,
Thilo
_______________________________________________
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".
next prev parent reply other threads:[~2022-08-20 13:32 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-15 19:58 [FFmpeg-devel] [PATCH v2 1/4] fftools: Add support for dictionary options Thilo Borgmann
2022-08-15 20:02 ` [FFmpeg-devel] [PATCH v2 2/4] ffmpeg: Add display_matrix option Thilo Borgmann
2022-08-16 4:03 ` Gyan Doshi
2022-08-16 14:10 ` Anton Khirnov
2022-08-16 18:48 ` Thilo Borgmann
2022-08-17 8:18 ` Anton Khirnov
2022-08-17 8:50 ` Gyan Doshi
2022-08-17 8:59 ` Nicolas George
2022-08-17 9:05 ` Anton Khirnov
2022-08-17 10:53 ` Gyan Doshi
2022-08-17 12:25 ` Anton Khirnov
2022-08-18 10:58 ` Gyan Doshi
2022-08-20 13:32 ` Thilo Borgmann [this message]
2022-08-20 13:39 ` Nicolas George
2022-08-20 13:48 ` Thilo Borgmann
2022-08-22 12:30 ` Nicolas George
2022-09-07 16:05 ` Thilo Borgmann
2022-08-18 7:11 ` Anton Khirnov
2022-08-17 6:26 ` Marton Balint
2022-08-15 20:02 ` [FFmpeg-devel] [PATCH v2 3/4] ffmpeg: Deprecate display rotation override with a metadata key Thilo Borgmann
2022-08-15 20:02 ` [FFmpeg-devel] [PATCH v2 4/4] ffmpeg: Allow printing of option arguments in help output Thilo Borgmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=B9C9AC8A-DFCE-44FB-A445-35B36DFC0FE6@mail.de \
--to=thilo.borgmann@mail.de \
--cc=ffmpeg-devel@ffmpeg.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
This inbox may be cloned and mirrored by anyone:
git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
ffmpegdev@gitmailbox.com
public-inbox-index ffmpegdev
Example config snippet for mirrors.
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git