Rotate a video without reencoding it

Bug report and feature request
Post Reply
Gonimo
Beginner
Beginner
Posts: 2
Joined: Fri Mar 29, 2019 2:17 am

Rotate a video without reencoding it

Post by Gonimo » Wed Apr 03, 2019 1:34 pm

Hi
In MediaCoder, it is possible to change the ratio of a video without re-encoding it.
There is also a function to rotate a video, but not without re-encoding it. :cry:
However, many phones and other programs include this feature.

With MediaInfo installed on its system (Included in K-Lite Codec Pack), we then see the "Rotation" line among the various information of the video.

Image

This allows you to rotate a video quickly and without loss of quality.
It is a shame to have to use another program to access this feature.
Could not we include it in a future version of MediaCoder?

flagpole
Modest
Modest
Posts: 259
Joined: Tue Jan 26, 2010 10:12 pm
Contact:

Re: Rotate a video without reencoding it

Post by flagpole » Mon Jul 15, 2019 7:23 pm

mediacoder is a transcoder, that's why it exists. What your after is a metadata editor.
my quant puzzles http://puzzles.nigelcoldwell.co.uk go look :)

Gonimo
Beginner
Beginner
Posts: 2
Joined: Fri Mar 29, 2019 2:17 am

Re: Rotate a video without reencoding it

Post by Gonimo » Tue Jul 16, 2019 12:10 am

flagpole wrote:
Mon Jul 15, 2019 7:23 pm
mediacoder is a transcoder, that's why it exists. What your after is a metadata editor.
Although this kind of rotation is visible in MediaInfo, it does not make the change.
For example, to run a rotation with an MP4 file without re-encoding:

1. Open your MP4 file with HxD (or another Hexadecimal editor).
2. Find values for a non-rotating video:
000100000000000000000000000000000001000000000000000000000000000040

3. The value is present several times in the file.
Find and replace only the second and third times with one of the following values:

180°
FFFF0000000000000000000000000000FFFF000000000000000000000000000040

90° Clockwise
000000000001000000000000FFFF00000000000000000000000000000000000040

90° Counter clockwise
00000000FFFF000000000000000100000000000000000000000000000000000040

4. Save the changes to your file or create in a new one not forgetting its extension (.mp4).

Post Reply