What is the easiest way to edit orientation information in a video container? Name of any app.
My phone videos randomly rotate 90 degrees. I want to remove this information so that the rotation is 0 degrees. This is an edit, and it is possible to edit some other information in the container, I would like to do it without creating a new container. If this is possible.
+ Reply to Thread
Results 1 to 11 of 11
-
-
What is the existing container and what codecs are used by the video/audio?
-
If your videos are rotating on playback there's nothing you can do to fix that,to prevent your phone from rotating shot off auto-rotate in the menu you pull down
I think,therefore i am a hamster. -
Try AVIDemux using this technique. As I note there, not guaranteed to work.
-
This only changes the metadata field. (can be: 90, 180, 270) Some players may not honor the changed metadata, and play the video in it's original display format.
Code:ffmpeg.exe -display_rotation 180 -i "input.mp4" -c copy "output.mp4"
Code:ffmpeg.exe -i "input.mp4" -vf "transpose=0" "output.mp4"
0 = 90° counter-clockwise and vertical flip (default)
1 = 90° clockwise
2 = 90° counter-clockwise
3 = 90° clockwise and vertical flip
The quality may change. better/worse?
This means also, maybe, using a codec.Code:ffmpeg.exe -i "input.mp4" -vf "transpose=0" -c:v libx264 -crf 22 "output.mp4"
Some testing will put you on the right path.
Cheers. -
You can always rotate and reencode. Try something like this:
Code:ffmpeg -i "your source" -vf "rotate='90*PI/180:ow=hypot(iw,ih):oh=ow:fillcolor=yellow',scale=w=-2:h=1080" -c:a copy -c:v libx264 -crf 20 "rotated.mp4"
It rotates to any angle, just for demo or fun, try
Code:ffmpeg -i "your source" -vf "rotate='0.5*PI*t:ow=hypot(iw,ih):oh=ow:fillcolor=yellow',scale=w=-2:h=1080,setsar=sar=1/1" -c:a copy -c:v libx264 -crf 20 "rotated.mp4"
Last edited by Sharc; 13th Jan 2025 at 03:29.
-
I'd like to clarify a few things. The original video in the container has a 90 degree rotation tag. In other words, the resolution does not need to be changed.
I can rotate a video in LosslessCut without encoding. But this creates a new container and overwrites several data in the container. I want to change only the rotation data without changing the other data. -
Use clever FFmpeg-GUI.
Load your mp4, click main page, click various, click rotate.
Set the degrees, click rotate. Done.
Similar Threads
-
Change rotate video metadata
By tony359 in forum Video ConversionReplies: 13Last Post: 3rd Jan 2025, 08:08 -
how do I rotate video with mkvmerge?
By codemaster in forum Video ConversionReplies: 3Last Post: 7th Jun 2024, 06:25 -
Is there a way to rotate the entire canvas?
By mitya in forum Newbie / General discussionsReplies: 1Last Post: 2nd Mar 2024, 16:28 -
How to find if a video is auto-rotated? Show real auto-rotate header field?
By pxstein in forum Newbie / General discussionsReplies: 5Last Post: 27th Jan 2023, 18:52 -
How to rotate VR 360 video with GPU
By SoftwareConductor in forum Video ConversionReplies: 8Last Post: 13th Jan 2023, 11:56