From: Gyan Doshi <ffmpeg@gyani.pro>
To: ffmpeg-devel@ffmpeg.org
Subject: Re: [FFmpeg-devel] [PATCH] ffmpeg: set user-set rotation for encoded streams too
Date: Sun, 15 May 2022 17:28:33 +0530
Message-ID: <a92114f4-c57d-a177-afe4-ab3ebd797c4b@gyani.pro> (raw)
In-Reply-To: <CAEu79SZNQwy9BNBQXULVDe-rk57N4GgBW0_-2FnpcMyQJpxYbQ@mail.gmail.com>
On 2022-05-15 04:29 pm, Jan Ekström wrote:
> On Thu, May 12, 2022 at 11:19 AM Anton Khirnov <anton@khirnov.net> wrote:
>> Quoting Gyan Doshi (2022-05-12 09:01:31)
>>> A substitute option for metadata rotate would accept a single rotation
>>> value.
>>> If adding an option for matrix, we should allow flips too.
>> I see no reason not to have both. You can have a simple option for just
>> the rotation and an advanced option for specifying full matrix.
>>
> FYI I had thought about arguments-to-side data earlier, and as I saw
> this thread I decided to make a proof-of-concept that has one layer
> which constructs an AVBufferRef of the side data itself based on an
> AVDictionary (constructor, basically), and then another which then
> goes over type-arguments sort of dictionary and attaches things (to an
> AVFrame in this case). AVPacket and AVFrame side data is slightly
> different, so I guess you'd have to split one layer which generates an
> AVBufferRef, and then that'd be utilized (discarded or not) by the
> utilizing function.
>
> I do wonder if AVOptions wouldn't be better for something like this,
> but at least it lets you play around with the idea. My initial API
> user ended up being the setparams filter.
>
> Link to PoC branch:
> https://github.com/jeeb/ffmpeg/commits/arguments_to_side_data
>
> Usage example:
> ffmpeg -v verbose -i INPUT -map 0:v:0 -vf
> setparams=side_data=displaymatrix=angle=34.34,showinfo -vframes 1 -f
> null -
The metadata hack uses avutil/display API to set the matrix and then
attach it to the *stream* as side data A filter will force encoding.
Since this is usability/display info for the consumer , it should remain
available for streamcopy.
Regards,
Gyan
_______________________________________________
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-05-15 11:58 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-10 11:40 Gyan Doshi
2022-05-11 11:56 ` Anton Khirnov
2022-05-11 12:18 ` Gyan Doshi
2022-05-11 18:49 ` Anton Khirnov
2022-05-11 19:15 ` Gyan Doshi
2022-05-12 5:25 ` Anton Khirnov
2022-05-12 7:01 ` Gyan Doshi
2022-05-12 8:19 ` Anton Khirnov
2022-05-15 10:59 ` Jan Ekström
2022-05-15 11:58 ` Gyan Doshi [this message]
2022-05-15 12:21 ` Jan Ekström
2022-05-17 12:16 ` Jan Ekström
2022-05-11 16:30 ` Gyan Doshi
2022-05-11 18:44 ` Anton Khirnov
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=a92114f4-c57d-a177-afe4-ab3ebd797c4b@gyani.pro \
--to=ffmpeg@gyani.pro \
--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