I am doing a little project that uses footage from my phone. (Samsung K Zoom) As such, some of the footage has the 90 degree rotation flag set. When playing them in DigiKam, the video is rotated so that the proper way is up. Playing the same clip in Kdenlive the video is not rotated, where it used to be. When a proxy is made, the proxy is rotated, but the aspect ratio is completely wrong, ie it's now 9:16 instead of 16:9... sqaused vertically and stretched horizontally. When rendering a test, the output is not rotated at all. I have mlt installed from the system packages, but also tried with mlt from git, and it's both the same. libexif is installed. kdenlive itself is installed from git. Reproducible: Always
Some more info on this footage. melt footage.mpg plays the video, with no rotation, ie: the way it was recorded vlc footage.mpg plays it rotated, ie: honors the rotation flag The main problem here is that the proxy generator (ffmpeg) honors the rotation flag, while the rest of kdenlive, using mlt, does not. I have not noticed this issue before, as I used to edit without proxy clips on much more powerful hardware. :D I am able to manually strip out the rotation flag in the original footage with ffmpeg and -metadata:s:v rotate="0" But manually stripping out the rotation flag is a pain. So, I tried to just put the same command argument into the proxy clip generator command line, but for some reason, it looks like kdenlive is messing with the command line being passed to the proxy clip generator. It does not pass this command to ffmpeg when I add it to the proxy clip generator. I am also noticing something else now.... When I used to rotate these clips manually before, I was able to hit "fit to width" and it would scale the clip so that the width fitted, or scale height so that the entire thing fitted. It does not do that anymore, basically.... it does not look like the rotate filters (I tried all of them) does not modify the width/height parameters of the video clip. Wait, let me upload a small clip with the rotation flag set, and you can play with it yourself.
Created attachment 97780 [details] video clip with the flag set This is a video with the flag set... kind of difficult getting a video small enough to go under the 4mb file limit...
This is a pretty annoying bug for anyone that has to use proxies and rotated video at the same time.
I had a quick look, and the best workaround until MLT supports auto rotate would be to disable rotation for proxy clips. This can be done using a "-noautorotate" option when creating proxy, but needs to be passed before source clip so requires a small change to make it work in Kdenlive.. will look at it later.
Git commit 746bec07589c0503821be0b47fd6e6e245e29dac by Jean-Baptiste Mardelle. Committed on 20/03/2016 at 09:49. Pushed by mardelle into branch 'Applications/16.04'. Allow disabling FFMpeg's automatic rotation when creating proxy by adding "-noautorotate" to proxy profile M +9 -2 src/project/jobs/proxyclipjob.cpp http://commits.kde.org/kdenlive/746bec07589c0503821be0b47fd6e6e245e29dac
While this commit does fix the bug, I believe that this -norotate flag should be set by default.