Bug 357326 - 1326x888 resolution/aspect ratio cause faulty display of videos
Summary: 1326x888 resolution/aspect ratio cause faulty display of videos
Status: RESOLVED WAITINGFORINFO
Alias: None
Product: kdenlive
Classification: Applications
Component: User Interface (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Jean-Baptiste Mardelle
URL:
Keywords:
: 356802 (view as bug list)
Depends on:
Blocks:
 
Reported: 2015-12-30 04:53 UTC by qubodup
Modified: 2016-10-28 03:22 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
sample with witch the issue can be recreated (115.78 KB, video/mp4)
2015-12-30 04:53 UTC, qubodup
Details
switched to clip profile message (7.90 KB, image/png)
2016-01-02 21:15 UTC, qubodup
Details

Note You need to log in before you can comment on or make changes to this bug.
Description qubodup 2015-12-30 04:53:01 UTC
Created attachment 96365 [details]
sample with witch the issue can be recreated

kdenlive-git v15.12.0-124-gc5962be master
catalyst-libgl 15.12-1 (HD 7750)
ffmpeg 1:2.8.4-1
ffmpeg-compat 1:0.10.16-4
frei0r-plugins 1.4-3
libx264 2:148.20150725-1
mlt-git r4154.v0.9.2.376.g9e04d46-1
mlt-python-bindings 0.9.8-4
movit-git r722.4cf76ac-1
qt5-base 5.5.1-6
x264 2:148.20150725-1
xorg-server 1.16.4-1

Note: this might well be a catalyst (amd proprietary driver) issue. Unfortunately I have no way of testing it with a different driver or GPU right now.

Steps to reproduce:
1. Start Kdenlive
2. Create a new profile with resolution/aspect ratio 1326x888
3. Import the video clip attached to this ticket (actually, standard HD resolution clips seem to cause the same issue).
4. Either click on clip and look at clip monitor or drag clip to timeline and look at project monitor

Expected result:
1. Video displays correctly

Actual result:
1. Video is skewed

Notes:
1. I imagine this might have something to do with rounding mistakes(?) due to the large aspect ratio numbers, however if you create a profile with resolution 1326x884 and aspect ratio 3:2, the same issues arise.
2. On the other hand if you duplicate a 1920x1080p 30fps profile but change the aspect ratio to nonsense, it only affects clip monitor but project monitor shows the video "correctly".
3. Rendering the video produces correct output.
4. In summary: this issue makes it very hard to work with non-standard resolutions.

Possible workaround:
Use a profile that has the same fps (changing fps mid-project currently corrupts the project) and change to the profile you actually want once you are ready to render

Video:
https://youtu.be/ABz5-sRxgNU
Comment 1 Jean-Baptiste Mardelle 2015-12-30 22:59:38 UTC
I cannot reproduce. However, can you confirm that the problem only happens when you change the profile of a current document ?

If you start a new project with your adjusted profile (1326x888), and add your clip, it is displayed correctly in both monitors ?
Comment 2 qubodup 2015-12-31 03:54:05 UTC
If I configure Kdenlive to use the mentioned profile as default, after restarting Kdenlive, a new project will have the same issues.

To anbody testing this: please report your graphics card driver so we can hopefully narrow it down.
Comment 3 Jean-Baptiste Mardelle 2015-12-31 08:35:05 UTC
Can you reproduce the issue in MLT ? in a terminal do:

melt myclip.mp4

it should automatically create a profile based on clip properties and play it...
I have an integrated Intel graphic card on my side...
Comment 4 Jean-Baptiste Mardelle 2015-12-31 22:25:39 UTC
Hi,

While working on automatic profile feature, I suddenly was able to reproduce the issue. Might have something to to with interlaced setting, I will investigate.
Comment 5 Jean-Baptiste Mardelle 2015-12-31 23:31:38 UTC
Git commit 9fe0c6526169ff33cf3352c277bd47d8d9bd002e by Jean-Baptiste Mardelle.
Committed on 31/12/2015 at 23:31.
Pushed by mardelle into branch 'master'.

MLT's project profiles must be a multiple of 8, so enforce it when user tries to set a incorrect value

M  +5    -0    src/definitions.cpp
M  +2    -0    src/definitions.h
M  +12   -0    src/dialogs/profilesdialog.cpp
M  +2    -0    src/dialogs/profilesdialog.h
M  +1    -0    src/renderer.cpp

http://commits.kde.org/kdenlive/9fe0c6526169ff33cf3352c277bd47d8d9bd002e
Comment 6 qubodup 2016-01-02 21:15:46 UTC
Created attachment 96420 [details]
switched to clip profile message

I am still able to create profiles with the same values.
I can still use profiles with the same values.

tested in main and 15.12 branches.

May I ask where it's documented that MLT profiles require mod8=0?

The strange thing is that I can render projects with what seems to be the desired result.

If I add such a clip to main branch, however, I get
" No existing profile found for your clip (1328x888, 29.97fps)
Do you want to switch to that custom profile ? "

even though I have multiple suitable profiles. If I press "ok", I see the attached message (switched to clip profile) - which is also confusing to me, as I don't know what a 'clip profile' is. But it seems to have changed the project profile. (Oh, I just understood... "switched to the profile which was picked based on the properties of this clip"...)

However if I then restart kdenlive and drag the clip in again, it automatically switches "to clip profile".
Comment 7 Jean-Baptiste Mardelle 2016-01-03 01:25:18 UTC
Since I don't consider this a major issue, I only fixed it in git master. You can still use existing profiles, but you shouldn't be able to create new profiles with width/8 !=0. 

However, I just found a flaw in my logic that still allows it. Will fix it.

Not sure this MLT profile width is documented. I saw it in Shotcut's code (MLT's author editor), and vaguely remember reading it somewhere in a mailing list or discussion....
Comment 8 Jean-Baptiste Mardelle 2016-01-03 11:33:40 UTC
*** Bug 356802 has been marked as a duplicate of this bug. ***
Comment 9 Jean-Baptiste Mardelle 2016-01-03 12:15:44 UTC
Git commit b82f237ee83558ddfb2158314e1caae37714fbc2 by Jean-Baptiste Mardelle.
Committed on 03/01/2016 at 12:15.
Pushed by mardelle into branch 'Applications/15.12'.

Warn and force project profile must be a multiple of 8

M  +46   -0    src/dialogs/profilesdialog.cpp
M  +4    -0    src/dialogs/profilesdialog.h
M  +57   -41   src/ui/profiledialog_ui.ui

http://commits.kde.org/kdenlive/b82f237ee83558ddfb2158314e1caae37714fbc2
Comment 10 Wegwerf 2016-07-31 09:13:05 UTC
Qubodup, is this bus still present, or has it been successfully fixed?  If it's been fixed, I would like to ask you to be so kind as to close this bug report. Thank you very much for your cooperation!
Comment 11 farid 2016-10-28 03:22:32 UTC
Any