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-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to