Opened 5 months ago

Closed 5 months ago

#10684 closed defect (worksforme)

FFmpeg metadata rotate doesn't work since after v2023-05-04-git

Reported by: Melvin Nava Owned by:
Priority: normal Component: undetermined
Version: git-master Keywords:
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description (last modified by Melvin Nava)

Summary of the bug:

FFmpeg is no longer able to rotate videos by modifying metadata since after version 2023-05-04-git. That's the last version where that feature worked. I've tried almost every FFmpeg version since that time, without success.

This seems to happen with any input video, so I don't think a sample is required.

How to reproduce:

ffmpeg version

% ffmpeg -i "source_video.mp4" -c copy -metadata:s:v:0 rotate=90 "destination_video.mp4"
% ffmpeg -i "source_video.mp4" -c copy -metadata:s:v:0 rotate=270 "destination_video.mp4"

I'd appreciate any comments on this..

Change History (4)

comment:1 by Melvin Nava, 5 months ago

Description: modified (diff)

comment:2 by v0lt, 5 months ago

Use the "-display rotation" command.
Description can be found here ->

in reply to:  2 comment:3 by Melvin Nava, 5 months ago

Replying to v0lt:

Use the "-display rotation" command.
Description can be found here ->

I tried it, but got this error at first:

ffmpeg -i "video.mp4" -c copy -display_rotation 270 "video_rotateR.mp4"

Option display_rotation (set pure counter-clockwise rotation in degrees for stream(s)) cannot be applied to output url D:\video_rL.mp4
 -- you are trying to apply an input option to an output file or vice versa. Move this option before the file it belongs to.
Error parsing options for output file D:\video_rL.mp4.
Error opening output files: Invalid argument

So I modified the command accordingly, and it now works:

# Rotate video right
ffmpeg -display_rotation 270 -i "video.mp4" -c copy "video_rotateR.mp4"

# Rotate video left
ffmpeg -display_rotation 90 -i "video.mp4" -c copy "video_rotateL.mp4"

Thank you.. I'm closing this ticket!.

comment:4 by Melvin Nava, 5 months ago

Resolution: worksforme
Status: newclosed
Note: See TracTickets for help on using tickets.