From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id CE9E4429E4 for ; Wed, 11 May 2022 16:31:06 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id C92DB68B3D2; Wed, 11 May 2022 19:31:03 +0300 (EEST) Received: from mout-p-102.mailbox.org (mout-p-102.mailbox.org [80.241.56.152]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 10E3768ABA7 for ; Wed, 11 May 2022 19:30:57 +0300 (EEST) Received: from smtp102.mailbox.org (smtp102.mailbox.org [10.196.197.102]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-102.mailbox.org (Postfix) with ESMTPS id 4Kz0lC3VWqz9svR for ; Wed, 11 May 2022 18:30:47 +0200 (CEST) Message-ID: <5aa5260c-bea2-7c80-1ea1-95092e49181e@gyani.pro> Date: Wed, 11 May 2022 22:00:41 +0530 MIME-Version: 1.0 Content-Language: en-US To: ffmpeg-devel@ffmpeg.org References: <20220510114054.1745-1-ffmpeg@gyani.pro> From: Gyan Doshi In-Reply-To: <20220510114054.1745-1-ffmpeg@gyani.pro> Subject: Re: [FFmpeg-devel] [PATCH] ffmpeg: set user-set rotation for encoded streams too X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: On 2022-05-10 05:10 pm, Gyan Doshi wrote: > So far, -metadata:s:v rotate would only be applied to streamcopied > video streams. Plan to push tomorrow. Gyan > --- > fftools/ffmpeg.c | 7 +++++++ > 1 file changed, 7 insertions(+) > > diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c > index a85ed18b08..7c1db2162a 100644 > --- a/fftools/ffmpeg.c > +++ b/fftools/ffmpeg.c > @@ -3048,6 +3048,13 @@ static int init_output_stream_encode(OutputStream *ost, AVFrame *frame) > av_reduce(&ost->frame_rate.num, &ost->frame_rate.den, > ost->frame_rate.num, ost->frame_rate.den, 65535); > } > + > + if (ost->rotate_overridden) { > + uint8_t *sd = av_stream_new_side_data(ost->st, AV_PKT_DATA_DISPLAYMATRIX, > + sizeof(int32_t) * 9); > + if (sd) > + av_display_rotation_set((int32_t *)sd, -ost->rotate_override_value); > + } > } > > switch (enc_ctx->codec_type) { _______________________________________________ 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".